summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_drop_db.test
blob: 71dc22f705fd87db51a5d4b6bda29b66838ccc5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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 d1;
--enable_warnings
create database d1;
create table d1.t1 (n int);
insert into d1.t1 values (1);
select * from d1.t1 into outfile 'd1/f1.txt';
create table d1.t2 (n int);
create table d1.t3 (n int);
--error 1010
drop database d1;
use d1;
show tables;

# test the branch of the code that deals with the query buffer overflow

let $1=1000;
while ($1)
{
  eval create table d1.t$1(n int);
  dec $1;
}
--error 1010
drop database d1;
use d1;
show tables;
use test;
create table t1 (n int);
insert into t1 values (1234);
sync_slave_with_master;

connection slave;
use d1;
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/d1;