Loading include/mysqld_error.h +3 −1 Original line number Diff line number Diff line Loading @@ -208,4 +208,6 @@ #define ER_LOCK_WAIT_TIMEOUT 1205 #define ER_LOCK_TABLE_FULL 1206 #define ER_READ_ONLY_TRANSACTION 1207 #define ER_ERROR_MESSAGES 208 #define ER_DROP_DB_WITH_READ_LOCK 1208 #define ER_CREATE_DB_WITH_READ_LOCK 1209 #define ER_ERROR_MESSAGES 210 mysql-test/r/drop.result +7 −0 Original line number Diff line number Diff line n 1 Database foo mysql test Database mysql test mysql-test/r/flush.result +2 −0 Original line number Diff line number Diff line n 3 n 23 n 345 mysql-test/t/drop.test +13 −0 Original line number Diff line number Diff line Loading @@ -10,3 +10,16 @@ insert into t1 values(2); create table t1(n int); drop table t1; select * from t1; drop database if exists foo; flush tables with read lock; --error 1209 create database foo; unlock tables; create database foo; show databases; flush tables with read lock; --error 1208 drop database foo; unlock tables; drop database foo; show databases; mysql-test/t/flush.test +15 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,21 @@ unlock tables; connection con1; reap; #test if drop database will wait until we release the global read lock connection con1; drop database if exists foo; create database foo; create table foo.t1(n int); insert into foo.t1 values (23); flush tables with read lock; connection con2; send drop database foo; connection con1; select * from foo.t1; unlock tables; connection con2; reap; # test if dirty close releases global read lock connection con1; create table t1 (n int); Loading Loading
include/mysqld_error.h +3 −1 Original line number Diff line number Diff line Loading @@ -208,4 +208,6 @@ #define ER_LOCK_WAIT_TIMEOUT 1205 #define ER_LOCK_TABLE_FULL 1206 #define ER_READ_ONLY_TRANSACTION 1207 #define ER_ERROR_MESSAGES 208 #define ER_DROP_DB_WITH_READ_LOCK 1208 #define ER_CREATE_DB_WITH_READ_LOCK 1209 #define ER_ERROR_MESSAGES 210
mysql-test/r/drop.result +7 −0 Original line number Diff line number Diff line n 1 Database foo mysql test Database mysql test
mysql-test/t/drop.test +13 −0 Original line number Diff line number Diff line Loading @@ -10,3 +10,16 @@ insert into t1 values(2); create table t1(n int); drop table t1; select * from t1; drop database if exists foo; flush tables with read lock; --error 1209 create database foo; unlock tables; create database foo; show databases; flush tables with read lock; --error 1208 drop database foo; unlock tables; drop database foo; show databases;
mysql-test/t/flush.test +15 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,21 @@ unlock tables; connection con1; reap; #test if drop database will wait until we release the global read lock connection con1; drop database if exists foo; create database foo; create table foo.t1(n int); insert into foo.t1 values (23); flush tables with read lock; connection con2; send drop database foo; connection con1; select * from foo.t1; unlock tables; connection con2; reap; # test if dirty close releases global read lock connection con1; create table t1 (n int); Loading