diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2004-02-07 00:57:22 +0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2004-02-07 00:57:22 +0400 |
commit | dfbaa16160a82b7e70603ba89e76804ba771b7e1 (patch) | |
tree | 080f911b45cb35aca965ab193d7aab3fcd859474 /mysql-test/t/show_check.test | |
parent | 03f098d57e194ea363b1985a9e2df955a312baab (diff) | |
download | mariadb-git-dfbaa16160a82b7e70603ba89e76804ba771b7e1.tar.gz |
1. fixed bug @2593 "SHOW CREATE TABLE doesn't properly double quotes"
2. added automatic quotation of keywords in SHOW CREATE TABLE
mysql-test/r/show_check.result:
added tests for
bug #2593 "SHOW CREATE TABLE doesn't properly double quotas"
and for automatic quotation of keywords
mysql-test/t/show_check.test:
added tests for
bug #2593 "SHOW CREATE TABLE doesn't properly double quotas"
and for automatic quotation of keywords
sql/mysql_priv.h:
added declaration of function is_keyword
sql/sql_lex.cc:
added implementation of function is_keyword
sql/sql_show.cc:
changed function append_identifier and it's subfunctions
1. fixed bug @2593 "SHOW CREATE TABLE doesn't properly double quotes"
2. added automatic quotation of keywords
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r-- | mysql-test/t/show_check.test | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index d262f02c978..1d64cfd2105 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -142,3 +142,43 @@ drop table t1; create table t1 (c decimal(3,3), d double(3,3), f float(3,3)); show columns from t1; drop table t1; + +# +# Test for Bug #2593 "SHOW CREATE TABLE doesn't properly double quotes" +# + +SET sql_mode=''; +SET sql_quote_show_create=OFF; + +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`; + +SET sql_mode='ANSI_QUOTES'; + +CREATE TABLE """a" (i INT); +SHOW CREATE TABLE """a"; +DROP TABLE """a"; + +# to test quotes around keywords.. : + +SET sql_mode=''; +SET sql_quote_show_create=OFF; + +CREATE TABLE t1 (i INT); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE `table` (i INT); +SHOW CREATE TABLE `table`; +DROP TABLE `table`; + +SET sql_quote_show_create=ON; |