Skip Menu |
 

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 21521
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: dwheeler [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Test Failure Under ANSI SQL Mode
Date: Fri, 15 Sep 2006 19:05:02 -0700
To: bug-dbd-mysql [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
Download (untitled) / with headers
text/plain 832b
I have my MySQL server set up with the following configuration in / etc/my.cnf: sql-mode=ansi,strict_trans_tables character-set-server=utf8 default-storage-engine=InnoDB default-time-zone=utc I believe that it is the ANSI SQL mode that is causing a test failure in DBD::mysql: t/40bindparam........DBD::mysql::db do failed: Unknown column '?' in 'field list' at t/40bindparam.t line 128. The offending test is: Test($state or $dbh->do("INSERT INTO $table VALUES (7, \"?\")")) or DbiError($dbh->err, $dbh->errstr); Of course, in ANSI-standard SQL, double-quotes are used only for database objects (tables, columns, etc.), and cannot be used for parameters. Perhaps the test suite can use SELECT @@global.sql_mode; To detect that the server is using ANSI_QUOTES and skip that test if it is? Best, David
Download (untitled) / with headers
text/plain 130b
A fix for this has been committed to the source tree, and will be in the next release (probably 4.01). Thanks for the bug report.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.