[DBD::Pg 2/2] Add failing test per bug 75713
dbdpg-commits-gENoVmVU/[email protected] Mon, 12 Mar 2012 16:08:53 -0400
| Newsgroups | gmane.comp.db.postgresql.dbdpg.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by Greg Sabino Mullane <greg-O9fzpki4YnJWk0Htik3J/[email protected]> Subject: [DBD::Pg 2/2] Add failing test per bug 75713 --- t/12placeholders.t | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/t/12placeholders.t b/t/12placeholders.t index 0fdd3b5..1a89d91 100644 --- a/t/12placeholders.t +++ b/t/12placeholders.t @@ -17,7 +17,7 @@ my $dbh = connect_database(); if (! $dbh) { plan skip_all => 'Connection to database failed, cannot continue testing'; } -plan tests => 239; +plan tests => 240; my $t='Connect to database for placeholder testing'; isnt ($dbh, undef, $t); @@ -121,6 +121,15 @@ eval { }; is ($@, q{}, $t); +$t='Execute with repeated named placeholders works'; +$sql = q{SELECT pname FROM dbd_pg_test WHERE pname = :foobar AND pname = :foobar }; +eval { + $sth = $dbh->prepare($sql); + $sth->bind_param(':foobar', 123); + $sth->execute(); +}; +is ($@, q{}, $t); + $t='Prepare with large number of parameters works'; ## Test large number of placeholders $sql = 'SELECT 1 FROM dbd_pg_test WHERE id IN (' . '?,' x 300 . '?)'; -- 1.7.1