2002-10-25 01:46:14 +02:00
|
|
|
stop slave;
|
2002-08-08 02:12:02 +02:00
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
2001-09-28 07:05:54 +02:00
|
|
|
reset master;
|
|
|
|
reset slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2005-12-22 06:39:02 +01:00
|
|
|
create table t2 (n int, PRIMARY KEY(n));
|
2001-09-28 07:05:54 +02:00
|
|
|
create temporary table t1 (n int);
|
2003-01-06 00:48:59 +01:00
|
|
|
create temporary table t3 (n int not null);
|
2005-12-22 06:39:02 +01:00
|
|
|
insert into t1 values(1),(2),(3),(100),(25),(26),(200),(300);
|
|
|
|
insert into t2 select * from t1;
|
2003-01-06 00:48:59 +01:00
|
|
|
alter table t3 add primary key(n);
|
2001-11-05 00:04:08 +01:00
|
|
|
flush logs;
|
2005-12-22 06:39:02 +01:00
|
|
|
insert into t3 values (1010);
|
2001-09-28 07:05:54 +02:00
|
|
|
insert into t2 select * from t3;
|
2003-01-06 00:48:59 +01:00
|
|
|
drop table if exists t3;
|
2005-12-22 06:39:02 +01:00
|
|
|
insert into t2 values (1012);
|
2001-09-28 07:05:54 +02:00
|
|
|
create temporary table t1 (n int);
|
|
|
|
insert into t1 values (4),(5);
|
|
|
|
insert into t2 select * from t1;
|
2005-12-22 06:39:02 +01:00
|
|
|
insert into t2 values(61);
|
2001-09-28 07:05:54 +02:00
|
|
|
select * from t2;
|
2000-12-27 02:31:06 +01:00
|
|
|
n
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
2005-12-22 06:39:02 +01:00
|
|
|
25
|
|
|
|
26
|
|
|
|
61
|
|
|
|
100
|
|
|
|
200
|
|
|
|
300
|
|
|
|
1010
|
|
|
|
1012
|
|
|
|
select count(*) from t2;
|
|
|
|
count(*)
|
|
|
|
13
|
|
|
|
select sum(n) from t2;
|
|
|
|
sum(n)
|
|
|
|
2749
|
2001-09-28 07:05:54 +02:00
|
|
|
show status like 'Slave_open_temp_tables';
|
2001-03-25 00:02:26 +01:00
|
|
|
Variable_name Value
|
|
|
|
Slave_open_temp_tables 0
|
2001-09-28 07:05:54 +02:00
|
|
|
drop table if exists t1,t2;
|
2003-01-06 00:48:59 +01:00
|
|
|
Warnings:
|
|
|
|
Note 1051 Unknown table 't1'
|