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: