~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_stm_maria.test

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Test of Maria-specific replication bugs
 
2
 
 
3
--source include/have_maria.inc
 
4
--source include/have_binlog_format_mixed_or_statement.inc 
 
5
--source include/master-slave.inc
 
6
 
 
7
--disable_warnings
 
8
DROP TABLE IF EXISTS t1;
 
9
DROP TABLE IF EXISTS t2;
 
10
DROP TABLE IF EXISTS t3;
 
11
--enable_warnings
 
12
 
 
13
# This one taken from rpl_trigger.test (from BUG#12482)
 
14
# used to segfault slave in execution of row-based events
 
15
 
 
16
# Need an explicit ENGINE= clause as @@STORAGE_ENGINE is not replicated
 
17
create table t1 (a int auto_increment, primary key (a), b int,
 
18
rand_value double not null) engine=maria;
 
19
create table t2 (a int auto_increment, primary key (a), b int) engine=maria;
 
20
create table t3 (a int auto_increment, primary key (a), name
 
21
varchar(64) not null, old_a int, old_b int, rand_value double not
 
22
null) engine=maria;
 
23
 
 
24
delimiter |;
 
25
create trigger t1 before insert on t1 for each row
 
26
begin
 
27
 insert into t3 values (NULL, "t1", new.a, new.b, rand());
 
28
end|
 
29
 
 
30
create trigger t2 after insert on t2 for each row
 
31
begin
 
32
 insert into t3 values (NULL, "t2", new.a, new.b, rand());
 
33
end|
 
34
delimiter ;|
 
35
 
 
36
insert into t3 values(100,"log",0,0,0);
 
37
 
 
38
SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186;
 
39
 
 
40
insert into t1 values(1,1,rand()),(NULL,2,rand());
 
41
insert into t2 (b) values(last_insert_id());
 
42
insert into t2 values(3,0),(NULL,0);
 
43
insert into t2 values(NULL,0),(500,0);
 
44
 
 
45
select a,b, truncate(rand_value,4) from t1;
 
46
select * from t2;
 
47
select a,name, old_a, old_b, truncate(rand_value,4) from t3;
 
48
sync_slave_with_master;
 
49
connection master;
 
50
drop table t1,t2,t3;
 
51
sync_slave_with_master;