summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_alter.test
blob: 6b8cf773150550df3a7318e2c1a70b4bbca88a01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
source include/master-slave.inc;
--disable_warnings
drop database if exists test_$1;
--enable_warnings
create database test_$1;

create table test_$1.t1 ( n int);
alter table test_$1.t1 add m int;
insert into test_$1.t1 values (1,2);
create table test_$1.t2 (n int);
insert into test_$1.t2 values (45);
rename table test_$1.t2 to test_$1.t3, test_$1.t1 to test_$1.t2;
save_master_pos;
connection slave;
sync_with_master;
select * from test_$1.t2;
select * from test_$1.t3;
connection master;
drop database test_$1;
save_master_pos;
connection slave;
sync_with_master;