1
by brian
clean slate |
1 |
stop slave;
|
2 |
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
3 |
reset master;
|
|
4 |
reset slave;
|
|
5 |
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
6 |
start slave;
|
|
7 |
DROP TRIGGER test.t1_bi_t2;
|
|
8 |
DROP TABLE IF EXISTS test.t1;
|
|
9 |
DROP TABLE IF EXISTS test.t2;
|
|
10 |
CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=INNODB;
|
|
11 |
CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=INNODB;
|
|
12 |
CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)//
|
|
13 |
INSERT INTO test.t2 VALUES (1, 0.0);
|
|
14 |
INSERT INTO test.t2 VALUES (1, 0.0);
|
|
15 |
Got one of the listed errors
|
|
16 |
select * from test.t1;
|
|
17 |
n d
|
|
18 |
1 1.234
|
|
19 |
select * from test.t2;
|
|
20 |
n f
|
|
21 |
1 0
|
|
22 |
select * from test.t1;
|
|
23 |
n d
|
|
24 |
1 1.234
|
|
25 |
select * from test.t2;
|
|
26 |
n f
|
|
27 |
1 0
|
|
28 |
DROP TRIGGER test.t1_bi_t2;
|
|
29 |
DROP TABLE test.t1;
|
|
30 |
DROP TABLE test.t2;
|