From: Date: April 29 2005 12:30am Subject: bk commit into 4.1 tree (jimw:1.2210) BUG#9761 List-Archive: http://lists.mysql.com/internals/24465 X-Bug: 9761 Message-Id: <20050428223046.214C3A88F1@rama.trainedmonkey.com> Below is the list of changes that have just been committed into a local 4.1 repository of jimw. When jimw 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.2210 05/04/28 15:30:42 jimw@stripped +3 -0 Fix 'CREATE TABLE ... LIKE ...' when lower_case_table_names is set on case-sensitive file systems and the source table was specified in something other than lowercase. (Bug #9761) sql/sql_table.cc 1.279 05/04/28 15:30:40 jimw@stripped +2 -0 When lower_case_table_names is set, make sure to look for the source table using a lowercase filename. mysql-test/t/lowercase_table.test 1.16 05/04/28 15:30:40 jimw@stripped +8 -0 Regression test for Bug #9761 mysql-test/r/lowercase_table.result 1.14 05/04/28 15:30:40 jimw@stripped +3 -0 Add results # 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: jimw # Host: rama.(none) # Root: /home/jimw/my/mysql-4.1-9761 --- 1.278/sql/sql_table.cc 2005-04-11 07:45:55 -07:00 +++ 1.279/sql/sql_table.cc 2005-04-28 15:30:40 -07:00 @@ -2281,6 +2281,8 @@ reg_ext, NullS); /* Resolve symlinks (for windows) */ fn_format(src_path, src_path, "", "", MYF(MY_UNPACK_FILENAME)); + if (lower_case_table_names) + my_casedn_str(files_charset_info, src_path); if (access(src_path, F_OK)) { my_error(ER_BAD_TABLE_ERROR, MYF(0), src_table); --- 1.13/mysql-test/r/lowercase_table.result 2004-09-02 16:25:24 -07:00 +++ 1.14/mysql-test/r/lowercase_table.result 2005-04-28 15:30:40 -07:00 @@ -78,5 +78,8 @@ select C.a, c.a from t1 c, t2 C; ERROR 42000: Not unique table/alias: 'C' drop table t1, t2; +create table t1 (a int); +create table t2 like T1; +drop table t1, t2; show tables; Tables_in_test --- 1.15/mysql-test/t/lowercase_table.test 2004-09-02 16:25:24 -07:00 +++ 1.16/mysql-test/t/lowercase_table.test 2005-04-28 15:30:40 -07:00 @@ -73,4 +73,12 @@ select C.a, c.a from t1 c, t2 C; drop table t1, t2; +# +# Bug #9761: CREATE TABLE ... LIKE ... not handled correctly when +# lower_case_table_names is set + +create table t1 (a int); +create table t2 like T1; +drop table t1, t2; + show tables;