2003-02-14 10:47:41 +01:00
|
|
|
#
|
|
|
|
# Test of replicating user variables
|
|
|
|
#
|
2003-01-30 18:39:54 +01:00
|
|
|
source include/master-slave.inc;
|
2003-02-14 10:47:41 +01:00
|
|
|
|
2003-01-30 18:39:54 +01:00
|
|
|
create table t1(n char(30));
|
|
|
|
set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1;
|
|
|
|
set @s1:='This is a test', @r1:=12.5, @r2:=-12.5;
|
|
|
|
set @n1:=null;
|
|
|
|
set @s2:='', @s3:='abc\'def', @s4:= 'abc\\def', @s5:= 'abc''def';
|
|
|
|
insert into t1 values (@i1), (@i2), (@i3), (@i4);
|
|
|
|
insert into t1 values (@r1), (@r2);
|
|
|
|
insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5);
|
|
|
|
insert into t1 values (@n1);
|
|
|
|
insert into t1 values (@n2);
|
|
|
|
insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1);
|
|
|
|
insert into t1 values (@a+(@b:=@a+1));
|
|
|
|
set @q:='abc';
|
|
|
|
insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'));
|
|
|
|
set @a:=5;
|
|
|
|
insert into t1 values (@a),(@a);
|
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
|
|
|
sync_with_master;
|
|
|
|
select * from t1;
|
|
|
|
show binlog events from 141;
|
|
|
|
connection master;
|
|
|
|
drop table t1;
|
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
|
|
|
sync_with_master;
|
|
|
|
stop slave;
|