List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:July 21 2010 3:07pm
Subject:bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3497) Bug#53095
View as plain text  
#At file:///Users/kgeorge/mysql/work/fix-5.1-bugteam/ based on revid:alexey.kopytov@stripped

 3497 Georgi Kodinov	2010-07-21
      Addendum #4 to bug #53095
      
      SHOW DATABASES LIKE ... was not converting to lowercase on comparison as the
      documentation is suggesting. 
      Fixed it to behave similarly to SHOW TABLES LIKE ... and updated the failing
      on MacOSX lowercase_table2 test case.

    modified:
      mysql-test/r/lowercase_table2.result
      sql/sql_show.cc
=== modified file 'mysql-test/r/lowercase_table2.result'
--- a/mysql-test/r/lowercase_table2.result	2006-06-14 05:54:56 +0000
+++ b/mysql-test/r/lowercase_table2.result	2010-07-21 15:05:57 +0000
@@ -56,6 +56,7 @@ CREATE DATABASE `TEST_$1`;
 SHOW DATABASES LIKE "TEST%";
 Database (TEST%)
 TEST_$1
+test
 DROP DATABASE `test_$1`;
 CREATE TABLE T1 (a int) engine=innodb;
 INSERT INTO T1 VALUES (1);
@@ -171,6 +172,6 @@ create table myUC (i int);
 select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
 where TABLE_SCHEMA ='mysqltest_LC2';
 TABLE_SCHEMA	TABLE_NAME
-mysqltest_LC2	myUC
+mysqltest_lc2	myUC
 use test;
 drop database mysqltest_LC2;

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2010-07-20 18:07:36 +0000
+++ b/sql/sql_show.cc	2010-07-21 15:05:57 +0000
@@ -521,8 +521,19 @@ find_files(THD *thd, List<LEX_STRING> *f
         continue;
 
       file_name_len= filename_to_tablename(file->name, uname, sizeof(uname));
-      if (wild && wild_compare(uname, wild, 0))
-        continue;
+      if (wild)
+      {
+	if (lower_case_table_names)
+	{
+          if (my_wildcmp(files_charset_info,
+                         uname, uname + file_name_len,
+                         wild, wild + wild_length,
+                         wild_prefix, wild_one,wild_many))
+            continue;
+	}
+	else if (wild_compare(uname, wild, 0))
+	  continue;
+      }
       if (!(file_name= 
             thd->make_lex_string(file_name, uname, file_name_len, TRUE)))
       {


Attachment: [text/bzr-bundle] bzr/georgi.kodinov@oracle.com-20100721150557-pdlwjgigkbxrleaq.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3497) Bug#53095Georgi Kodinov21 Jul