Bug #9694 Identifier escaping does not check sql_mode

Submitted: 6 Apr 2005 19:52 Modified: 4 Apr 2007 19:45
Reporter: Dean Ellis Email Updates:
Status: Won't fix Impact on me:
None 
Category:Connector / ODBC Severity:S4 (Feature request)
Version:3.51.12 OS:Any
Assigned to: Jim Winstead CPU Architecture:Any

[6 Apr 2005 19:52] Dean Ellis
Description:
The driver escapes with ` without checking server sql_mode, which may have ANSI_QUOTES enabled.

This is technically legal, but as Connector/J does perform the check and uses " when ANSI_QUOTES is enabled, it is inconsistent.

How to repeat:
Just examine the source.

Suggested fix:
Connectors behavior should be consistent where possible, so C/ODBC could perhaps also check the SQL mode and escape appropriately.
[4 Apr 2007 19:45] Jim Winstead
It is Connector/J that is being over-ambitious here. The backtick (`) is always a valid identifier quote, so we don't have to worry about the SQL_MODE being changed out from under us by always using them.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.037 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.