Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/innodb/r/timestamp.result |
# # Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when # JOINed during an UPDATE # CREATE TABLE t1 (d INT) ENGINE=InnoDB; CREATE TABLE t2 (a INT, b INT, c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)) ENGINE=InnoDB; # set up our data elements INSERT INTO t1 (d) VALUES (1); INSERT INTO t2 (a,b) VALUES (1,1); SELECT c INTO @bug47453 FROM t2; SELECT c!=@bug47453 FROM t1 JOIN t2 ON d=a; c!=@bug47453 0 UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1; SELECT c!=@bug47453 FROM t1 JOIN t2 ON d=a; c!=@bug47453 0 UPDATE t1 JOIN t2 ON d=a SET b=1; # should be 0 SELECT c!=@bug47453 FROM t1 JOIN t2 ON d=a; c!=@bug47453 0 UPDATE t1 JOIN t2 ON d=a SET b=2; # should not be 0 SELECT c!=@bug47453 FROM t1 JOIN t2 ON d=a; c!=@bug47453 1 DROP TABLE t1, t2;