ZF-99: MySQL adapters quoteIdenfifier() quotes ` incorrectly (TRAC#95)

Issue Type: Bug Created: 2006-06-21T21:43:54.000+0000 Last Updated: 2007-07-05T14:44:28.000+0000 Status: Closed Fix version(s): - 0.1.5 (11/Jul/06)

Reporter: Zend Framework (zend_framework) Assignee: Gavin (gavin) Tags: - Zend_Db

Related issues: Attachments:


Zend_Db_Adapter_Mysqli::quoteIdentifier() and Zend_Db_Adapter_Pdo_Mysql::quoteIdentifier() quote in identifiers as \ instead of


{quote} 05/28/06 03:00:45: Modified by anonymous

should be: ... quote backticks in identifiers as backslash+backtick instaed of double backticks {quote}


Posted by Gavin (gavin) on 2006-07-04T12:20:54.000+0000

According to the MySQL man page above:

Identifier quote characters can be included within an identifier if you quote the identifier. If the character to be included within the identifier is the same as that used to quote the identifier itself, then you need to double the character. The following statement creates a table named a`b that contains a column named c"d:

mysql> CREATE TABLE a``b (c"d INT);

Thus, it seems we should do the opposite of the suggestion recommended in this issue ticket's description.

Posted by Gavin (gavin) on 2006-07-04T12:25:11.000+0000

Aha .. more information appears in the MySQL 4.1 documentation than the MySQL 5.x documentation:…

Thus, the doubling of the quote character quoting mechanism was introduced with MySQL 4.1. I'll insert an @todo to support older versions of MySQL 4.1, and patch now to support 4.1+.

BTW, is anyone actually still using versions of MySQL older than 4.1.x?

Posted by Gavin (gavin) on 2006-07-04T13:12:35.000+0000

Although this issue is fixed, see the "FishEye" link for more related @todo tasks.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.