Debian Codegraph @

mysql-test/suite/rpl_nogtid/t/rpl_trigger_myisam.test

raw
1 #
2 # Test of triggers with replication
3 # Adding statement include due to Bug 12574
4 # TODO: Remove statement include once 12574 is patched
5 --source include/have_binlog_format_mixed_or_statement.inc
6 --source include/master-slave.inc
7 --source include/force_myisam_default.inc
8 --source include/have_myisam.inc
9
10 disable_query_log;
11 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
12 --connection slave
13 call mtr.add_suppression("Either event.*is from an old source");
14 call mtr.add_suppression("No definer attribute for trigger*");
15 #
16 # Since WL#7896 gets rid of SUID triggers it is necessary to suppress the following warning.
17 # This warning is issued by slave from the function sql_slave_killed() when
18 # an error happen during applying statement and there are slave parallel workers.
19 # For case when the statement CREATE TRIGGER without specified DEFINER clause is applied
20 # on the slave the error ER_TRG_NO_DEFINER is issued that causes the following warning
21 # be emitted.
22 #
23 call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
24 --connection master
25 enable_query_log;
26
27 --disable_warnings
28 DROP TABLE IF EXISTS t1;
29
30 --enable_warnings
31
32 #
33 # Bug#40116: Uncommited changes are replicated and stay on slave after
34 # rollback on master
35 #
36
37 connection master;
38 --source include/rpl_reset.inc
39
40 connection slave;
41
42 connection master;
43 create table t1 ( f int ) engine = innodb;
44 create table log ( r int ) engine = myisam;
45 create trigger tr
46 after insert on t1
47 for each row insert into log values ( new.f );
48
49 set autocommit = 0;
50 --disable_warnings
51 insert into t1 values ( 1 );
52 --enable_warnings
53 rollback;
54 --source include/sync_slave_sql_with_master.inc
55
56 let $diff_tables= master:t1, slave:t1;
57 --source include/diff_tables.inc
58
59 let $diff_tables= master:log, slave:log;
60 --source include/diff_tables.inc
61
62 connection master;
63 drop table t1, log;
64 --source include/sync_slave_sql_with_master.inc
65
66 #
67 # End of tests
68 #
69 --source include/rpl_end.inc