|Subject:||Parser is confused by quotes in comments|
Originally reported by Raphael Hertzog atDescription: I'm forwarding a bug reported to the Debian bug tracking system. The SQL parser is apparently confused by single quotes in comments. Example of problematic SQL query: -- 'Tis the quote that confuses DBI::MySQL SELECT ? DBD::MySQL will miss the "?", and assume there's no parameter to bind. Note that the syntax is valid, and the MySQL server has no problem parsing it (if you replace "?" with something else). How to repeat: $ perl -MDBI -lwe 'print DBI->connect("DBI:mysql:mysql_read_default_file=~/.my.cnf")->selectrow_array("-- \x27 \n SELECT ?", undef, 42)' DBD::mysql::db selectrow_array failed: called with 1 bind variables when 0 are needed at -e line 1. See original bug report for more details.