6
6
drop database if exists client_test_db;
9
--error ER_BAD_TABLE_ERROR
11
11
create table t1(n int);
12
12
insert into t1 values(1);
13
13
create temporary table t1( n int);
14
14
insert into t1 values(2);
15
--error ER_TABLE_EXISTS_ERROR
16
16
create table t1(n int);
37
37
# (tableN instead on tN)
40
--error ER_BAD_TABLE_ERROR
41
41
drop table table1, table2, table3, table4, table5, table6,
42
42
table7, table8, table9, table10, table11, table12, table13,
43
43
table14, table15, table16, table17, table18, table19, table20,
44
44
table21, table22, table23, table24, table25, table26, table27,
47
--error ER_BAD_TABLE_ERROR
48
48
drop table table1, table2, table3, table4, table5, table6,
49
49
table7, table8, table9, table10, table11, table12, table13,
50
50
table14, table15, table16, table17, table18, table19, table20,
57
57
# test drop/create database and FLUSH TABLES WITH READ LOCK
58
58
flush tables with read lock;
59
--error ER_DROP_DB_WITH_READ_LOCK, ER_CANT_UPDATE_WITH_READLOCK
60
60
create database mysqltest;
62
62
create database mysqltest;
64
64
flush tables with read lock;
65
--error ER_DROP_DB_WITH_READ_LOCK, ER_CANT_UPDATE_WITH_READLOCK
66
66
drop database mysqltest;
68
68
drop database mysqltest;
70
--error ER_DB_DROP_EXISTS
71
71
drop database mysqltest;
73
73
# test create table and FLUSH TABLES WITH READ LOCK
75
75
flush tables with read lock;
76
--error ER_CANT_UPDATE_WITH_READLOCK
77
77
create table t1(n int);
79
79
create table t1(n int);
87
# Test for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes
88
# server to crash". Crash (caused by failed assertion in 5.0 or by null
89
# pointer dereference in 5.1) happened when one ran SHOW OPEN TABLES
90
# while concurrently doing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE
91
# or any other command that takes name-lock) in other connection.
93
# Also includes test for similar bug#12212 "Crash that happens during
94
# removing of database name from cache" reappeared in 5.1 as bug#19403
95
# In its case crash happened when one concurrently executed DROP DATABASE
96
# and one of name-locking command.
99
drop database if exists mysqltest;
100
drop table if exists t1;
102
create table t1 (i int);
103
create database mysqltest;
104
connect (addconroot1, localhost, root,,);
106
connect (addconroot2, localhost, root,,);
107
# Server should not crash in any of the following statements
111
--send drop database mysqltest
114
connection addconroot1;
116
connection addconroot2;
118
disconnect addconroot1;
119
disconnect addconroot2;
85
122
--echo End of 5.0 tests
92
129
create table mysql_test.`#sql-347f_7` (f1 int);
93
130
create table mysql_test.`#sql-347f_8` (f1 int);
94
131
drop table mysql_test.`#sql-347f_8`;
132
## TODO: Uncommenting this causes drop database to fail, but I don't know that
133
# I care to fix it, since it's testing .frm implementation which is being
135
#copy_file $MYSQLTEST_VARDIR/master-data/mysql_test/t1.frm $MYSQLTEST_VARDIR/master-data/mysql_test/#sql-347f_6.frm;
95
136
drop database mysql_test;