diff options
Diffstat (limited to 'mysql-test/t/rpl_drop_db.test')
-rw-r--r-- | mysql-test/t/rpl_drop_db.test | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_drop_db.test b/mysql-test/t/rpl_drop_db.test new file mode 100644 index 00000000000..7b4a56910d6 --- /dev/null +++ b/mysql-test/t/rpl_drop_db.test @@ -0,0 +1,56 @@ +# test case for BUG#4680 -- if there are extra files in the db directory +# dropping the db on the master causes replication problems + +-- source include/master-slave.inc +connection master; + +--disable_warnings +drop database if exists mysqltest; +--enable_warnings +create database mysqltest; +create table mysqltest.t1 (n int); +insert into mysqltest.t1 values (1); +select * from mysqltest.t1 into outfile 'mysqltest/f1.txt'; +create table mysqltest.t2 (n int); +create table mysqltest.t3 (n int); +--error 1010 +drop database mysqltest; +use mysqltest; +show tables; + +# test the branch of the code that deals with the query buffer overflow + +disable_query_log; +let $1=50; +while ($1) +{ + eval create table mysqltest.mysql_test_long_table_name$1 (n int); + dec $1; +} +enable_query_log; +--error 1010 +drop database mysqltest; +use mysqltest; +show tables; +use test; +create table t1 (n int); +insert into t1 values (1234); +sync_slave_with_master; + +connection slave; +use mysqltest; +show tables; +use test; +select * from t1; + +connection master; +drop table t1; +sync_slave_with_master; + +#cleanup +connection slave; +stop slave; +system rm -rf var/master-data/mysqltest; + +# End of 4.1 tests + |