List:Commits« Previous MessageNext Message »
From:jimw Date:December 29 2006 12:29am
Subject:[svn:DBD-mysql] r8488 - in DBD-mysql/trunk: . t
View as plain text  
Author: jimw
Date: Thu Dec 28 16:29:39 2006
New Revision: 8488

Modified:
   DBD-mysql/trunk/ChangeLog
   DBD-mysql/trunk/t/40bindparam.t

Log:
Fix t/40bindparam.t to work when ANSI_QUOTES SQL_MODE is set.
[rt.cpan.org #21521], reported by David Wheeler


Modified: DBD-mysql/trunk/ChangeLog
==============================================================================
--- DBD-mysql/trunk/ChangeLog	(original)
+++ DBD-mysql/trunk/ChangeLog	Thu Dec 28 16:29:39 2006
@@ -1,4 +1,6 @@
 <unreleased> Jim Winstead <jimw@stripped> (4.01)
+* Fix t/40bindparam.t to work when ANSI_QUOTES SQL_MODE is set.
+  [rt.cpan.org #21521], reported by David Wheeler
 * Return a statement handle with an error when column_info is called on
   a table that does not exist. (Bug #23974, patch by Philip Stoev)
 * Fix handling of table names with characters that did not match /\w/ in

Modified: DBD-mysql/trunk/t/40bindparam.t
==============================================================================
--- DBD-mysql/trunk/t/40bindparam.t	(original)
+++ DBD-mysql/trunk/t/40bindparam.t	Thu Dec 28 16:29:39 2006
@@ -138,8 +138,10 @@
     Test($state or $dbh->do("INSERT INTO $table VALUES (6, '?')"))
 	   or DbiError($dbh->err, $dbh->errstr);
     if ($mdriver eq 'mysql' or $mdriver eq 'mysqlEmb') {
+        $state or $dbh->do('SET @old_sql_mode = @@sql_mode, @@sql_mode = \'\'');
 	Test($state or $dbh->do("INSERT INTO $table VALUES (7, \"?\")"))
 	    or DbiError($dbh->err, $dbh->errstr);
+        $state or $dbh->do('SET @@sql_mode = @old_sql_mode');
     }
 
     #
Thread
[svn:DBD-mysql] r8488 - in DBD-mysql/trunk: . tjimw29 Dec