Bug #37268 'binary' character set makes CLI-internal commands case sensitive
Submitted: 8 Jun 2008 9:15 Modified: 30 Jun 2009 16:45
Reporter: Domas Mituzas Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.0.60, 5.0-bk, 5.1-bk OS:Any
Assigned to: Sergei Glukhov CPU Architecture:Any

[8 Jun 2008 9:15] Domas Mituzas
Description:
CLI-internal commands like 'DELIMITER' and 'CONNECT' become case sensitive if binary character set is used. 

This makes impossible to load 'mysqldump' output, as commands like 'DELIMITER' are all uppercase there, while client expects lowercase.

How to repeat:
$ mysql  --default-character-set=binary
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 30107
Server version: 5.0.64-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> DELIMITER ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1
mysql> delimiter ;

Suggested fix:
accept  both cases for SQL commands?
[28 May 2009 8:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/75110

2757 Sergey Glukhov	2009-05-28
      Bug#37268 'binary' character set makes CLI-internal commands case sensitive
      The fix is to use case insensitive collation
      for mysql client command search.
     @ client/mysql.cc
        The fix is to use case insensitive collation
        for mysql client command search.
     @ mysql-test/r/mysql.result
        test result
     @ mysql-test/t/mysql.test
        test case
[28 May 2009 8:56] Alexander Barkov
http://lists.mysql.com/commits/75110 is OK to push.
[28 May 2009 10:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/75128

2757 Sergey Glukhov	2009-05-28
      Bug#37268 'binary' character set makes CLI-internal commands case sensitive
      The fix is to use case insensitive collation
      for mysql client command search.
     @ client/mysql.cc
        The fix is to use case insensitive collation
        for mysql client command search.
     @ mysql-test/r/mysql.result
        test result
     @ mysql-test/t/mysql.test
        test case
[16 Jun 2009 8:32] Bugs System
Pushed into 5.0.84 (revid:gkodinov@mysql.com-20090616082753-kwe0l8uoictxhojf) (version source revid:sergey.glukhov@sun.com-20090528083430-pgqs6un5713scf62) (merge vers: 5.0.83) (pib:6)
[16 Jun 2009 11:04] Bugs System
Pushed into 5.1.36 (revid:joro@sun.com-20090616102155-3zhezogudt4uxdyn) (version source revid:azundris@mysql.com-20090529164935-xe3dceff53d7pywb) (merge vers: 5.1.36) (pib:6)
[17 Jun 2009 19:22] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090616183122-chjzbaa30qopdra9) (version source revid:azundris@mysql.com-20090529170733-wxq9j0idmss9rllz) (merge vers: 6.0.12-alpha) (pib:11)
[30 Jun 2009 16:45] Paul DuBois
Noted in 5.0.84, 5.1.36, 5.4.4 changelogs.

In the mysql client, using a default character set of binary caused
internal commands such as DELIMITER to become case sensitive.
[12 Aug 2009 22:54] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 2:11] Paul DuBois
Ignore previous comment about 5.4.2.
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (version source revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[26 Aug 2009 13:48] Bugs System
Pushed into 5.1.37-ndb-6.2.19 (revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (version source revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (merge vers: 5.1.37-ndb-6.2.19) (pib:11)
[27 Aug 2009 16:33] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:magnus.blaudd@sun.com-20090827163030-6o3kk6r2oua159hr) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[8 Oct 2009 20:14] Paul DuBois
The 5.4 fix has been pushed to 5.4.2.