2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
create table t2 (n int, PRIMARY KEY(n));
8
create temporary table t1 (n int);
9
create temporary table t3 (n int not null);
10
insert into t1 values(1),(2),(3),(100),(25),(26),(200),(300);
11
insert into t2 select * from t1;
12
alter table t3 add primary key(n);
14
insert into t3 values (1010);
15
insert into t2 select * from t3;
16
drop table if exists t3;
17
insert into t2 values (1012);
18
create temporary table t1 (n int);
19
insert into t1 values (4),(5);
20
insert into t2 select * from t1;
21
insert into t2 values(61);
37
select count(*) from t2;
40
select sum(n) from t2;
43
show status like 'Slave_open_temp_tables';
45
Slave_open_temp_tables 0
46
drop table if exists t1,t2;
48
Note 1051 Unknown table 't1'