diff options
Diffstat (limited to 'mysql-test/r/insert_select.result')
-rw-r--r-- | mysql-test/r/insert_select.result | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 1a3a38b1f35..da236c53825 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -856,3 +856,121 @@ INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7; SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size; DROP TABLE t1; End of 5.1 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 ENGINE=MyISAM; +CREATE TABLE t2(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=MyISAM; +INSERT INTO t1(x, y) VALUES +(1, 1000), +(2, 2000), +(3, 3000), +(4, 4000), +(5, 5000), +(6, 6000), +(7, 7000), +(8, 8000), +(9, 9000); +DELETE FROM t1 WHERE x >= 1; +INSERT INTO t1(x, y) VALUES +(1, 1001), +(2, 2001), +(3, 3001), +(4, 4001), +(5, 5001), +(6, 6001), +(7, 7001), +(8, 8001), +(9, 9001); +INSERT INTO t2 SELECT x, y FROM t1 FOR SYSTEM_TIME BETWEEN TIMESTAMP '0000-0-0 0:0:0' AND TIMESTAMP '9999-1-1 0:0:0'; +SELECT x, y FROM t1; +x y +1 1001 +2 2001 +3 3001 +4 4001 +5 5001 +6 6001 +7 7001 +8 8001 +9 9001 +SELECT x, y FROM t2; +x y +1 1000 +2 2000 +3 3000 +4 4000 +5 5000 +6 6000 +7 7000 +8 8000 +9 9000 +1 1001 +2 2001 +3 3001 +4 4001 +5 5001 +6 6001 +7 7001 +8 8001 +9 9001 +DROP TABLE t1; +DROP TABLE t2; +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; +CREATE TABLE t2(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 +(1, 1000), +(2, 2000), +(3, 3000), +(4, 4000), +(5, 5000), +(6, 6000), +(7, 7000), +(8, 8000), +(9, 9000); +DELETE FROM t1 WHERE x >= 1; +INSERT INTO t1(x, y) VALUES +(1, 1001), +(2, 2001), +(3, 3001), +(4, 4001), +(5, 5001), +(6, 6001), +(7, 7001), +(8, 8001), +(9, 9001); +INSERT INTO t2 SELECT x, y FROM t1 FOR SYSTEM_TIME BETWEEN TIMESTAMP '0000-0-0 0:0:0' AND TIMESTAMP '9999-1-1 0:0:0'; +SELECT x, y FROM t1; +x y +1 1001 +2 2001 +3 3001 +4 4001 +5 5001 +6 6001 +7 7001 +8 8001 +9 9001 +SELECT x, y FROM t2; +x y +1 1000 +2 2000 +3 3000 +4 4000 +5 5000 +6 6000 +7 7000 +8 8000 +9 9000 +1 1001 +2 2001 +3 3001 +4 4001 +5 5001 +6 6001 +7 7001 +8 8001 +9 9001 +DROP TABLE t1; +DROP TABLE t2; |