From: Date: June 8 2005 11:35pm Subject: bk commit into 4.1 tree (jimw:1.2327) BUG#9500 List-Archive: http://lists.mysql.com/internals/25784 X-Bug: 9500 Message-Id: <20050608213522.1D56DA8469@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.2327 05/06/08 14:35:16 jimw@stripped +3 -0 Fix problem with handling of lower_case_table_name == 2 when the case in the FROM and WHERE clauses didn't agree. (Bug #9500) sql/mysqld.cc 1.574 05/06/08 14:35:13 jimw@stripped +5 -3 Move initialization of table_alias_charset to after we have decided what lower_case_table_names should be. mysql-test/t/lowercase_table2.test 1.9 05/06/08 14:35:13 jimw@stripped +9 -1 Fix 'DROP TABLE' to not drop tables with the same name. mysql-test/r/lowercase_table2.result 1.13 05/06/08 14:35:13 jimw@stripped +6 -1 Update 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-9500 --- 1.573/sql/mysqld.cc 2005-06-03 13:45:57 -07:00 +++ 1.574/sql/mysqld.cc 2005-06-08 14:35:13 -07:00 @@ -2988,6 +2988,11 @@ lower_case_table_names= 0; } + /* Reset table_alias_charset, now that lower_case_table_names is set. */ + table_alias_charset= (lower_case_table_names ? + files_charset_info : + &my_charset_bin); + select_thread=pthread_self(); select_thread_in_use=1; init_ssl(); @@ -6509,9 +6514,6 @@ /* Set global variables based on startup options */ myisam_block_size=(uint) 1 << my_bit_log2(opt_myisam_block_size); - table_alias_charset= (lower_case_table_names ? - files_charset_info : - &my_charset_bin); if (opt_short_log_format) opt_specialflag|= SPECIAL_SHORT_LOG_FORMAT; --- 1.12/mysql-test/r/lowercase_table2.result 2005-05-25 20:26:38 -07:00 +++ 1.13/mysql-test/r/lowercase_table2.result 2005-06-08 14:35:13 -07:00 @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1,t2,T1,T2,t3,T3; +DROP TABLE IF EXISTS t1,t2,t3; DROP DATABASE IF EXISTS `TEST_$1`; DROP DATABASE IF EXISTS `test_$1`; CREATE TABLE T1 (a int); @@ -159,3 +159,8 @@ i use test; drop database mysqltest_LC2; +create table t2aA (col1 int); +create table t1Aa (col1 int); +select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1; +col1 +drop table t2aA, t1Aa; --- 1.8/mysql-test/t/lowercase_table2.test 2005-02-08 14:13:01 -08:00 +++ 1.9/mysql-test/t/lowercase_table2.test 2005-06-08 14:35:13 -07:00 @@ -10,7 +10,7 @@ enable_query_log; --disable_warnings -DROP TABLE IF EXISTS t1,t2,T1,T2,t3,T3; +DROP TABLE IF EXISTS t1,t2,t3; DROP DATABASE IF EXISTS `TEST_$1`; DROP DATABASE IF EXISTS `test_$1`; --enable_warnings @@ -128,3 +128,11 @@ select * from myUC; use test; drop database mysqltest_LC2; + +# +# Bug #9500: Problem with WHERE clause +# +create table t2aA (col1 int); +create table t1Aa (col1 int); +select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1; +drop table t2aA, t1Aa;