Author: hmbrand
Date: Fri Jun  5 00:52:25 2009
New Revision: 12808

Modified:
   dbi/trunk/lib/DBD/File.pm

Log:
The first call is still reliable, so just do the right thing

Modified: dbi/trunk/lib/DBD/File.pm
==============================================================================
--- dbi/trunk/lib/DBD/File.pm   (original)
+++ dbi/trunk/lib/DBD/File.pm   Fri Jun  5 00:52:25 2009
@@ -551,14 +551,12 @@
     $sth->finish;
     my $stmt = $sth->{f_stmt};
     unless ($sth->{f_params_checked}++) {
+       # bug in SQL::Statement 1.20 and below causes breakage
+       # on all but the first call
        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";
+           $sth->set_err ($DBI::stderr, $msg);
+           return;
            }
        }
     my @err;

Reply via email to