2000-12-07 15:54:59 +01:00
|
|
|
source include/master-slave.inc;
|
2001-01-17 13:47:33 +01:00
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
|
|
|
sync_with_master;
|
|
|
|
connection master;
|
2001-01-03 01:15:48 +01:00
|
|
|
drop table if exists t2;
|
|
|
|
create table t2(n int);
|
|
|
|
create temporary table t1 (n int);
|
|
|
|
insert into t1 values(1),(2),(3);
|
|
|
|
insert into t2 select * from t1;
|
2000-12-02 18:11:50 +01:00
|
|
|
connection master1;
|
2001-01-03 01:15:48 +01:00
|
|
|
create temporary table t1 (n int);
|
|
|
|
insert into t1 values (4),(5);
|
2001-11-28 02:20:24 +01:00
|
|
|
insert into t2 select * from t1 as t10;
|
2001-01-24 20:47:09 +01:00
|
|
|
save_master_pos;
|
2000-12-02 18:11:50 +01:00
|
|
|
disconnect master;
|
2001-01-24 20:47:09 +01:00
|
|
|
connection slave;
|
|
|
|
#add 1 to catch drop table
|
|
|
|
sync_with_master 1;
|
2000-12-02 18:11:50 +01:00
|
|
|
connection master1;
|
2001-01-03 01:15:48 +01:00
|
|
|
insert into t2 values(6);
|
2001-01-17 13:47:33 +01:00
|
|
|
save_master_pos;
|
2001-01-24 20:47:09 +01:00
|
|
|
disconnect master1;
|
2000-12-02 18:11:50 +01:00
|
|
|
connection slave;
|
2001-01-24 20:47:09 +01:00
|
|
|
# same trick to go one more event
|
|
|
|
sync_with_master 1;
|
2001-03-25 00:02:26 +01:00
|
|
|
select * from t2;
|
|
|
|
show status like 'Slave_open_temp_tables';
|
2001-01-03 01:15:48 +01:00
|
|
|
#
|
|
|
|
# Clean up
|
|
|
|
#
|
2001-03-25 00:02:26 +01:00
|
|
|
connect (master2,localhost,root,,);
|
2001-01-03 01:15:48 +01:00
|
|
|
connection master2;
|
|
|
|
drop table if exists t1,t2;
|
2001-01-17 13:47:33 +01:00
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
|
|
|
sync_with_master;
|