From 7b626ab7caeab4d6951a89074d83296ab81621bb Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 5 Mar 2004 17:57:36 +0400 Subject: [PATCH 1/2] commented testcases in show_check.test with quotation marks in table name to avoid troubles with OS which don't support these symbols in file name used create table 'a/b' as hook for WL#1324 which should fix this problem mysql-test/r/show_check.result: commented testcases with quotation marks in table name to avoid troubles with OS which don't support these symbols in file name used create table 'a/b' as hook for WL#1324 which should fix this problem mysql-test/t/show_check.test: commented testcases with quotation marks in table name to avoid troubles with OS which don't support these symbols in file name used create table 'a/b' as hook for WL#1324 which should fix this problem --- mysql-test/r/show_check.result | 43 +++++++---------------------- mysql-test/t/show_check.test | 49 +++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 52 deletions(-) diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 6a08dca213c..d77bcb8ab7a 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -265,39 +265,13 @@ c decimal(4,3) YES NULL d double(4,3) YES NULL f float(4,3) YES NULL drop table t1; -SET sql_mode=''; -SET sql_quote_show_create=OFF; -CREATE TABLE ```ab``cd``` (i INT); -SHOW CREATE TABLE ```ab``cd```; -Table Create Table -`ab`cd` CREATE TABLE ```ab``cd``` ( - i int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE ```ab``cd```; -CREATE TABLE ```ab````cd``` (i INT); -SHOW CREATE TABLE ```ab````cd```; -Table Create Table -`ab``cd` CREATE TABLE ```ab````cd``` ( - i int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE ```ab````cd```; -CREATE TABLE ```a` (i INT); -SHOW CREATE TABLE ```a`; -Table Create Table -`a CREATE TABLE ```a` ( - i int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE ```a`; -SET sql_mode='ANSI_QUOTES'; -CREATE TABLE """a" (i INT); -SHOW CREATE TABLE """a"; -Table Create Table -"a CREATE TABLE """a" ( - i int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE """a"; -SET sql_mode=''; -SET sql_quote_show_create=OFF; +SET @old_sql_mode= @@sql_mode, sql_mode= ''; +SET @old_sql_quote_show_create= @@sql_quote_show_create, sql_quote_show_create= OFF; +CREATE TABLE `a/b` (i INT); +ERROR 42000: Incorrect table name 'a/b' +SET sql_mode= 'ANSI_QUOTES'; +SET sql_mode= ''; +SET sql_quote_show_create= OFF; CREATE TABLE t1 (i INT); SHOW CREATE TABLE t1; Table Create Table @@ -312,7 +286,8 @@ table CREATE TABLE `table` ( i int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE `table`; -SET sql_quote_show_create=ON; +SET sql_quote_show_create= @old_sql_quote_show_create; +SET sql_mode= @old_sql_mode; select @@max_heap_table_size; @@max_heap_table_size 1047552 diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 935e472c4a1..4fcf995f248 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -147,31 +147,43 @@ drop table t1; # Test for Bug #2593 "SHOW CREATE TABLE doesn't properly double quotes" # -SET sql_mode=''; -SET sql_quote_show_create=OFF; +SET @old_sql_mode= @@sql_mode, sql_mode= ''; +SET @old_sql_quote_show_create= @@sql_quote_show_create, sql_quote_show_create= OFF; -CREATE TABLE ```ab``cd``` (i INT); -SHOW CREATE TABLE ```ab``cd```; -DROP TABLE ```ab``cd```; +######### hook for WL#1324 # +--error 1103 +CREATE TABLE `a/b` (i INT); +# the above test should WORK when WL#1324 is done, +# it should be removed and +# the following part should be uncommented then +######################################################### +# begin of part that must be uncommented when WL#1324 is done +######################################################### +#CREATE TABLE ```ab``cd``` (i INT); +#SHOW CREATE TABLE ```ab``cd```; +#DROP TABLE ```ab``cd```; -CREATE TABLE ```ab````cd``` (i INT); -SHOW CREATE TABLE ```ab````cd```; -DROP TABLE ```ab````cd```; +#CREATE TABLE ```ab````cd``` (i INT); +#SHOW CREATE TABLE ```ab````cd```; +#DROP TABLE ```ab````cd```; -CREATE TABLE ```a` (i INT); -SHOW CREATE TABLE ```a`; -DROP TABLE ```a`; +#CREATE TABLE ```a` (i INT); +#SHOW CREATE TABLE ```a`; +#DROP TABLE ```a`; -SET sql_mode='ANSI_QUOTES'; +SET sql_mode= 'ANSI_QUOTES'; -CREATE TABLE """a" (i INT); -SHOW CREATE TABLE """a"; -DROP TABLE """a"; +#CREATE TABLE """a" (i INT); +#SHOW CREATE TABLE """a"; +#DROP TABLE """a"; +######################################################### +# end of part that must be uncommented when WL#1324 is done +######################################################### # to test quotes around keywords.. : -SET sql_mode=''; -SET sql_quote_show_create=OFF; +SET sql_mode= ''; +SET sql_quote_show_create= OFF; CREATE TABLE t1 (i INT); SHOW CREATE TABLE t1; @@ -181,7 +193,8 @@ CREATE TABLE `table` (i INT); SHOW CREATE TABLE `table`; DROP TABLE `table`; -SET sql_quote_show_create=ON; +SET sql_quote_show_create= @old_sql_quote_show_create; +SET sql_mode= @old_sql_mode; # # Test for bug #2719 "Heap tables status shows wrong or missing data." From d2b3d9bbff4cba02c0633ce184590380a4525537 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 6 Mar 2004 20:00:54 +0400 Subject: [PATCH 2/2] corrected spelling error horisontal->horizontal into client/mysqltest.c client/mysqltest.c: corrected spelling error horisontal->horizontal --- client/mysqltest.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 178e4b11697..f30af82dabd 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -215,8 +215,8 @@ Q_REQUIRE_VERSION, Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS, Q_ENABLE_INFO, Q_DISABLE_INFO, Q_EXEC, Q_DELIMITER, -Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORISONTAL_RESULTS, -Q_QUERY_VERTICAL, Q_QUERY_HORISONTAL, +Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS, +Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ @@ -291,9 +291,9 @@ const char *command_names[]= "exec", "delimiter", "vertical_results", - "horisontal_results", + "horizontal_results", "query_vertical", - "query_horisontal", + "query_horizontal", 0 }; @@ -2581,7 +2581,7 @@ int main(int argc, char **argv) delimiter_length= strlen(delimiter); break; case Q_DISPLAY_VERTICAL_RESULTS: display_result_vertically= TRUE; break; - case Q_DISPLAY_HORISONTAL_RESULTS: + case Q_DISPLAY_HORIZONTAL_RESULTS: display_result_vertically= FALSE; break; case Q_LET: do_let(q); break; case Q_EVAL_RESULT: eval_result = 1; break; @@ -2590,7 +2590,7 @@ int main(int argc, char **argv) q->query= q->first_argument; /* fall through */ case Q_QUERY_VERTICAL: - case Q_QUERY_HORISONTAL: + case Q_QUERY_HORIZONTAL: { my_bool old_display_result_vertically= display_result_vertically; if (!q->query[q->first_word_len]) @@ -2605,7 +2605,7 @@ int main(int argc, char **argv) switch(q->type) { case Q_QUERY_VERTICAL: display_result_vertically= TRUE; break; - case Q_QUERY_HORISONTAL: display_result_vertically= FALSE; break; + case Q_QUERY_HORIZONTAL: display_result_vertically= FALSE; break; } error |= run_query(&cur_con->mysql, q, QUERY_REAP|QUERY_SEND); display_result_vertically= old_display_result_vertically;