summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2017-12-10 23:52:51 +0300
committerAleksey Midenkov <midenok@gmail.com>2017-12-10 23:52:51 +0300
commitb7cd18289639b30fafc7f623c1187e442608727c (patch)
tree293a5bdce3894f854ac4f45cb0ea9bd20109172f /mysql-test
parent2968543f8dd75381c7d74c7d438c39e67e98064e (diff)
downloadmariadb-git-b7cd18289639b30fafc7f623c1187e442608727c.tar.gz
SQL: DEFAULT value for system fields [closes #376]
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/versioning/r/insert.result14
-rw-r--r--mysql-test/suite/versioning/t/insert.test11
2 files changed, 17 insertions, 8 deletions
diff --git a/mysql-test/suite/versioning/r/insert.result b/mysql-test/suite/versioning/r/insert.result
index 38e224ae5e3..126d4c1bb23 100644
--- a/mysql-test/suite/versioning/r/insert.result
+++ b/mysql-test/suite/versioning/r/insert.result
@@ -120,10 +120,13 @@ insert into t1(x, y) values
(3, 3001),
(4, 4001),
(5, 5001),
-(6, 6001),
-(7, 7001),
-(8, 8001),
-(9, 9001);
+(6, 6001);
+insert into t1(x, y, sys_start) values
+(7, 7001, DEFAULT);
+insert into t1(x, y, sys_end) values
+(8, 8001, DEFAULT);
+insert into t1(x, y, sys_start, sys_end) values
+(9, 9001, DEFAULT, DEFAULT);
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;
select x, y from t2;
@@ -259,6 +262,9 @@ No A B C D
13 1 1 1 1
14 1 1 1 1
15 1 1 1 1
+16 1 1 1 1
+17 1 1 1 1
+18 1 1 1 1
create table t1(
x int unsigned,
sys_start bigint unsigned generated always as row start,
diff --git a/mysql-test/suite/versioning/t/insert.test b/mysql-test/suite/versioning/t/insert.test
index b7fda5db1b5..2c110628daa 100644
--- a/mysql-test/suite/versioning/t/insert.test
+++ b/mysql-test/suite/versioning/t/insert.test
@@ -127,10 +127,13 @@ begin
(3, 3001),
(4, 4001),
(5, 5001),
- (6, 6001),
- (7, 7001),
- (8, 8001),
- (9, 9001);
+ (6, 6001);
+ insert into t1(x, y, sys_start) values
+ (7, 7001, DEFAULT);
+ insert into t1(x, y, sys_end) values
+ (8, 8001, DEFAULT);
+ insert into t1(x, y, sys_start, sys_end) values
+ (9, 9001, DEFAULT, DEFAULT);
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;
select x, y from t2;