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 |
drop database if exists mysqltest;
|
|
8 |
create database mysqltest;
|
|
9 |
create table mysqltest.t1 ( n int);
|
|
10 |
alter table mysqltest.t1 add m int;
|
|
11 |
insert into mysqltest.t1 values (1,2);
|
|
12 |
create table mysqltest.t2 (n int);
|
|
13 |
insert into mysqltest.t2 values (45);
|
|
14 |
rename table mysqltest.t2 to mysqltest.t3, mysqltest.t1 to mysqltest.t2;
|
|
15 |
select * from mysqltest.t2;
|
|
16 |
n m
|
|
17 |
1 2
|
|
18 |
select * from mysqltest.t3;
|
|
19 |
n
|
|
20 |
45
|
|
21 |
drop database mysqltest;
|