Bug #12610 Insert statements inside "after insert" function are not replicated (RBR)
Submitted: 16 Aug 2005 19:19 Modified: 17 Aug 2005 17:19
Reporter: Jonathan Miller Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.0-wl1012 OS:Linux (Linux)
Assigned to: Assigned Account CPU Architecture:Any

[16 Aug 2005 19:19] Jonathan Miller
Description:
CREATE TABLE test.t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id));
CREATE TABLE test.t2 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id));
CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW BEGIN
INSERT INTO test.t1 VALUES(NULL,0,'Testing MySQL databases is a dream job come true', 'Theonlyjobbetteristestingdarkbeerprague',12345.34,12.51,0,1965,NOW());
UPDATE test.t2 SET f = ROUND(f);
END|
INSERT INTO test.t1 VALUES(NULL,1,'Testing MySQL databases is a cool ', 'Must make it good for the customer',654321.4321,15.21,0,1965,NOW());
INSERT INTO test.t2 VALUES(NULL,01,'Testing MySQL databases is a cool ', 'Must make it good for the customer',654321.4321,15.21,0,1965,NOW());

From master:
select * from test.t1;
id      b1      vc      bc      d       f       total   y       t
1              Testing MySQL databases is a cool       Must make it good for the customer      654321.4321     15.21   0       1965    2005-08-16 22:05:10
2              Testing MySQL databases is a dream job come true        Theonlyjobbetteristestingdarkbeerprague 12345.3400      12.51   0       1965    2005-08-16 22:05:10

From slave:
select * from test.t1;
id      b1      vc      bc      d       f       total   y       t
1              Testing MySQL databases is a cool       Must make it good for the customer      654321.4321     15.21   0       1965    2005-08-16 22:05:10

How to repeat:
see above:
[17 Aug 2005 17:19] Jonathan Miller
12606