List:Commits« Previous MessageNext Message »
From:gluh Date:June 6 2006 6:25am
Subject:bk commit into 5.0 tree (gluh:1.2171) BUG#17661
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2171 06/06/06 11:25:31 gluh@stripped +3 -0
  Bug#17661 information_schema.SCHEMATA returns uppercase with lower_case_table_names = 1
  fix: return db name for I_S.TABLES(and others) in original letter case.
  if mysql starts with lower_case_table_names=1 | 2 then original db name is converted
  to lower case(for I_S tables). It happens when we perform add_table_to_list. 
  to avoid this we make a copy of original db name and use the copy hereafter.

  sql/sql_show.cc
    1.319 06/06/06 11:25:25 gluh@stripped +5 -3
    Bug#17661 information_schema.SCHEMATA returns uppercase with lower_case_table_names = 1
    fix: return db name for I_S.TABLES(and others) in original letter case.
    if mysql starts with lower_case_table_names=1 | 2 then original db name is converted
    to lower case(for I_S tables). It happens when we perform add_table_to_list. 
    to avoid this we make a copy of original db name and use the copy hereafter.

  mysql-test/t/lowercase_table2.test
    1.14 06/06/06 11:25:25 gluh@stripped +11 -0
    Bug#17661 information_schema.SCHEMATA returns uppercase with lower_case_table_names = 1
    test case

  mysql-test/r/lowercase_table2.result
    1.18 06/06/06 11:25:25 gluh@stripped +9 -0
    Bug#17661 information_schema.SCHEMATA returns uppercase with lower_case_table_names = 1
    test case

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Merge/5.0

--- 1.318/sql/sql_show.cc	Tue May 30 10:45:16 2006
+++ 1.319/sql/sql_show.cc	Tue Jun  6 11:25:25 2006
@@ -2070,7 +2070,7 @@ int get_all_tables(THD *thd, TABLE_LIST 
   ST_SCHEMA_TABLE *schema_table= tables->schema_table;
   SELECT_LEX sel;
   INDEX_FIELD_VALUES idx_field_vals;
-  char path[FN_REFLEN], *end, *base_name, *file_name;
+  char path[FN_REFLEN], *end, *base_name, *orig_base_name, *file_name;
   uint len;
   bool with_i_schema;
   enum enum_schema_tables schema_table_idx;
@@ -2150,7 +2150,7 @@ int get_all_tables(THD *thd, TABLE_LIST 
 
   partial_cond= make_cond_for_info_schema(cond, tables);
   it.rewind(); /* To get access to new elements in basis list */
-  while ((base_name= it++) ||
+  while ((orig_base_name= base_name= it++) ||
 	 /*
 	   generate error for non existing database.
 	   (to save old behaviour for SHOW TABLES FROM db)
@@ -2181,6 +2181,8 @@ int get_all_tables(THD *thd, TABLE_LIST 
         if (mysql_find_files(thd, &files, base_name, 
                              path, idx_field_vals.table_value, 0))
           goto err;
+        if (lower_case_table_names)
+          orig_base_name= thd->strdup(base_name);
       }
 
       List_iterator_fast<char> it_files(files);
@@ -2249,7 +2251,7 @@ int get_all_tables(THD *thd, TABLE_LIST 
               in this case.
             */
             res= schema_table->process_table(thd, show_table_list, table,
-                                             res, base_name,
+                                             res, orig_base_name,
                                              show_table_list->alias);
             close_tables_for_reopen(thd, &show_table_list);
             DBUG_ASSERT(!lex->query_tables_own_last);

--- 1.17/mysql-test/r/lowercase_table2.result	Tue Jul  5 23:49:01 2005
+++ 1.18/mysql-test/r/lowercase_table2.result	Tue Jun  6 11:25:25 2006
@@ -165,3 +165,12 @@ create table t1Aa (col1 int);
 select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
 col1
 drop table t2aA, t1Aa;
+create database mysqltest_LC2;
+use mysqltest_LC2;
+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
+use test;
+drop database mysqltest_LC2;

--- 1.13/mysql-test/t/lowercase_table2.test	Thu Sep 15 19:17:14 2005
+++ 1.14/mysql-test/t/lowercase_table2.test	Tue Jun  6 11:25:25 2006
@@ -139,3 +139,14 @@ select t1Aa.col1 from t1aA,t2Aa where t1
 drop table t2aA, t1Aa;
 
 # End of 4.1 tests
+
+#
+# Bug#17661 information_schema.SCHEMATA returns uppercase with lower_case_table_names = 1
+#
+create database mysqltest_LC2;
+use mysqltest_LC2;
+create table myUC (i int);
+select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
+where TABLE_SCHEMA ='mysqltest_LC2';
+use test;
+drop database mysqltest_LC2;
Thread
bk commit into 5.0 tree (gluh:1.2171) BUG#17661gluh6 Jun