From 1be39f86ccced289f7a1755467f801a1b5974ede Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Tue, 2 Nov 2021 04:52:03 +0300 Subject: MDEV-25552 system versioned partitioned by LIMIT tables break CHECK TABLE Replaced HA_ADMIN_NOT_IMPLEMENTED error code by HA_ADMIN_OK. Now CHECK TABLE does not fail by unsupported check_misplaced_rows(). Admin message is not needed as well. Test case is the same as for MDEV-21011 (a7cf0db3d86), the result have been changed. --- mysql-test/suite/versioning/r/partition.result | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mysql-test/suite/versioning') diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index d2cf32e5bd0..6472c0480c3 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -603,8 +603,7 @@ delete from t1; delete from t1; check table t1; Table Op Msg_type Msg_text -test.t1 check note Not supported for non-INTERVAL history partitions -test.t1 check note The storage engine for the table doesn't support check +test.t1 check status OK drop table t1; # # MDEV-21233 Assertion `m_extra_cache' failed in ha_partition::late_extra_cache -- cgit v1.2.1 From c8cece91440edb77aa43b8ba20930fa91514308e Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Tue, 2 Nov 2021 04:52:04 +0300 Subject: MDEV-26928 Column-inclusive WITH SYSTEM VERSIONING doesn't work with explicit system fields versioning_fields flag indicates that any columns were specified WITH SYSTEM VERSIONING. In that case we imply WITH SYSTEM VERSIONING for the whole table and WITHOUT SYSTEM VERSIONING for the other columns. --- mysql-test/suite/versioning/r/create.result | 25 +++++++++++++++++++++++++ mysql-test/suite/versioning/t/create.test | 17 +++++++++++++++++ 2 files changed, 42 insertions(+) (limited to 'mysql-test/suite/versioning') diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result index fe0e6c807c3..8943ea1f1cd 100644 --- a/mysql-test/suite/versioning/r/create.result +++ b/mysql-test/suite/versioning/r/create.result @@ -599,3 +599,28 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`id`) ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING drop table t1; +# +# MDEV-26928 Column-inclusive WITH SYSTEM VERSIONING doesn't work with explicit system fields +# +create or replace table t1 (x int, y int with system versioning); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `x` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING, + `y` int(11) DEFAULT NULL +) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +create or replace table t1 ( +x int, y int with system versioning, +row_start timestamp(6) as row start, +row_end timestamp(6) as row end, +period for system_time(row_start, row_end)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `x` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING, + `y` int(11) DEFAULT NULL, + `row_start` timestamp(6) GENERATED ALWAYS AS ROW START WITHOUT SYSTEM VERSIONING, + `row_end` timestamp(6) GENERATED ALWAYS AS ROW END WITHOUT SYSTEM VERSIONING, + PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`) +) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +drop table t1; diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test index 1d9f3a1b341..b1f0055f5cc 100644 --- a/mysql-test/suite/versioning/t/create.test +++ b/mysql-test/suite/versioning/t/create.test @@ -451,3 +451,20 @@ show index from t1; --replace_result $default_engine DEFAULT_ENGINE show create table t1; drop table t1; + +--echo # +--echo # MDEV-26928 Column-inclusive WITH SYSTEM VERSIONING doesn't work with explicit system fields +--echo # +create or replace table t1 (x int, y int with system versioning); +--replace_result $default_engine DEFAULT_ENGINE +show create table t1; + +create or replace table t1 ( + x int, y int with system versioning, + row_start timestamp(6) as row start, + row_end timestamp(6) as row end, + period for system_time(row_start, row_end)); +--replace_result $default_engine DEFAULT_ENGINE +show create table t1; + +drop table t1; -- cgit v1.2.1