1
by brian
clean slate |
1 |
stop slave;
|
2 |
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
3 |
reset master;
|
|
4 |
reset slave;
|
|
5 |
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
6 |
start slave;
|
|
7 |
create table t1(n int auto_increment primary key, s char(10));
|
|
8 |
insert into t1 values (2,'old');
|
|
9 |
insert into t1 values(NULL,'new');
|
|
10 |
insert into t1 values(NULL,'new');
|
|
11 |
select * from t1 order by n;
|
|
12 |
n s
|
|
13 |
1 new
|
|
14 |
2 old
|
|
15 |
delete from t1 where n = 2;
|
|
16 |
start slave;
|
|
17 |
stop slave;
|
|
18 |
create table t2(n int);
|
|
19 |
drop table t2;
|
|
20 |
insert into t1 values(NULL,'new');
|
|
21 |
set sql_log_bin=0;
|
|
22 |
insert into t1 values(NULL,'new');
|
|
23 |
set sql_log_bin=1;
|
|
24 |
delete from t1 where n=4;
|
|
25 |
start slave;
|
|
26 |
select * from t1 order by n;
|
|
27 |
n s
|
|
28 |
1 new
|
|
29 |
2 new
|
|
30 |
3 new
|
|
31 |
drop table t1;
|