rpl_temporary.result 2.76 KB
Newer Older
1 2 3 4 5 6
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
7
reset master;
8 9
SET @save_select_limit=@@session.sql_select_limit;
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
serg@serg.mylan's avatar
serg@serg.mylan committed
10
ERROR 42000: Access denied; you need the SUPER privilege for this operation
11 12 13 14
SELECT @@session.sql_select_limit = @save_select_limit;
@@session.sql_select_limit = @save_select_limit
1
SET @@session.sql_select_limit=10, @@session.sql_log_bin=0;
serg@serg.mylan's avatar
serg@serg.mylan committed
15
ERROR 42000: Access denied; you need the SUPER privilege for this operation
16 17 18
SELECT @@session.sql_select_limit = @save_select_limit;
@@session.sql_select_limit = @save_select_limit
1
19 20 21 22
SET @@session.pseudo_thread_id=100;
SET @@session.pseudo_thread_id=connection_id();
SET @@session.sql_log_bin=0;
SET @@session.sql_log_bin=1;
23
drop table if exists t1,t2;
24 25 26
create table t1(f int);
create table t2(f int);
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
27
create temporary table t3(f int);
28
insert into t3 select * from t1 where f<6;
29
create temporary table t3(f int);
30 31 32 33 34
insert into t2 select count(*) from t3;
insert into t3 select * from t1 where f>=4;
drop temporary table t3;
insert into t2 select count(*) from t3;
drop temporary table t3;
35
select * from t2 ORDER BY f;
36 37 38
f
5
7
39
drop table t1, t2;
40 41 42 43 44 45 46 47 48
use test;
SET TIMESTAMP=1040323920;
create table t1(f int);
SET TIMESTAMP=1040323931;
create table t2(f int);
SET TIMESTAMP=1040323938;
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
SET TIMESTAMP=1040323945;
SET @@session.pseudo_thread_id=1;
49
create temporary table t3(f int);
50 51 52 53 54
SET TIMESTAMP=1040323952;
SET @@session.pseudo_thread_id=1;
insert into t3 select * from t1 where f<6;
SET TIMESTAMP=1040324145;
SET @@session.pseudo_thread_id=2;
55
create temporary table t3(f int);
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
SET TIMESTAMP=1040324186;
SET @@session.pseudo_thread_id=1;
insert into t2 select count(*) from t3;
SET TIMESTAMP=1040324200;
SET @@session.pseudo_thread_id=2;
insert into t3 select * from t1 where f>=4;
SET TIMESTAMP=1040324211;
SET @@session.pseudo_thread_id=1;
drop temporary table t3;
SET TIMESTAMP=1040324219;
SET @@session.pseudo_thread_id=2;
insert into t2 select count(*) from t3;
SET TIMESTAMP=1040324224;
SET @@session.pseudo_thread_id=2;
drop temporary table t3;
71
select * from t2 ORDER BY f;
72 73 74
f
5
7
75
drop table t1,t2;
76
create temporary table t3 (f int);
77 78 79 80 81 82 83 84 85 86 87 88 89 90
create temporary table t4 (f int);
create table t5 (f int);
drop table if exists t999;
create temporary table t999 (f int);
LOAD DATA INFILE "./var/tmp/bl_dump_thread_id" into table t999;
drop table t999;
insert into t4 values (1);
kill `select id from information_schema.processlist where command='Binlog Dump'`;
insert into t5 select * from t4;
select * from t5 /* must be 1 after reconnection */;
f
1
drop temporary table t4;
drop table t5;