diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2018-12-24 03:47:42 +1000 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2019-09-04 21:28:50 +0300 |
commit | 7dac196197a0106f9d952b27d3bbeffca9825c48 (patch) | |
tree | cd9ee3c480d68f7d94794e917bb400cb8852badc /mysql-test | |
parent | c1bf5766aed015615dcfb994e545ccefb85e4cd1 (diff) | |
download | mariadb-git-7dac196197a0106f9d952b27d3bbeffca9825c48.tar.gz |
MDEV-16490 correct fix, with respect to CREATE...SELECT
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/versioning/r/create.result | 8 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/create.test | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result index 231aae66482..8e51ec3b9e9 100644 --- a/mysql-test/suite/versioning/r/create.result +++ b/mysql-test/suite/versioning/r/create.result @@ -495,5 +495,13 @@ Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +# MDEV-16490 It's possible to make a system versioned table without any versioning field +create or replace table t1 (x int without system versioning) +with system versioning +select 1 as y; +create or replace table t1 (x int without system versioning) +with system versioning +select 1 as x; +ERROR HY000: Table `t1` must have at least one versioned column drop database test; create database test; diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test index 7a7eb556c67..38c2c1fac4f 100644 --- a/mysql-test/suite/versioning/t/create.test +++ b/mysql-test/suite/versioning/t/create.test @@ -371,5 +371,14 @@ create or replace table t1 (i int) with system versioning as select 1 as i; --replace_result $default_engine DEFAULT_ENGINE show create table t1; +--echo # MDEV-16490 It's possible to make a system versioned table without any versioning field +create or replace table t1 (x int without system versioning) +with system versioning +select 1 as y; +--error ER_VERS_TABLE_MUST_HAVE_COLUMNS +create or replace table t1 (x int without system versioning) +with system versioning +select 1 as x; + drop database test; create database test; |