1include/master-slave.inc 2[connection master] 3connection master; 4DROP TRIGGER test.t1_bi_t2; 5DROP TABLE IF EXISTS test.t1; 6DROP TABLE IF EXISTS test.t2; 7CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=INNODB; 8CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=INNODB; 9CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// 10INSERT INTO test.t2 VALUES (1, 0.0); 11INSERT INTO test.t2 VALUES (1, 0.0); 12ERROR 23000: Duplicate entry '1' for key 'PRIMARY' 13select * from test.t1; 14n d 151 1.234 16select * from test.t2; 17n f 181 0 19connection slave; 20connection slave; 21select * from test.t1; 22n d 231 1.234 24select * from test.t2; 25n f 261 0 27connection master; 28DROP TRIGGER test.t1_bi_t2; 29DROP TABLE test.t1; 30DROP TABLE test.t2; 31connection slave; 32include/rpl_end.inc 33