Bug#531238: Partial patch
Gunnar Wolf
gwolf at iiec.unam.mx
Wed Sep 9 21:56:38 UTC 2009
tags 531238 + patch,upstream
thanks
Niko is right - t/03executeDBD.t is failing because of a spurious $_
being passed where no parameters are expected. This trivial patch
fixes it:
============================================================
diff --git a/t/03executeDBD.t b/t/03executeDBD.t
index 12852f3..8e31ffd 100755
--- a/t/03executeDBD.t
+++ b/t/03executeDBD.t
@@ -44,7 +44,8 @@ for (split /\n/,
DELETE FROM phrase WHERE id = 2 }
){
$sth = $dbh->prepare($_);
- ok($sth->execute($_),$sth->{f_stmt}->command);
+# ok($sth->execute($_),$sth->{f_stmt}->command);
+ ok($sth->execute(),$sth->{f_stmt}->command);
}
$sth = $dbh->prepare("SELECT UPPER('a') AS A,phrase FROM phrase");
============================================================
However, I hoped this trick would also work for t/05create.t. It does
not. The offending part (quoting lines 20-21) here is:
/============================================================
|my $aoa = [['c1','c2'],[1,9],[2,8] ];
|$dbh->do("CREATE TEMP TABLE aoa AS IMPORT(?)",{},$aoa);
\============================================================
But, even patching it to work as the DBI manpage suggests:
/============================================================
| my $rows_deleted = $dbh->do(q{
| DELETE FROM table
| WHERE status = ?
| }, undef, 'DONE') or die $dbh->errstr;
\============================================================
It fails:
/============================================================
|$ t/05create.t
|1..5
|SQL::Statement v.1.15
|DBD::File::db do failed: You passed 1 parameters where 0 required [for Statement "CREATE TEMP TABLE ao|a AS IMPORT(?)"] at t/05create.t line 21.
|DBD::File::db do failed: You passed 1 parameters where 0 required [for Statement "CREATE TEMP TABLE ao|a AS IMPORT(?)"] at t/05create.t line 21.
|# Looks like your test exited with 255 before it could output anything.
\============================================================
Note that this test checks for extended SQL syntax defined through
SQL::Statement::Syntax¹, and, given my time constraints right now, I
cannot devote more time to understanding it. I will forward this bug
report as it is _now_ upstream and hope for their answer :)
¹ http://search.cpan.org/~rehsack/SQL-Statement-1.20/lib/SQL/Statement/Syntax.pod#IMPORT()
--
Gunnar Wolf • gwolf at gwolf.org • (+52-55)5623-0154 / 1451-2244
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20090909/1773875b/attachment.pgp>
More information about the pkg-perl-maintainers
mailing list