#At file:///home/gluh/MySQL/mysql-5.0-bug-37268/ based on revid:joro@stripped
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
modified:
client/mysql.cc
mysql-test/r/mysql.result
mysql-test/t/mysql.test
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2009-05-15 09:29:41 +0000
+++ b/client/mysql.cc 2009-05-28 06:58:28 +0000
@@ -1949,7 +1949,7 @@ static COMMANDS *find_command(char *name
*/
if (strstr(name, "\\g") || (strstr(name, delimiter) &&
!(strlen(name) >= 9 &&
- !my_strnncoll(charset_info,
+ !my_strnncoll(&my_charset_latin1,
(uchar*) name, 9,
(const uchar*) "delimiter",
9))))
@@ -1970,7 +1970,7 @@ static COMMANDS *find_command(char *name
{
if (commands[i].func &&
((name &&
- !my_strnncoll(charset_info,(uchar*)name,len,
+ !my_strnncoll(&my_charset_latin1, (uchar*)name, len,
(uchar*)commands[i].name,len) &&
!commands[i].name[len] &&
(!end || (end && commands[i].takes_params))) ||
=== modified file 'mysql-test/r/mysql.result'
--- a/mysql-test/r/mysql.result 2009-05-15 09:29:41 +0000
+++ b/mysql-test/r/mysql.result 2009-05-28 06:58:28 +0000
@@ -198,4 +198,5 @@ COUNT (*)
1
COUNT (*)
1
+ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (1)
End of 5.0 tests
=== modified file 'mysql-test/t/mysql.test'
--- a/mysql-test/t/mysql.test 2009-05-07 17:28:29 +0000
+++ b/mysql-test/t/mysql.test 2009-05-28 06:58:28 +0000
@@ -348,4 +348,11 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug310
--exec $MYSQL --ignore-spaces -e "SELECT COUNT (*)"
--exec $MYSQL -b -i -e "SELECT COUNT (*)"
+#
+# Bug#37268 'binary' character set makes CLI-internal commands case sensitive
+#
+--error 1
+--exec $MYSQL --default-character-set=binary test -e "CONNECT test invalid_hostname" 2>&1
+--exec $MYSQL --default-character-set=binary test -e "DELIMITER //" 2>&1
+
--echo End of 5.0 tests
Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20090528065828-j9yxmbu8ldyw9m2e.bundle
| Thread |
|---|
| • bzr commit into mysql-5.0-bugteam branch (Sergey.Glukhov:2757)Bug#37268 | Sergey Glukhov | 28 May |