From 245fa0befdcae1825ad1d18a976a945a7fdf71e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 May 2005 20:26:40 -0700 Subject: Fix table renaming to not lowercase table names for all storage engines when lower_case_table_names == 2, as it did previously for InnoDB and MEMORY. (Bug #9660) mysql-test/r/lowercase_table2.result: Fix results sql/sql_table.cc: Add build_table_path() function to construct the path to a table, and use it to replace nearly all of the places where this was done with similar code. Fix mysql_rename_table() to not lowercase the .frm file name when lower_case_table_names == 2 and the storage engine does not set the HA_FILE_BASED flag (such as InnoDB). --- mysql-test/r/lowercase_table2.result | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index 8361b66817a..1015990df9a 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -72,7 +72,7 @@ T1 CREATE TABLE `T1` ( RENAME TABLE T1 TO T2; SHOW TABLES LIKE "T2"; Tables_in_test (T2) -t2 +T2 SELECT * FROM t2; a 1 @@ -83,25 +83,25 @@ t3 RENAME TABLE T3 TO T1; SHOW TABLES LIKE "T1"; Tables_in_test (T1) -t1 +T1 ALTER TABLE T1 add b int; SHOW TABLES LIKE "T1"; Tables_in_test (T1) -t1 +T1 ALTER TABLE T1 RENAME T2; SHOW TABLES LIKE "T2"; Tables_in_test (T2) -t2 +T2 LOCK TABLE T2 WRITE; ALTER TABLE T2 drop b; SHOW TABLES LIKE "T2"; Tables_in_test (T2) -t2 +T2 UNLOCK TABLES; RENAME TABLE T2 TO T1; SHOW TABLES LIKE "T1"; Tables_in_test (T1) -t1 +T1 SELECT * from T1; a 1 -- cgit v1.2.1 From b39588619119023d83f1293bdc53d155c41e7ac6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Jun 2005 09:48:25 -0700 Subject: Fix handling of NULL fields in FIELD(). (Bug #10944) mysql-test/r/func_str.result: Update results mysql-test/t/func_str.test: Add regression tests sql/item_func.cc: Handle NULL as first argument to FIELD() --- mysql-test/r/func_str.result | 6 ++++++ mysql-test/t/func_str.test | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 5405dbf53d9..ea1efbc7c0a 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -783,3 +783,9 @@ id aes_decrypt(str, 'bar') 1 foo 2 NULL DROP TABLE t1, t2; +select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0); +field(0,NULL,1,0) field("",NULL,"bar","") field(0.0,NULL,1.0,0.0) +3 3 3 +select field(NULL,1,2,NULL), field(NULL,1,2,0); +field(NULL,1,2,NULL) field(NULL,1,2,0) +0 0 diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 22028437111..a5536f7a0be 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -521,3 +521,9 @@ SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id DROP TABLE t1, t2; + +# +# Bug #10944: Mishandling of NULL arguments in FIELD() +# +select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0); +select field(NULL,1,2,NULL), field(NULL,1,2,0); -- cgit v1.2.1 From 362ab06c4f91d896d1768a3956a6d7213206e5e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Jun 2005 14:35:02 -0700 Subject: Update results of test after merge of bugfix mysql-test/r/rpl_failed_optimize.result: Update results --- mysql-test/r/rpl_failed_optimize.result | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result index 1576ec60500..120bb53ed25 100644 --- a/mysql-test/r/rpl_failed_optimize.result +++ b/mysql-test/r/rpl_failed_optimize.result @@ -9,6 +9,7 @@ BEGIN; INSERT INTO t1 VALUES (1); OPTIMIZE TABLE t1; Table Op Msg_type Msg_text +test.t1 optimize error Lock wait timeout exceeded; try restarting transaction test.t1 optimize status Operation failed OPTIMIZE TABLE non_existing; Table Op Msg_type Msg_text -- cgit v1.2.1