Author: hmbrand
Date: Mon Sep 13 23:10:52 2010
New Revision: 14399

Modified:
   dbi/trunk/Changes
   dbi/trunk/lib/DBI/DBD/SqlEngine.pm

Log:
fix RT#61281 - bad implementation of bind_param ()

Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Mon Sep 13 23:10:52 2010
@@ -8,6 +8,7 @@
 
 =head2 Changes in DBI 1.614 (svn r14385) 9th September 2010
 
+  Fixed bind_param () in DBI::DBD::SqlEngine (rt#61281)
   Fixed internals to not refer to old perl symbols that
     will no longer be visible in perl >5.13.3 (Andreas Koenig)
     Many compiled drivers are likely to need updating.

Modified: dbi/trunk/lib/DBI/DBD/SqlEngine.pm
==============================================================================
--- dbi/trunk/lib/DBI/DBD/SqlEngine.pm  (original)
+++ dbi/trunk/lib/DBI/DBD/SqlEngine.pm  Mon Sep 13 23:10:52 2010
@@ -744,18 +744,18 @@
     if ( $attr && defined $val )
     {
         my $type = ref $attr eq "HASH" ? $attr->{TYPE} : $attr;
-        if (    $attr == DBI::SQL_BIGINT()
-             || $attr == DBI::SQL_INTEGER()
-             || $attr == DBI::SQL_SMALLINT()
-             || $attr == DBI::SQL_TINYINT() )
+        if (    $type == DBI::SQL_BIGINT()
+             || $type == DBI::SQL_INTEGER()
+             || $type == DBI::SQL_SMALLINT()
+             || $type == DBI::SQL_TINYINT() )
         {
             $val += 0;
         }
-        elsif (    $attr == DBI::SQL_DECIMAL()
-                || $attr == DBI::SQL_DOUBLE()
-                || $attr == DBI::SQL_FLOAT()
-                || $attr == DBI::SQL_NUMERIC()
-                || $attr == DBI::SQL_REAL() )
+        elsif (    $type == DBI::SQL_DECIMAL()
+                || $type == DBI::SQL_DOUBLE()
+                || $type == DBI::SQL_FLOAT()
+                || $type == DBI::SQL_NUMERIC()
+                || $type == DBI::SQL_REAL() )
         {
             $val += 0.;
         }

Reply via email to