Skip to content

Test rejects encountered #11

@midenok

Description

@midenok

At the moment I've encountered following rejects. Please, check.

--- ./mysql-test/r/insert.result    2016-09-12 14:23:43.080142165 +0000
+++ ./mysql-test/r/insert.reject    2016-09-13 01:18:14.424742144 +0000
@@ -727,9 +727,9 @@
 INSERT INTO t1 VALUES(40, 33);
 SELECT x, y, Sys_end FROM t1;
 x  y   Sys_end
-3  4   2038-01-19 04:14:07.000000
-2  3   2038-01-19 04:14:07.000000
-40 33  2038-01-19 04:14:07.000000
+3  4   2038-01-19 03:14:07.000000
+2  3   2038-01-19 03:14:07.000000
+40 33  2038-01-19 03:14:07.000000
 DROP TABLE t1;
 CREATE TABLE t1(x INT UNSIGNED, y INT UNSIGNED, Sys_start TIMESTAMP(6) GENERATED ALWAYS AS ROW START, Sys_end TIMESTAMP(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME (Sys_start, Sys_end)) WITH SYSTEM VERSIONING ENGINE=InnoDB;
 INSERT INTO t1(x, y) VALUES(3, 4);
@@ -737,9 +737,9 @@
 INSERT INTO t1 VALUES(40, 33);
 SELECT x, y, Sys_end FROM t1;
 x  y   Sys_end
-3  4   2038-01-19 04:14:07.000000
-2  3   2038-01-19 04:14:07.000000
-40 33  2038-01-19 04:14:07.000000
+3  4   2038-01-19 03:14:07.000000
+2  3   2038-01-19 03:14:07.000000
+40 33  2038-01-19 03:14:07.000000
 DROP TABLE t1;
 CREATE TABLE t1(id INT UNSIGNED NOT NULL AUTO_INCREMENT, x INT UNSIGNED, y INT UNSIGNED, Sys_start TIMESTAMP(6) GENERATED ALWAYS AS ROW START, Sys_end TIMESTAMP(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME (Sys_start, Sys_end), PRIMARY KEY(id)) WITH SYSTEM VERSIONING;
 INSERT INTO t1(x, y) VALUES(33, 44);
@@ -747,9 +747,9 @@
 INSERT INTO t1 VALUES(40, 33, 44);
 SELECT id, x, y, Sys_end FROM t1;
 id x   y   Sys_end
-1  33  44  2038-01-19 04:14:07.000000
-20 33  44  2038-01-19 04:14:07.000000
-40 33  44  2038-01-19 04:14:07.000000
+1  33  44  2038-01-19 03:14:07.000000
+20 33  44  2038-01-19 03:14:07.000000
+40 33  44  2038-01-19 03:14:07.000000
 DROP TABLE t1;
 CREATE TABLE t1(id INT UNSIGNED NOT NULL AUTO_INCREMENT, x INT UNSIGNED, y INT UNSIGNED, Sys_start TIMESTAMP(6) GENERATED ALWAYS AS ROW START, Sys_end TIMESTAMP(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME (Sys_start, Sys_end), PRIMARY KEY(id)) WITH SYSTEM VERSIONING ENGINE=InnoDB;
 INSERT INTO t1(x, y) VALUES(33, 44);
@@ -757,9 +757,9 @@
 INSERT INTO t1 VALUES(40, 33, 44);
 SELECT id, x, y, Sys_end FROM t1;
 id x   y   Sys_end
-1  33  44  2038-01-19 04:14:07.000000
-20 33  44  2038-01-19 04:14:07.000000
-40 33  44  2038-01-19 04:14:07.000000
+1  33  44  2038-01-19 03:14:07.000000
+20 33  44  2038-01-19 03:14:07.000000
+40 33  44  2038-01-19 03:14:07.000000
 DROP TABLE t1;
 CREATE TABLE t1(x INT UNSIGNED, y INT UNSIGNED, Sys_start TIMESTAMP(6) GENERATED ALWAYS AS ROW START, Sys_end TIMESTAMP(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME (Sys_start, Sys_end)) WITH SYSTEM VERSIONING;
 CREATE VIEW vt1_1 AS SELECT x, y FROM t1;
@@ -774,10 +774,10 @@
 ERROR HY000: Generated field for System Versioning cannot be set by user
 SELECT x, y, Sys_end FROM t1;
 x  y   Sys_end
-8001   9001    2038-01-19 04:14:07.000000
-1001   2001    2038-01-19 04:14:07.000000
-1002   2002    2038-01-19 04:14:07.000000
-3001   4001    2038-01-19 04:14:07.000000
+8001   9001    2038-01-19 03:14:07.000000
+1001   2001    2038-01-19 03:14:07.000000
+1002   2002    2038-01-19 03:14:07.000000
+3001   4001    2038-01-19 03:14:07.000000
 SELECT x, y FROM vt1_1;
 x  y
 8001   9001
@@ -786,10 +786,10 @@
 3001   4001
 SELECT x, y, Sys_end FROM vt1_2;
 x  y   Sys_end
-8001   9001    2038-01-19 04:14:07.000000
-1001   2001    2038-01-19 04:14:07.000000
-1002   2002    2038-01-19 04:14:07.000000
-3001   4001    2038-01-19 04:14:07.000000
+8001   9001    2038-01-19 03:14:07.000000
+1001   2001    2038-01-19 03:14:07.000000
+1002   2002    2038-01-19 03:14:07.000000
+3001   4001    2038-01-19 03:14:07.000000
 DROP TABLE t1;
 DROP VIEW vt1_1;
 DROP VIEW vt1_2;
@@ -806,10 +806,10 @@
 ERROR HY000: Generated field for System Versioning cannot be set by user
 SELECT x, y, Sys_end FROM t1;
 x  y   Sys_end
-8001   9001    2038-01-19 04:14:07.000000
-1001   2001    2038-01-19 04:14:07.000000
-1002   2002    2038-01-19 04:14:07.000000
-3001   4001    2038-01-19 04:14:07.000000
+8001   9001    2038-01-19 03:14:07.000000
+1001   2001    2038-01-19 03:14:07.000000
+1002   2002    2038-01-19 03:14:07.000000
+3001   4001    2038-01-19 03:14:07.000000
 SELECT x, y FROM vt1_1;
 x  y
 8001   9001
@@ -818,10 +818,10 @@
 3001   4001
 SELECT x, y, Sys_end FROM vt1_2;
 x  y   Sys_end
-8001   9001    2038-01-19 04:14:07.000000
-1001   2001    2038-01-19 04:14:07.000000
-1002   2002    2038-01-19 04:14:07.000000
-3001   4001    2038-01-19 04:14:07.000000
+8001   9001    2038-01-19 03:14:07.000000
+1001   2001    2038-01-19 03:14:07.000000
+1002   2002    2038-01-19 03:14:07.000000
+3001   4001    2038-01-19 03:14:07.000000
 DROP TABLE t1;
 DROP VIEW vt1_1;
 DROP VIEW vt1_2;
--- ./mysql-test/r/select_pkeycache.result  2016-09-02 07:45:28.357703976 +0000
+++ ./mysql-test/r/select_pkeycache.reject  2016-09-13 01:29:40.829607887 +0000
@@ -5549,3 +5549,68 @@
 NULL
 drop table t1;
 End of 10.0 tests
+#
+# System Versioning Support
+#
+#
+CREATE TABLE t1( x INT UNSIGNED, y INT UNSIGNED, Sys_start TIMESTAMP(6) GENERATED ALWAYS AS ROW START, Sys_end TIMESTAMP(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME (Sys_start, Sys_end)) WITH SYSTEM VERSIONING;
+INSERT INTO t1(x, y) VALUES
+(0, 100),
+(1, 101),
+(2, 102),
+(3, 103),
+(4, 104),
+(5, 105),
+(6, 106),
+(7, 107),
+(8, 108),
+(9, 109);
+DELETE FROM t1 WHERE x = 3;
+DELETE FROM t1 WHERE x > 7;
+INSERT INTO t1(x, y) VALUES(3, 33);
+SELECT @time := Sys_start FROM t1 FOR SYSTEM_TIME BETWEEN TIMESTAMP '0-0-0 0:0:0' AND TIMESTAMP '2038-01-19 04:14:07' WHERE x = 3 AND y = 33;
+@time := Sys_start
+Sys_start
+SELECT x, y FROM t1;
+x  y
+0  100
+1  101
+2  102
+4  104
+5  105
+6  106
+7  107
+3  33
+SET @query=CONCAT('SELECT x, y FROM t1 FOR SYSTEM_TIME FROM TIMESTAMP \'0-0-0 0:0:0\' TO TIMESTAMP \'', @time, '\'');
+PREPARE stmt_t1 FROM @query;
+EXECUTE stmt_t1;
+x  y
+0  100
+1  101
+2  102
+3  103
+4  104
+5  105
+6  106
+7  107
+8  108
+9  109
+SET @query=CONCAT('SELECT x, y FROM t1 FOR SYSTEM_TIME BETWEEN TIMESTAMP \'0-0-0 0:0:0\' AND TIMESTAMP \'', @time, '\'');
+PREPARE stmt_t1 FROM @query;
+EXECUTE stmt_t1;
+x  y
+0  100
+1  101
+2  102
+3  103
+4  104
+5  105
+6  106
+7  107
+8  108
+9  109
+3  33
+SET @time=NULL;
+SET @query=NULL;
+DEALLOCATE PREPARE stmt_t1;
+DROP TABLE t1;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions