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 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