Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG#26734457 BACKPORT BUG#22305994 TO 5.6 AND 5.7
Use GetSystemTimePreciseAsFileTime in my_micro_time on Windows when it is available to achieve higher timer resolution. Change-Id: I200c54b83fedb22c2e4c45bc151aed44fec0ff6c
- Loading branch information
Daniel Blanchard
committed
Oct 27, 2017
1 parent
180adbe
commit cd0b9f7
Showing
7 changed files
with
144 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--echo # | ||
--echo # Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when | ||
--echo # JOINed during an UPDATE | ||
--echo # | ||
|
||
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; | ||
|
||
--echo # 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; | ||
UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1; | ||
SELECT c!=@bug47453 FROM t1 JOIN t2 ON d=a; | ||
UPDATE t1 JOIN t2 ON d=a SET b=1; | ||
--echo # should be 0 | ||
SELECT c!=@bug47453 FROM t1 JOIN t2 ON d=a; | ||
UPDATE t1 JOIN t2 ON d=a SET b=2; | ||
--echo # should not be 0 | ||
SELECT c!=@bug47453 FROM t1 JOIN t2 ON d=a; | ||
|
||
DROP TABLE t1, t2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters