jackalope / jackalope-doctrine-dbal

Doctrine DBAL transport implementation for Jackalope
http://jackalope.github.io
Other
143 stars 60 forks source link

Fix query syntax to work on MySQL with ANSI_QUOTES enabled #409

Closed hanzi closed 1 year ago

hanzi commented 1 year ago

If MySQL is configured with SQL mode ANSI_QUOTES (or ANSI) the double quotes character is considered to quote an identifier name (such as table name, column name, etc.) rather than a literal string.

There is one place in the code base (which this PR aims to fix) where double quotes are being generated as part of the query, and running such a query on a MySQL server with ANSI_QUOTES enabled leads to an SQL error because the value of $literalOperand is being treated as a column name.

dbu commented 1 year ago

https://github.com/jackalope/jackalope-doctrine-dbal/releases/tag/1.8.1