summaryrefslogtreecommitdiff
path: root/mysql-test/t/show_check.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r--mysql-test/t/show_check.test81
1 files changed, 47 insertions, 34 deletions
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index f4e0b906f60..51029e376b1 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -1,6 +1,9 @@
# Uses GRANT commands that usually disabled in embedded server
-- source include/not_embedded.inc
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
#
# Test of some show commands
#
@@ -33,7 +36,7 @@ check table t1 medium;
check table t1 extended;
show index from t1;
--disable_metadata
---error 1062
+--error ER_DUP_ENTRY
insert into t1 values (5,5,5);
--echo -- Here we enable metadata just to check that the collation of the
@@ -191,14 +194,14 @@ show columns from t1;
drop table t1;
#
-# Test for Bug #2593 "SHOW CREATE TABLE doesn't properly double quotes"
+# Test for Bug#2593 SHOW CREATE TABLE doesn't properly double quotes
#
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
+--error ER_WRONG_TABLE_NAME
CREATE TABLE `a/b` (i INT);
# the above test should WORK when WL#1324 is done,
# it should be removed and
@@ -224,7 +227,7 @@ CREATE TABLE `a/b` (i INT);
#SHOW CREATE TABLE """a";
#DROP TABLE """a";
#
-#Bug #4374 SHOW TABLE STATUS FROM ignores collation_connection
+#Bug#4374 SHOW TABLE STATUS FROM ignores collation_connection
#set names latin1;
#create database `Д`;
#create table `Д`.`Д` (a int) engine=heap;
@@ -252,7 +255,7 @@ 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."
+# Test for Bug#2719 Heap tables status shows wrong or missing data.
#
select @@max_heap_table_size;
@@ -313,7 +316,7 @@ show table status;
drop table t1, t2, t3;
#
-# Test for bug #3342 SHOW CREATE DATABASE seems to require DROP privilege
+# Test for Bug#3342 SHOW CREATE DATABASE seems to require DROP privilege
#
create database mysqltest;
@@ -328,36 +331,39 @@ connect (con1,localhost,mysqltest_1,,mysqltest);
connection con1;
select * from t1;
show create database mysqltest;
---error 1142
+--error ER_TABLEACCESS_DENIED_ERROR
drop table t1;
---error 1044
+--error ER_DBACCESS_DENIED_ERROR
drop database mysqltest;
+disconnect con1;
connect (con2,localhost,mysqltest_2,,test);
connection con2;
---error 1142
+--error ER_TABLEACCESS_DENIED_ERROR
select * from mysqltest.t1;
---error 1044
+--error ER_DBACCESS_DENIED_ERROR
show create database mysqltest;
---error 1142
+--error ER_TABLEACCESS_DENIED_ERROR
drop table mysqltest.t1;
---error 1044
+--error ER_DBACCESS_DENIED_ERROR
drop database mysqltest;
+disconnect con2;
connect (con3,localhost,mysqltest_3,,test);
connection con3;
---error 1142
+--error ER_TABLEACCESS_DENIED_ERROR
select * from mysqltest.t1;
---error 1044
+--error ER_DBACCESS_DENIED_ERROR
show create database mysqltest;
drop table mysqltest.t1;
drop database mysqltest;
+disconnect con3;
connection default;
set names binary;
-delete from mysql.user
+delete from mysql.user
where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
-delete from mysql.db
+delete from mysql.db
where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
flush privileges;
@@ -371,7 +377,7 @@ flush privileges;
#drop database `Д`;
# Test that USING <keytype> is always shown in SHOW CREATE TABLE when it was
-# specified during table creation, but not otherwise. (Bug #7235)
+# specified during table creation, but not otherwise. (Bug#7235)
CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY;
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -402,7 +408,7 @@ ALTER TABLE t1 ENGINE=MEMORY;
SHOW CREATE TABLE t1;
DROP TABLE t1;
-# Test for BUG#9439 "Reporting wrong datatype for sub_part on show index"
+# Test for Bug#9439 Reporting wrong datatype for sub_part on show index
CREATE TABLE t1(
field1 text NOT NULL,
PRIMARY KEY(field1(1000))
@@ -412,7 +418,7 @@ show index from t1;
--disable_metadata
drop table t1;
-# Test for BUG#11635: mysqldump exports TYPE instead of USING for HASH
+# Test for Bug#11635 mysqldump exports TYPE instead of USING for HASH
create table t1 (
c1 int NOT NULL,
c2 int NOT NULL,
@@ -422,7 +428,7 @@ 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
+# Test for Bug#93 4.1 protocl crash on corupted frm and SHOW TABLE STATUS
flush tables;
@@ -430,7 +436,7 @@ flush tables;
system echo "this is a junk file for test" >> $MYSQLTEST_VARDIR/master-data/test/t1.frm ;
--replace_column 6 # 7 # 8 # 9 #
SHOW TABLE STATUS like 't1';
---error 1033
+--error ER_NOT_FORM_FILE
show create table t1;
drop table t1;
@@ -438,7 +444,7 @@ drop table t1;
--echo End of 4.1 tests
#
-# BUG 12183 - SHOW OPEN TABLES behavior doesn't match grammar
+# Bug#12183 SHOW OPEN TABLES behavior doesn't match grammar
# First we close all open tables with FLUSH tables and then we open some.
CREATE TABLE txt1(a int);
CREATE TABLE tyt2(a int);
@@ -456,14 +462,14 @@ DROP TABLE txt1;
DROP TABLE tyt2;
DROP TABLE urkunde;
#
-# BUG #12591 (SHOW TABLES FROM dbname produces wrong error message)
+# Bug#12591 SHOW TABLES FROM dbname produces wrong error message
#
---error 1049
+--error ER_BAD_DB_ERROR
SHOW TABLES FROM non_existing_database;
#
-# Bug#17203: "sql_no_cache sql_cache" in views created from prepared
+# Bug#17203 "sql_no_cache sql_cache" in views created from prepared
# statement
#
# The problem was that initial user setting was forgotten, and current
@@ -543,7 +549,7 @@ SHOW COLUMNS FROM no_such_table;
#
-# Bug #19764: SHOW commands end up in the slow log as table scans
+# Bug#19764 SHOW commands end up in the slow log as table scans
#
flush status;
show status like 'slow_queries';
@@ -555,8 +561,8 @@ select 1 from information_schema.tables limit 1;
show status like 'slow_queries';
#
-# BUG#10491: Server returns data as charset binary SHOW CREATE TABLE or SELECT
-# FROM I_S.
+# BUG#10491 Server returns data as charset binary SHOW CREATE TABLE or SELECT
+# FROM I_S.
#
#
@@ -671,7 +677,7 @@ SHOW TRIGGERS LIKE 't1';
--echo ----------------------------------------------------------------
-SELECT
+SELECT
TRIGGER_CATALOG,
TRIGGER_SCHEMA,
TRIGGER_NAME,
@@ -794,10 +800,12 @@ CREATE TABLE t1(колонка1 INT);
# Check:
# - Dump mysqltest1;
+--let $outfile1=$MYSQLTEST_VARDIR/tmp/show_check.mysqltest1.sql
+
--echo
---echo ---> Dumping mysqltest1 to show_check.mysqltest1.sql
+--echo ---> Dumping mysqltest1 to outfile1
---exec $MYSQL_DUMP --default-character-set=latin1 --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $MYSQLTEST_VARDIR/tmp/show_check.mysqltest1.sql
+--exec $MYSQL_DUMP --default-character-set=latin1 --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $outfile1
# - Clean mysqltest1;
@@ -812,7 +820,8 @@ DROP DATABASE mysqltest1;
--echo
--echo ---> Restoring mysqltest1...
---exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/show_check.mysqltest1.sql
+--exec $MYSQL test < $outfile1
+--remove_file $outfile1
# - Check definition of the table.
@@ -824,7 +833,7 @@ DROP DATABASE mysqltest1;
use test;
#
-# Bug #28808: log_queries_not_using_indexes variable dynamic change is ignored
+# Bug#28808 log_queries_not_using_indexes variable dynamic change is ignored
#
flush status;
show variables like "log_queries_not_using_indexes";
@@ -840,7 +849,7 @@ select 1 from information_schema.tables limit 1;
show status like 'slow_queries';
#
-# Bug #30088: Can't disable myisam-recover by a value of ""
+# Bug#30088 Can't disable myisam-recover by a value of ""
#
show variables like 'myisam_recover_options';
@@ -865,3 +874,7 @@ show create table t1;
drop table t1;
--echo End of 5.0 tests
+
+# Wait till all disconnects are completed
+--source include/wait_until_count_sessions.inc
+