summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/federated/federatedx_versioning.result4
-rw-r--r--mysql-test/suite/federated/federatedx_versioning.test2
-rw-r--r--mysql-test/suite/versioning/common.inc4
-rw-r--r--mysql-test/suite/versioning/engines.combinations5
-rw-r--r--mysql-test/suite/versioning/r/select.result6
-rw-r--r--mysql-test/suite/versioning/r/select2,trx_id.rdiff4
-rw-r--r--mysql-test/suite/versioning/r/select2.result10
-rw-r--r--mysql-test/suite/versioning/r/sysvars.result4
-rw-r--r--mysql-test/suite/versioning/r/view.result2
-rw-r--r--mysql-test/suite/versioning/t/select.test10
-rw-r--r--mysql-test/suite/versioning/t/select2.test10
-rw-r--r--mysql-test/suite/versioning/t/sysvars.test4
-rw-r--r--mysql-test/suite/versioning/t/view.test2
13 files changed, 38 insertions, 29 deletions
diff --git a/mysql-test/suite/federated/federatedx_versioning.result b/mysql-test/suite/federated/federatedx_versioning.result
index abf2658d2e2..be3b578e839 100644
--- a/mysql-test/suite/federated/federatedx_versioning.result
+++ b/mysql-test/suite/federated/federatedx_versioning.result
@@ -9,8 +9,8 @@ show create table tf;
Table Create Table
tf CREATE TABLE `tf` (
`x` int(11) DEFAULT NULL,
- `row_start` SYS_TYPE NOT NULL INVISIBLE DEFAULT 0,
- `row_end` SYS_TYPE NOT NULL INVISIBLE DEFAULT 0
+ `row_start` SYS_TYPE INVISIBLE DEFAULT '1971-01-01 00:00:00.000000',
+ `row_end` SYS_TYPE INVISIBLE DEFAULT '1971-01-01 00:00:00.000000'
) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:MASTER_MYPORT/test/t1'
# INSERT
insert into t1 values (1);
diff --git a/mysql-test/suite/federated/federatedx_versioning.test b/mysql-test/suite/federated/federatedx_versioning.test
index e8db8ef9e2a..6c3247cea55 100644
--- a/mysql-test/suite/federated/federatedx_versioning.test
+++ b/mysql-test/suite/federated/federatedx_versioning.test
@@ -12,7 +12,7 @@ eval create or replace table t1 (
with system versioning;
--replace_result $MASTER_MYPORT MASTER_MYPORT
eval create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1';
---replace_result $MASTER_MYPORT MASTER_MYPORT $sys_datatype_expl SYS_TYPE "'0000-00-00 00:00:00.000000'" 0
+--replace_result $MASTER_MYPORT MASTER_MYPORT $sys_datatype_expl SYS_TYPE 19710101000000 "'1971-01-01 00:00:00.000000'" " NOT NULL" ""
show create table tf;
--echo # INSERT
insert into t1 values (1);
diff --git a/mysql-test/suite/versioning/common.inc b/mysql-test/suite/versioning/common.inc
index 355b571e5a0..efb081a02e4 100644
--- a/mysql-test/suite/versioning/common.inc
+++ b/mysql-test/suite/versioning/common.inc
@@ -50,6 +50,10 @@ if ($MTR_COMBINATION_MYISAM)
{
--let $MTR_COMBINATION_TIMESTAMP= 1
}
+if ($MTR_COMBINATION_TRADITIONAL)
+{
+ --let $MTR_COMBINATION_TIMESTAMP= 1
+}
if ($MTR_COMBINATION_HEAP)
{
--let $MTR_COMBINATION_TIMESTAMP= 1
diff --git a/mysql-test/suite/versioning/engines.combinations b/mysql-test/suite/versioning/engines.combinations
index 26b5bab23f1..57e2af6cd06 100644
--- a/mysql-test/suite/versioning/engines.combinations
+++ b/mysql-test/suite/versioning/engines.combinations
@@ -7,5 +7,10 @@ default-storage-engine=innodb
[myisam]
default-storage-engine=myisam
+[traditional]
+default-storage-engine=myisam
+sql-mode=traditional
+
[heap]
default-storage-engine=memory
+
diff --git a/mysql-test/suite/versioning/r/select.result b/mysql-test/suite/versioning/r/select.result
index 36d738f57b7..a969c16bad4 100644
--- a/mysql-test/suite/versioning/r/select.result
+++ b/mysql-test/suite/versioning/r/select.result
@@ -45,7 +45,7 @@ ASOF_x y
7 107
8 108
9 109
-select x as FROMTO_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
+select x as FROMTO_x, y from t1 for system_time from timestamp '1970-01-01 00:00:00' to timestamp @t1;
FROMTO_x y
0 100
1 101
@@ -57,7 +57,7 @@ FROMTO_x y
7 107
8 108
9 109
-select x as BETWAND_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+select x as BETWAND_x, y from t1 for system_time between timestamp '1970-01-01 00:00:00' and timestamp @t1;
BETWAND_x y
0 100
1 101
@@ -284,7 +284,7 @@ a b
select * from (select * from (select * from t1 cross join t2) as tmp1) as tmp2;
a b
1 2
-select * from (select * from t1 cross join t2 for system_time as of timestamp ('0-0-0')) as tmp;
+select * from (select * from t1 cross join t2 for system_time as of timestamp ('1970-01-01 00:00:00')) as tmp;
a b
create or replace table t1(a1 int) with system versioning;
create or replace table t2(a2 int) with system versioning;
diff --git a/mysql-test/suite/versioning/r/select2,trx_id.rdiff b/mysql-test/suite/versioning/r/select2,trx_id.rdiff
index d23eb5afbc0..4075b1b0f28 100644
--- a/mysql-test/suite/versioning/r/select2,trx_id.rdiff
+++ b/mysql-test/suite/versioning/r/select2,trx_id.rdiff
@@ -22,7 +22,7 @@
7 107
8 108
9 109
--select x as FROMTO2_x, y from t1 for system_time from '0-0-0 0:0:0' to @t1;
+-select x as FROMTO2_x, y from t1 for system_time from '1970-01-01 00:00' to @t1;
+select x as FROMTO2_x, y from t1 for system_time from @x0 to @x1;
FROMTO2_x y
0 100
@@ -31,7 +31,7 @@
7 107
8 108
9 109
--select x as BETWAND2_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+-select x as BETWAND2_x, y from t1 for system_time between timestamp '1970-01-01 00:00' and timestamp @t1;
+select x as BETWAND2_x, y from t1 for system_time between transaction @x0 and transaction @x1;
BETWAND2_x y
0 100
diff --git a/mysql-test/suite/versioning/r/select2.result b/mysql-test/suite/versioning/r/select2.result
index 22388359885..a2642b319ee 100644
--- a/mysql-test/suite/versioning/r/select2.result
+++ b/mysql-test/suite/versioning/r/select2.result
@@ -48,7 +48,7 @@ ASOF_x y
7 107
8 108
9 109
-select x as FROMTO_x, y from t1 for system_time from '0-0-0 0:0:0' to timestamp @t1;
+select x as FROMTO_x, y from t1 for system_time from '1970-01-01 00:00' to timestamp @t1;
FROMTO_x y
0 100
1 101
@@ -60,7 +60,7 @@ FROMTO_x y
7 107
8 108
9 109
-select x as BETWAND_x, y from t1 for system_time between '0-0-0 0:0:0' and timestamp @t1;
+select x as BETWAND_x, y from t1 for system_time between '1970-01-01 00:00' and timestamp @t1;
BETWAND_x y
0 100
1 101
@@ -98,7 +98,7 @@ ASOF2_x y
7 107
8 108
9 109
-select x as FROMTO2_x, y from t1 for system_time from '0-0-0 0:0:0' to @t1;
+select x as FROMTO2_x, y from t1 for system_time from '1970-01-01 00:00' to @t1;
FROMTO2_x y
0 100
1 101
@@ -110,7 +110,7 @@ FROMTO2_x y
7 107
8 108
9 109
-select x as BETWAND2_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+select x as BETWAND2_x, y from t1 for system_time between timestamp '1970-01-01 00:00' and timestamp @t1;
BETWAND2_x y
0 100
1 101
@@ -275,7 +275,7 @@ a b
select * from (select * from (select * from t1 cross join t2) as tmp1) as tmp2;
a b
1 2
-select * from (select * from t1 cross join t2 for system_time as of timestamp ('0-0-0')) as tmp;
+select * from (select * from t1 cross join t2 for system_time as of timestamp ('1970-01-01 00:00')) as tmp;
a b
create or replace table t1(a1 int) with system versioning;
create or replace table t2(a2 int) with system versioning;
diff --git a/mysql-test/suite/versioning/r/sysvars.result b/mysql-test/suite/versioning/r/sysvars.result
index 165458ef170..93d99273a40 100644
--- a/mysql-test/suite/versioning/r/sysvars.result
+++ b/mysql-test/suite/versioning/r/sysvars.result
@@ -134,11 +134,11 @@ select * from t for system_time all;
a
2
1
-select * from t for system_time from '0-0-0' to current_timestamp(6);
+select * from t for system_time from '1970-01-01 00:00' to current_timestamp(6);
a
2
1
-select * from t for system_time between '0-0-0' and current_timestamp(6);
+select * from t for system_time between '1970-01-01 00:00' and current_timestamp(6);
a
2
1
diff --git a/mysql-test/suite/versioning/r/view.result b/mysql-test/suite/versioning/r/view.result
index 3b3fe580af4..e9e74899790 100644
--- a/mysql-test/suite/versioning/r/view.result
+++ b/mysql-test/suite/versioning/r/view.result
@@ -79,7 +79,7 @@ create or replace view vt12 as select * from t1 cross join t2;
select * from vt12;
a b
1 2
-create or replace view vt12 as select * from t1 for system_time as of timestamp ('0-0-0') cross join t2;
+create or replace view vt12 as select * from t1 for system_time as of timestamp ('1970-01-01 00:00') cross join t2;
select * from vt12;
a b
# VIEW improvements [tempesta-tech/mariadb#183]
diff --git a/mysql-test/suite/versioning/t/select.test b/mysql-test/suite/versioning/t/select.test
index 00e67ed85a6..a250a60770e 100644
--- a/mysql-test/suite/versioning/t/select.test
+++ b/mysql-test/suite/versioning/t/select.test
@@ -48,8 +48,8 @@ if ($MTR_COMBINATION_TRX_ID)
select x, y from t1;
select x as ASOF_x, y from t1 for system_time as of timestamp @t0;
-select x as FROMTO_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
-select x as BETWAND_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+select x as FROMTO_x, y from t1 for system_time from timestamp '1970-01-01 00:00:00' to timestamp @t1;
+select x as BETWAND_x, y from t1 for system_time between timestamp '1970-01-01 00:00:00' and timestamp @t1;
select x as ALL_x, y from t1 for system_time all;
--disable_query_log
@@ -62,8 +62,8 @@ if ($MTR_COMBINATION_TRX_ID)
if ($MTR_COMBINATION_TIMESTAMP)
{
select x as ASOF2_x, y from t1 for system_time as of @t0;
- select x as FROMTO2_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
- select x as BETWAND2_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+ select x as FROMTO2_x, y from t1 for system_time from timestamp '1970-01-01 00:00:00' to timestamp @t1;
+ select x as BETWAND2_x, y from t1 for system_time between timestamp '1970-01-01 00:00:00' and timestamp @t1;
}
--enable_query_log
@@ -186,7 +186,7 @@ insert into t1 values (1);
insert into t2 values (2);
select * from (select * from t1 cross join t2) as tmp;
select * from (select * from (select * from t1 cross join t2) as tmp1) as tmp2;
-select * from (select * from t1 cross join t2 for system_time as of timestamp ('0-0-0')) as tmp;
+select * from (select * from t1 cross join t2 for system_time as of timestamp ('1970-01-01 00:00:00')) as tmp;
create or replace table t1(a1 int) with system versioning;
create or replace table t2(a2 int) with system versioning;
diff --git a/mysql-test/suite/versioning/t/select2.test b/mysql-test/suite/versioning/t/select2.test
index d1b73fa799b..75c8165886f 100644
--- a/mysql-test/suite/versioning/t/select2.test
+++ b/mysql-test/suite/versioning/t/select2.test
@@ -36,8 +36,8 @@ if($MTR_COMBINATION_TRX_ID) {
select x, y from t1;
select x as ASOF_x, y from t1 for system_time as of timestamp @t0;
-select x as FROMTO_x, y from t1 for system_time from '0-0-0 0:0:0' to timestamp @t1;
-select x as BETWAND_x, y from t1 for system_time between '0-0-0 0:0:0' and timestamp @t1;
+select x as FROMTO_x, y from t1 for system_time from '1970-01-01 00:00' to timestamp @t1;
+select x as BETWAND_x, y from t1 for system_time between '1970-01-01 00:00' and timestamp @t1;
select x as ALL_x, y from t1 for system_time all;
if($MTR_COMBINATION_TRX_ID) {
@@ -47,8 +47,8 @@ if($MTR_COMBINATION_TRX_ID) {
}
if(!$MTR_COMBINATION_TRX_ID) {
select x as ASOF2_x, y from t1 for system_time as of @t0;
- select x as FROMTO2_x, y from t1 for system_time from '0-0-0 0:0:0' to @t1;
- select x as BETWAND2_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+ select x as FROMTO2_x, y from t1 for system_time from '1970-01-01 00:00' to @t1;
+ select x as BETWAND2_x, y from t1 for system_time between timestamp '1970-01-01 00:00' and timestamp @t1;
}
drop table t1;
@@ -165,7 +165,7 @@ insert into t1 values (1);
insert into t2 values (2);
select * from (select * from t1 cross join t2) as tmp;
select * from (select * from (select * from t1 cross join t2) as tmp1) as tmp2;
-select * from (select * from t1 cross join t2 for system_time as of timestamp ('0-0-0')) as tmp;
+select * from (select * from t1 cross join t2 for system_time as of timestamp ('1970-01-01 00:00')) as tmp;
create or replace table t1(a1 int) with system versioning;
create or replace table t2(a2 int) with system versioning;
diff --git a/mysql-test/suite/versioning/t/sysvars.test b/mysql-test/suite/versioning/t/sysvars.test
index e82a116f30e..ef5d97ad262 100644
--- a/mysql-test/suite/versioning/t/sysvars.test
+++ b/mysql-test/suite/versioning/t/sysvars.test
@@ -97,8 +97,8 @@ select * from t for system_time all;
select * from t;
select * from t for system_time as of timestamp current_timestamp(6);
select * from t for system_time all;
-select * from t for system_time from '0-0-0' to current_timestamp(6);
-select * from t for system_time between '0-0-0' and current_timestamp(6);
+select * from t for system_time from '1970-01-01 00:00' to current_timestamp(6);
+select * from t for system_time between '1970-01-01 00:00' and current_timestamp(6);
show status like "Feature_system_versioning";
diff --git a/mysql-test/suite/versioning/t/view.test b/mysql-test/suite/versioning/t/view.test
index 288f1eb6e21..37676a7fb50 100644
--- a/mysql-test/suite/versioning/t/view.test
+++ b/mysql-test/suite/versioning/t/view.test
@@ -65,7 +65,7 @@ insert into t1 values (1);
insert into t2 values (2);
create or replace view vt12 as select * from t1 cross join t2;
select * from vt12;
-create or replace view vt12 as select * from t1 for system_time as of timestamp ('0-0-0') cross join t2;
+create or replace view vt12 as select * from t1 for system_time as of timestamp ('1970-01-01 00:00') cross join t2;
select * from vt12;
--echo # VIEW improvements [tempesta-tech/mariadb#183]