diff options
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r-- | mysql-test/t/show_check.test | 86 |
1 files changed, 54 insertions, 32 deletions
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 52d262677ff..9cfe85d3bd4 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -2,6 +2,10 @@ # embedded server testing -- source include/not_embedded.inc +# check that CSV engine was compiled in, as the result of the test +# depends on the presence of the log tables (which are CSV-based). +--source include/have_csv.inc + # # Test of some show commands # @@ -162,33 +166,28 @@ drop table t1; SET @old_sql_mode= @@sql_mode, sql_mode= ''; SET @old_sql_quote_show_create= @@sql_quote_show_create, sql_quote_show_create= OFF; -######### 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 ```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"; -# +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.1` (i INT); +SHOW CREATE TABLE `a.1`; +DROP TABLE `a.1`; + +SET sql_mode= 'ANSI_QUOTES'; + +CREATE TABLE """a" (i INT); +SHOW CREATE TABLE """a"; +DROP TABLE """a"; + #Bug #4374 SHOW TABLE STATUS FROM ignores collation_connection #set names latin1; #create database `ä`; @@ -196,9 +195,6 @@ CREATE TABLE `a/b` (i INT); #--replace_column 7 # 8 # 9 # #show table status from `ä` LIKE 'ä'; #drop database `ä`; -######################################################### -# end of part that must be uncommented when WL#1324 is done -######################################################### # to test quotes around keywords.. : @@ -313,7 +309,6 @@ connect (con3,localhost,mysqltest_3,,test); connection con3; --error 1142 select * from mysqltest.t1; ---error 1044 show create database mysqltest; drop table mysqltest.t1; drop database mysqltest; @@ -397,7 +392,8 @@ system echo "this is a junk file for test" >> $MYSQLTEST_VARDIR/master-data/test SHOW TABLE STATUS like 't1'; --error 1033 show create table t1; -drop table t1; +drop table if exists t1; +system rm -f var/master-data/test/t1.frm ; # End of 4.1 tests @@ -424,3 +420,29 @@ DROP TABLE urkunde; # --error 1049 SHOW TABLES FROM non_existing_database; + +# End of 4.1 tests + +--disable_result_log +SHOW AUTHORS; +--enable_result_log + +# +# Test for bug #9785 SELECT privilege for the whole database is needed to do SHOW CREATE DATABASE +# +create database mysqltest; +show create database mysqltest; +create table mysqltest.t1(a int); +insert into mysqltest.t1 values(1); +grant select on `mysqltest`.`t1` to mysqltest_4@localhost; +connect (con4,localhost,mysqltest_4,,mysqltest); +connection con4; +show create database mysqltest; +connection default; +delete from mysql.user where user='mysqltest_4'; +delete from mysql.db where user='mysqltest_4'; +delete from mysql.tables_priv where user='mysqltest_4'; +flush privileges; +drop database mysqltest; + +--echo End of 5.1 tests |