From 31756a6aa4bb5a2e29269721d29c3a148ad29347 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 10 Oct 2005 19:39:16 -0700 Subject: Fix minimum value of query_prealloc_size to be the same as its default. (Bug #13334) mysql-test/r/variables.result: Add new results mysql-test/t/variables.test: Add new regression test sql/mysqld.cc: Fix minimum value of query_prealloc_size to be the same as its default. --- mysql-test/r/variables.result | 5 +++++ mysql-test/t/variables.test | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 67c78d82a24..0aa7ea7f83c 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -499,3 +499,8 @@ set names latin1; select @@have_innodb; @@have_innodb # +set @test = @@query_prealloc_size; +set @@query_prealloc_size = @test; +select @@query_prealloc_size = @test; +@@query_prealloc_size = @test +1 diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index a8844070207..8322c0f84bd 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -388,7 +388,6 @@ set character_set_results=NULL; select ifnull(@@character_set_results,"really null"); set names latin1; -# End of 4.1 tests # # Bug #9613: @@have_innodb @@ -396,3 +395,12 @@ set names latin1; --replace_column 1 # select @@have_innodb; + +# +# Bug #13334: query_prealloc_size default less than minimum +# +set @test = @@query_prealloc_size; +set @@query_prealloc_size = @test; +select @@query_prealloc_size = @test; + +# End of 4.1 tests -- cgit v1.2.1 From 75e65d2dd6dc525d48f028338eb7bbab3bde72de Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Oct 2005 15:52:22 +0200 Subject: Bug #12698 abnormal program termination running mysql_client_test - Move test for bug#93 from mysql_client_test.c to show_check.test - No need for test written in c mysql-test/r/show_check.result: Add test case for bug#93, moved from mysql_client_test.c mysql-test/t/show_check.test: Add test case for bug#93, moved from mysql_client_test.c tests/mysql_client_test.c: Remove test for bug#95 to show_check.test --- mysql-test/r/show_check.result | 7 +++++++ mysql-test/t/show_check.test | 13 +++++++++++++ 2 files changed, 20 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 1e5e8f442a8..9861daff409 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -513,3 +513,10 @@ t1 CREATE TABLE `t1` ( KEY `c2` USING BTREE (`c2`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +flush tables; +SHOW TABLE STATUS like 't1'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm' +show create table t1; +ERROR HY000: Incorrect information in file: './test/t1.frm' +drop table t1; diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index e6a404e3b57..d70903adbc4 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -378,4 +378,17 @@ create table t1 ( SHOW CREATE TABLE t1; DROP TABLE t1; +# Test for BUG#93: 4.1 protocl crash on corupted frm and SHOW TABLE STATUS + +flush tables; + +# Create a junk frm file on disk +system echo "this is a junk file for test" >> var/master-data/test/t1.frm ; +--replace_column 6 # 7 # 8 # 9 # +SHOW TABLE STATUS like 't1'; +--error 1033 +show create table t1; +drop table t1; + + # End of 4.1 tests -- cgit v1.2.1 From 9161a9e5c80a16229bfd3f0ac3056ae112e93785 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Oct 2005 00:48:34 +0400 Subject: fix for im_life_cycle test: replace im instance port number with a constant string. The lack of this --replace resulted in the test failing on all build hosts mysql-test/r/im_life_cycle.result: fix result mysql-test/t/im_life_cycle.imtest: replace instance port number in result, as it could be set differently for different test runs. --- mysql-test/r/im_life_cycle.result | 2 +- mysql-test/t/im_life_cycle.imtest | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/im_life_cycle.result b/mysql-test/r/im_life_cycle.result index 810953e0578..f8eaf0ccb46 100644 --- a/mysql-test/r/im_life_cycle.result +++ b/mysql-test/r/im_life_cycle.result @@ -21,7 +21,7 @@ instance_name status version mysqld2 online VERSION SHOW VARIABLES LIKE 'port'; Variable_name Value -port 9312 +port IM_MYSQLD1_PORT STOP INSTANCE mysqld2; SHOW INSTANCES; instance_name status diff --git a/mysql-test/t/im_life_cycle.imtest b/mysql-test/t/im_life_cycle.imtest index fff57e16eab..c2b1c9a56ec 100644 --- a/mysql-test/t/im_life_cycle.imtest +++ b/mysql-test/t/im_life_cycle.imtest @@ -46,6 +46,7 @@ SHOW INSTANCE STATUS mysqld2; --connect (mysql_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK) --connection mysql_con +--replace_result $IM_MYSQLD1_PORT IM_MYSQLD1_PORT SHOW VARIABLES LIKE 'port'; --connection default -- cgit v1.2.1 From 6f18b703e168d6d6f7c94712aa3c7e52c23f6c52 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Oct 2005 18:03:26 +0300 Subject: Some fixes to avoid compiler warnings. mysql-test/my_manage.c: Avoid warning: i not used in case of Windows. mysql-test/mysql_test_run_new.c: Removed unused variable. sql/item_func.cc: Removed unused variables. strings/ctype-simple.c: Added cast. strings/ctype-ucs2.c: Added cast. --- mysql-test/my_manage.c | 5 ++++- mysql-test/mysql_test_run_new.c | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/my_manage.c b/mysql-test/my_manage.c index 88e68dfc27e..919d3bd0529 100644 --- a/mysql-test/my_manage.c +++ b/mysql-test/my_manage.c @@ -230,7 +230,10 @@ int wait_for_server_start(char *bin_dir __attribute__((unused)), char *user, char *password, int port,char *tmp_dir) { arg_list_t al; - int err= 0, i; + int err= 0; +#ifndef __WIN__ + int i; +#endif char trash[FN_REFLEN]; /* mysqladmin file */ diff --git a/mysql-test/mysql_test_run_new.c b/mysql-test/mysql_test_run_new.c index 40e45a92851..8beebefd298 100644 --- a/mysql-test/mysql_test_run_new.c +++ b/mysql-test/mysql_test_run_new.c @@ -1716,7 +1716,6 @@ int main(int argc, char **argv) int* handle; char test[FN_LEN]; char mask[FN_REFLEN]; - char *p; int position; /* single test */ -- cgit v1.2.1 From 85adaa84d4b5e41d6675f944ea109020dc205063 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Oct 2005 02:53:03 +0200 Subject: mysql.spec.sh: Enabled yaSSL mysql-test-run.pl: Increased test case timeout from 15 min mysql-test/mysql-test-run.pl: Increased test case timeout from 15 min support-files/mysql.spec.sh: Enabled yaSSL --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 35f26199fc8..063d1e2f2cc 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -242,7 +242,7 @@ our $opt_sleep_time_after_restart= 1; our $opt_sleep_time_for_delete= 10; our $opt_testcase_timeout; our $opt_suite_timeout; -my $default_testcase_timeout= 10; # 10 min max +my $default_testcase_timeout= 15; # 15 min max my $default_suite_timeout= 120; # 2 hours max our $opt_socket; -- cgit v1.2.1 From 2e5d668debb738d9bf824a87601ca9d265013ad4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Oct 2005 14:54:54 +0200 Subject: Fixed BUG#13941: replace() string fuction behaves badly inside stored procedure For some functions returning strings (like "replace" and "ifnull" - where val_str() is returning a pointer into one of the parameters) - we ended up with a dangling pointer after the new operator destroyed the reuse item in the eval function. A working, if not very elegant, solution is to simply copy the string in such cases. mysql-test/r/sp.result: New test case for BUG#13941. mysql-test/t/sp.test: New test case for BUG#13941. sql/sp_head.cc: Copy the string when evaluating some string functions (e.g. "replace" and "ifnull") to avoid using a dangling pointer. --- mysql-test/r/sp.result | 28 ++++++++++++++++++++++++++++ mysql-test/t/sp.test | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index e95ee4441ce..7fdbeff9a86 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -3504,4 +3504,32 @@ drop procedure bug7049_5| drop procedure bug7049_6| drop function bug7049_1| drop function bug7049_2| +drop function if exists bug13941| +drop procedure if exists bug13941| +create function bug13941(p_input_str text) +returns text +begin +declare p_output_str text; +set p_output_str = p_input_str; +set p_output_str = replace(p_output_str, 'xyzzy', 'plugh'); +set p_output_str = replace(p_output_str, 'test', 'prova'); +set p_output_str = replace(p_output_str, 'this', 'questo'); +set p_output_str = replace(p_output_str, ' a ', 'una '); +set p_output_str = replace(p_output_str, 'is', ''); +return p_output_str; +end| +create procedure bug13941(out sout varchar(128)) +begin +set sout = 'Local'; +set sout = ifnull(sout, 'DEF'); +end| +select bug13941('this is a test')| +bug13941('this is a test') +questo una prova +call bug13941(@a)| +select @a| +@a +Local +drop function bug13941| +drop procedure bug13941| drop table t1,t2; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 4b9987c2803..18607c7f13c 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -4390,6 +4390,49 @@ drop function bug7049_1| drop function bug7049_2| +# +# BUG#13941: replace() string fuction behaves badly inside stored procedure +# (BUG#13914: IFNULL is returning garbage in stored procedure) +# +--disable_warnings +drop function if exists bug13941| +drop procedure if exists bug13941| +--enable_warnings + +create function bug13941(p_input_str text) + returns text +begin + declare p_output_str text; + + set p_output_str = p_input_str; + + set p_output_str = replace(p_output_str, 'xyzzy', 'plugh'); + set p_output_str = replace(p_output_str, 'test', 'prova'); + set p_output_str = replace(p_output_str, 'this', 'questo'); + set p_output_str = replace(p_output_str, ' a ', 'una '); + set p_output_str = replace(p_output_str, 'is', ''); + + return p_output_str; +end| + +create procedure bug13941(out sout varchar(128)) +begin + set sout = 'Local'; + set sout = ifnull(sout, 'DEF'); +end| + +# Note: The bug showed different behaviour in different types of builds, +# giving garbage results in some, and seemingly working in others. +# Running with valgrind (or purify) is the safe way to check that it's +# really working correctly. +select bug13941('this is a test')| +call bug13941(@a)| +select @a| + +drop function bug13941| +drop procedure bug13941| + + # # BUG#NNNN: New bug synopsis # -- cgit v1.2.1 From bb98e7c19756d18572d51e4cede624adbacece09 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Oct 2005 12:06:29 -0400 Subject: BUG#14056 Column prefix index on UTF-8 primary key column causes 'Can't find record..' Applying InnoDB patch from Jan Lindstrom --- mysql-test/r/innodb.result | 109 ++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/innodb.test | 116 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index a66259ff5f4..dc4893c3bfa 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -2663,3 +2663,112 @@ rollback; rollback; drop table t1; drop function f1; +create table t1 ( +a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2)) +) character set utf8 engine = innodb; +create table t2 ( +a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2)) +) character set ucs2 engine = innodb; +insert into t1 values (1,'abcdefg','abcdefg','one'); +insert into t1 values (2,'ijkilmn','ijkilmn','two'); +insert into t1 values (3,'qrstuvw','qrstuvw','three'); +insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four'); +insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five'); +insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six'); +insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven'); +insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight'); +insert into t2 values (1,'abcdefg','abcdefg','one'); +insert into t2 values (2,'ijkilmn','ijkilmn','two'); +insert into t2 values (3,'qrstuvw','qrstuvw','three'); +insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four'); +insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five'); +insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six'); +insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven'); +insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight'); +insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten'); +insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven'); +insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point'); +insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken'); +drop table t1; +drop table t2; +create table t1 ( +a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2)) +) character set utf8 engine = innodb; +create table t2 ( +a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2)) +) character set ucs2 engine = innodb; +insert into t1 values (1,'abcdefg','abcdefg','one'); +insert into t1 values (2,'ijkilmn','ijkilmn','two'); +insert into t1 values (3,'qrstuvw','qrstuvw','three'); +insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four'); +insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five'); +insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six'); +insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven'); +insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight'); +insert into t2 values (1,'abcdefg','abcdefg','one'); +insert into t2 values (2,'ijkilmn','ijkilmn','two'); +insert into t2 values (3,'qrstuvw','qrstuvw','three'); +insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four'); +insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five'); +insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six'); +insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven'); +insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight'); +insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten'); +insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven'); +insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point'); +insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken'); +drop table t1; +drop table t2; +create table t1 ( +a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2)) +) character set utf8 engine = innodb; +create table t2 ( +a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2)) +) character set ucs2 engine = innodb; +insert into t1 values (1,'abcdefg','abcdefg','one'); +insert into t1 values (2,'ijkilmn','ijkilmn','two'); +insert into t1 values (3,'qrstuvw','qrstuvw','three'); +insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four'); +insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five'); +insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six'); +insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven'); +insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight'); +insert into t2 values (1,'abcdefg','abcdefg','one'); +insert into t2 values (2,'ijkilmn','ijkilmn','two'); +insert into t2 values (3,'qrstuvw','qrstuvw','three'); +insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four'); +insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five'); +insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six'); +insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven'); +insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight'); +insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten'); +insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven'); +insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point'); +insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken'); +drop table t1; +drop table t2; +create table t1 ( +a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2)) +) character set utf8 engine = innodb; +create table t2 ( +a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2)) +) character set ucs2 engine = innodb; +insert into t1 values (1,'abcdefg','abcdefg','one'); +insert into t1 values (2,'ijkilmn','ijkilmn','two'); +insert into t1 values (3,'qrstuvw','qrstuvw','three'); +insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four'); +insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five'); +insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight'); +insert into t2 values (1,'abcdefg','abcdefg','one'); +insert into t2 values (2,'ijkilmn','ijkilmn','two'); +insert into t2 values (3,'qrstuvw','qrstuvw','three'); +insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four'); +insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five'); +insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six'); +insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven'); +insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight'); +insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten'); +insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken'); +drop table t1; +drop table t2; +commit; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 5a45b3524ac..cf0e08e2e66 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1635,3 +1635,119 @@ drop function f1; disconnect a; disconnect b; +# +# BUG 14056 Column prefix index on UTF-8 primary key column causes: Can't find record.. +# + +create table t1 ( + a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2)) +) character set utf8 engine = innodb; +create table t2 ( + a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2)) +) character set ucs2 engine = innodb; +insert into t1 values (1,'abcdefg','abcdefg','one'); +insert into t1 values (2,'ijkilmn','ijkilmn','two'); +insert into t1 values (3,'qrstuvw','qrstuvw','three'); +insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four'); +insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five'); +insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six'); +insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven'); +insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight'); +insert into t2 values (1,'abcdefg','abcdefg','one'); +insert into t2 values (2,'ijkilmn','ijkilmn','two'); +insert into t2 values (3,'qrstuvw','qrstuvw','three'); +insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four'); +insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five'); +insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six'); +insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven'); +insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight'); +insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten'); +insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven'); +insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point'); +insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken'); +drop table t1; +drop table t2; + +create table t1 ( + a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2)) +) character set utf8 engine = innodb; +create table t2 ( + a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2)) +) character set ucs2 engine = innodb; +insert into t1 values (1,'abcdefg','abcdefg','one'); +insert into t1 values (2,'ijkilmn','ijkilmn','two'); +insert into t1 values (3,'qrstuvw','qrstuvw','three'); +insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four'); +insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five'); +insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six'); +insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven'); +insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight'); +insert into t2 values (1,'abcdefg','abcdefg','one'); +insert into t2 values (2,'ijkilmn','ijkilmn','two'); +insert into t2 values (3,'qrstuvw','qrstuvw','three'); +insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four'); +insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five'); +insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six'); +insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven'); +insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight'); +insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten'); +insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven'); +insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point'); +insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken'); +drop table t1; +drop table t2; + +create table t1 ( + a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2)) +) character set utf8 engine = innodb; +create table t2 ( + a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2)) +) character set ucs2 engine = innodb; +insert into t1 values (1,'abcdefg','abcdefg','one'); +insert into t1 values (2,'ijkilmn','ijkilmn','two'); +insert into t1 values (3,'qrstuvw','qrstuvw','three'); +insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four'); +insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five'); +insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six'); +insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven'); +insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight'); +insert into t2 values (1,'abcdefg','abcdefg','one'); +insert into t2 values (2,'ijkilmn','ijkilmn','two'); +insert into t2 values (3,'qrstuvw','qrstuvw','three'); +insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four'); +insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five'); +insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six'); +insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven'); +insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight'); +insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten'); +insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven'); +insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point'); +insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken'); +drop table t1; +drop table t2; + +create table t1 ( + a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2)) +) character set utf8 engine = innodb; +create table t2 ( + a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2)) +) character set ucs2 engine = innodb; +insert into t1 values (1,'abcdefg','abcdefg','one'); +insert into t1 values (2,'ijkilmn','ijkilmn','two'); +insert into t1 values (3,'qrstuvw','qrstuvw','three'); +insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four'); +insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five'); +insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight'); +insert into t2 values (1,'abcdefg','abcdefg','one'); +insert into t2 values (2,'ijkilmn','ijkilmn','two'); +insert into t2 values (3,'qrstuvw','qrstuvw','three'); +insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four'); +insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five'); +insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six'); +insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven'); +insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight'); +insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten'); +insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken'); +drop table t1; +drop table t2; +commit; -- cgit v1.2.1 From 0f8ab213e307515990224771cda17c05e162aad4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Oct 2005 11:56:27 +0500 Subject: Bug#12371: executing prepared statement fails (illegal mix of collations) ctype_utf8.test, ctype_utf8.result: Adding test case. item.h: item.cc: Adding Item_param::safe_charset_converter sql/item.cc: Bug#12371: executing prepared statement fails (illegal mix of collations) Adding Item_param::safe_charset_converter sql/item.h: Adding Item_param::safe_charset_converter mysql-test/r/ctype_utf8.result: Adding test case. mysql-test/t/ctype_utf8.test: Adding test case. --- mysql-test/r/ctype_utf8.result | 17 +++++++++++++++++ mysql-test/t/ctype_utf8.test | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 29133c53cf9..405eff25746 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1131,3 +1131,20 @@ a i い drop table t1,t2; +set names utf8; +create table t1 (a char(10), b varchar(10)); +insert into t1 values ('bar','kostja'); +insert into t1 values ('kostja','bar'); +prepare my_stmt from "select * from t1 where a=?"; +set @a:='bar'; +execute my_stmt using @a; +a b +bar kostja +set @a:='kostja'; +execute my_stmt using @a; +a b +kostja bar +set @a:=null; +execute my_stmt using @a; +a b +drop table if exists t1; diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 6628175198c..fb6f2f58e35 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -916,3 +916,20 @@ insert into t1 values('a'),('a'),(0xE38182),(0xE38182); insert into t1 values('i'),('i'),(0xE38184),(0xE38184); select * from t1 union distinct select * from t2; drop table t1,t2; + + +# +# Bug#12371: executing prepared statement fails (illegal mix of collations) +# +set names utf8; +create table t1 (a char(10), b varchar(10)); +insert into t1 values ('bar','kostja'); +insert into t1 values ('kostja','bar'); +prepare my_stmt from "select * from t1 where a=?"; +set @a:='bar'; +execute my_stmt using @a; +set @a:='kostja'; +execute my_stmt using @a; +set @a:=null; +execute my_stmt using @a; +drop table if exists t1; -- cgit v1.2.1 From 8a20d6413929dffcd74b4ce819456bbd50696edf Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Oct 2005 04:01:52 +0300 Subject: fix for bug #12595 (ESCAPE must be exactly 1 character long) ESCAPE has length of 1 if specified and sql_mode is NO_BACKSLASH_ESCAPES or has length of 0 or 1 in every other situation. (approved patch applied on a up-to-date tree re-commit) mysql-test/r/select.result: results of test for bug 12595 mysql-test/t/select.test: test for bug #12595 (ESCAPE must be exactly one character long) sql/item_cmpfunc.cc: if ESCAPE was in the statement check whether its length is different than 1. In NO_BACKSLASH_ESCAPES mode only length of 1 is allowed, otherwise the length could be 0 or 1 character (code point in the sense of Unicode). sql/item_cmpfunc.h: pass variable from the parsing stage - whether ESCAPE clause was found in the statement sql/sql_help.cc: pass FALSE for escape_used_in_parsing because we want the default mode of no error checking - our internal code. sql/sql_lex.cc: initialized variable used to transfer information during parsing up in the stack when reducing in the grammar sql/sql_lex.h: new variable used for transfering information when reducing in the grammar. sql/sql_yacc.yy: initialize Lex->escape_used and then use it when reducing. This is needed as fix for bug #12595 to distinguish between situation where ESCAPE was found and when not because internally we may pass a string an empty string and there is no other way to find out whether this is correct or not in case of NO_BACKSLASH_ESCAPES mode, which allows only length of 1 if ESCAPE is part of the SQL statement. --- mysql-test/r/select.result | 57 ++++++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/select.test | 39 +++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index abf607dd438..fb61095cf22 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2965,6 +2965,63 @@ NULL SELECT IFNULL(NULL, NULL); IFNULL(NULL, NULL) NULL +SET @OLD_SQL_MODE12595=@@SQL_MODE, @@SQL_MODE=''; +SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; +Variable_name Value +sql_mode +CREATE TABLE BUG_12595(a varchar(100)); +INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an"); +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%'; +a +hakan% +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*'; +a +hakan% +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**'; +ERROR HY000: Incorrect arguments to ESCAPE +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE ''; +a +hakan% +hakank +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE ''; +a +SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c; +a +ha%an +SELECT * FROM BUG_12595 WHERE a LIKE 'ha%%an' ESCAPE '%'; +a +ha%an +SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE '\\'; +a +ha%an +SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|'; +a +ha%an +SET @@SQL_MODE='NO_BACKSLASH_ESCAPES'; +SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; +Variable_name Value +sql_mode NO_BACKSLASH_ESCAPES +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%'; +a +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*'; +a +hakan% +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**'; +ERROR HY000: Incorrect arguments to ESCAPE +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE '\\'; +ERROR HY000: Incorrect arguments to ESCAPE +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE ''; +ERROR HY000: Incorrect arguments to ESCAPE +SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c; +a +ha%an +SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|'; +a +ha%an +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\n%' ESCAPE '\n'; +ERROR HY000: Incorrect arguments to ESCAPE +SET @@SQL_MODE=@OLD_SQL_MODE12595; +DROP TABLE BUG_12595; create table t1 (a char(1)); create table t2 (a char(1)); insert into t1 values ('a'),('b'),('c'); diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 6fc149e2e1f..af51a705122 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2517,6 +2517,45 @@ SELECT CAST(IFNULL(NULL, NULL) AS DECIMAL); SELECT ABS(IFNULL(NULL, NULL)); SELECT IFNULL(NULL, NULL); +# +# BUG #12595 (ESCAPE must be exactly one) +# +SET @OLD_SQL_MODE12595=@@SQL_MODE, @@SQL_MODE=''; +SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; + +CREATE TABLE BUG_12595(a varchar(100)); +INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an"); +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%'; +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*'; +-- error 1210 +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**'; +# this should work when sql_mode is not NO_BACKSLASH_ESCAPES +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE ''; +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE ''; +SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c; +SELECT * FROM BUG_12595 WHERE a LIKE 'ha%%an' ESCAPE '%'; +SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE '\\'; +SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|'; + +SET @@SQL_MODE='NO_BACKSLASH_ESCAPES'; +SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%'; +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*'; +-- error 1210 +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**'; +-- error 1210 +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE '\\'; +#this gives an error when NO_BACKSLASH_ESCAPES is set +-- error 1210 +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE ''; +SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c; +SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|'; +-- error 1210 +SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\n%' ESCAPE '\n'; + +SET @@SQL_MODE=@OLD_SQL_MODE12595; +DROP TABLE BUG_12595; + # # Bug #6495 Illogical requirement for column qualification in NATURAL join # -- cgit v1.2.1 From cb76c37bb3ba989eade6682e0e66f04d119b03af Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Oct 2005 13:14:54 +0500 Subject: fix for bug#14089 FROM list subquery always fails when information_schema is current database skip the check of I_S tables if table is derived table mysql-test/r/information_schema.result: fix for bug#14089 FROM list subquery always fails when information_schema is current database test case mysql-test/t/information_schema.test: fix for bug#14089 FROM list subquery always fails when information_schema is current database test case --- mysql-test/r/information_schema.result | 12 ++++++++++++ mysql-test/t/information_schema.test | 12 ++++++++++++ 2 files changed, 24 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 0d53180b6d6..9c3d6d40139 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1013,3 +1013,15 @@ grant all on information_schema.* to 'user1'@'localhost'; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' grant select on information_schema.* to 'user1'@'localhost'; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +use test; +create table t1(id int); +insert into t1(id) values (1); +select 1 from (select 1 from test.t1) a; +1 +1 +use information_schema; +select 1 from (select 1 from test.t1) a; +1 +1 +use test; +drop table t1; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index f351d315680..9fb57fc187b 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -715,3 +715,15 @@ select ROUTINE_NAME from routines; grant all on information_schema.* to 'user1'@'localhost'; --error 1044 grant select on information_schema.* to 'user1'@'localhost'; + +# +# Bug#14089 FROM list subquery always fails when information_schema is current database +# +use test; +create table t1(id int); +insert into t1(id) values (1); +select 1 from (select 1 from test.t1) a; +use information_schema; +select 1 from (select 1 from test.t1) a; +use test; +drop table t1; -- cgit v1.2.1 From cfc78dae98e70175908c156b644071537176a2b3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Oct 2005 14:41:56 +0500 Subject: Bug#13233 select distinct char(column) fails with utf8 ctype_utf8.result, ctype_utf8.test: Adding test case sql_yacc.yy: Adding new syntax. item_strfunc.h: Fixing wrong max_length calculation. Also, adding CHAR(x USING charset), for easier migrating from 4.1 to 5.0, according to Monty's suggestion. sql/item_strfunc.h: Bug#13233 select distinct char(column) fails with utf8 Also, adding CHAR(x USING charset), for easier migrating from 4.1 to 5.0. sql/sql_yacc.yy: Adding new syntax. mysql-test/t/ctype_utf8.test: Adding test case mysql-test/r/ctype_utf8.result: Adding test case --- mysql-test/r/ctype_utf8.result | 9 +++++++++ mysql-test/t/ctype_utf8.test | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index c7606b918df..03d3ab9f22e 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1061,3 +1061,12 @@ create table t1 (a varchar(255)) default charset=utf8; select * from t1 where find_in_set('-1', a); a drop table t1; +create table t1 (a int); +insert into t1 values (48),(49),(50); +set names utf8; +select distinct char(a) from t1; +char(a) +0 +1 +2 +drop table t1; diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index dcb7469d46e..8c0e03c0cd3 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -873,4 +873,13 @@ create table t1 (a varchar(255)) default charset=utf8; select * from t1 where find_in_set('-1', a); drop table t1; +# +# Bug#13233: select distinct char(column) fails with utf8 +# +create table t1 (a int); +insert into t1 values (48),(49),(50); +set names utf8; +select distinct char(a) from t1; +drop table t1; + # End of 4.1 tests -- cgit v1.2.1 From 58e09e24fd3b53fce99c55a16cb99cb67c821216 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Oct 2005 16:58:10 +0500 Subject: ctype_utf8.result: After merge fix. mysql-test/r/ctype_utf8.result: After merge fix. --- mysql-test/r/ctype_utf8.result | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 7878fc50b38..874983daff2 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1049,6 +1049,15 @@ create table t1 (a varchar(255)) default charset=utf8; select * from t1 where find_in_set('-1', a); a drop table t1; +create table t1 (a int); +insert into t1 values (48),(49),(50); +set names utf8; +select distinct char(a) from t1; +char(a) +0 +1 +2 +drop table t1; CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8; INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa'); SELECT id FROM t1; @@ -1148,12 +1157,3 @@ set @a:=null; execute my_stmt using @a; a b drop table if exists t1; -create table t1 (a int); -insert into t1 values (48),(49),(50); -set names utf8; -select distinct char(a) from t1; -char(a) -0 -1 -2 -drop table t1; -- cgit v1.2.1 From 33f457721c2ce6d2925978faf745c0e4da4ad44a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 24 Oct 2005 15:05:06 +0200 Subject: Fix for dropping a table with frm file consisting of "junk" mysql-test/r/show_check.result: Move result to correct place sql/sql_table.cc: Reset error if table_type is unknown. ie. the .frm file could not be opened --- mysql-test/r/show_check.result | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 20f695d9ac0..fdb0db602ff 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -512,6 +512,13 @@ t1 CREATE TABLE `t1` ( KEY `c2` USING BTREE (`c2`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +flush tables; +SHOW TABLE STATUS like 't1'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm' +show create table t1; +ERROR HY000: Incorrect information in file: './test/t1.frm' +drop table t1; CREATE TABLE txt1(a int); CREATE TABLE tyt2(a int); CREATE TABLE urkunde(a int); @@ -557,10 +564,3 @@ DROP TABLE tyt2; DROP TABLE urkunde; SHOW TABLES FROM non_existing_database; ERROR 42000: Unknown database 'non_existing_database' -flush tables; -SHOW TABLE STATUS like 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm' -show create table t1; -ERROR HY000: Incorrect information in file: './test/t1.frm' -drop table t1; -- cgit v1.2.1