2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
8
DROP TABLE IF EXISTS test.t1;
9
DROP TABLE IF EXISTS test.t2;
10
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a));
11
CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a));
12
create function test.f1() RETURNS TIMESTAMP
14
UPDATE test.t1 SET t = CURRENT_TIMESTAMP;
15
RETURN CURRENT_TIMESTAMP;
17
INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP);
19
INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP);
21
INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP);
22
SET TIMESTAMP=333300000;
23
INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP);
24
DROP FUNCTION test.f1;