Author: hmbrand
Date: Fri Jun 5 00:37:44 2009
New Revision: 12807
Modified:
dbi/trunk/Changes
dbi/trunk/lib/DBD/File.pm
Log:
workaround a bug in SQL::Statement (temporary fix)
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Fri Jun 5 00:37:44 2009
@@ -59,6 +59,9 @@
Fixes to DBD::File (H.Merijn Brand)
added f_schema attribute
table names case sensitive when quoted, insensitive when unquoted
+ workaround a bug in SQL::Statement (temporary fix)
+ "You passed x parameters where y required" now only warns if it
+ finds a mismatch on the first execute of the handle
Added docs form column_info()'s COLUMN_DEF value.
Clarified docs on stickyness of data type via bind_param().
Modified: dbi/trunk/lib/DBD/File.pm
==============================================================================
--- dbi/trunk/lib/DBD/File.pm (original)
+++ dbi/trunk/lib/DBD/File.pm Fri Jun 5 00:37:44 2009
@@ -550,10 +550,16 @@
$sth->finish;
my $stmt = $sth->{f_stmt};
- unless ((my $req_prm = $stmt->params ()) == (my $nparm = @$params)) {
- $sth->set_err ($DBI::stderr,
- "You passed $nparm parameters where $req_prm required");
- return;
+ unless ($sth->{f_params_checked}++) {
+ unless ((my $req_prm = $stmt->params ()) == (my $nparm = @$params)) {
+ my $msg = "You passed $nparm parameters where $req_prm required";
+ # The correct action here is to set error and return right away,
+ # but a bug in SQL::Statement 1.20 and below causes breakage
+ # $sth->set_err ($DBI::stderr, $msg);
+ # return;
+
+ warn "$msg\n";
+ }
}
my @err;
my $result = eval {