summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2019-11-25 16:49:39 +1000
committerNikita Malyavin <nikitamalyavin@gmail.com>2020-01-21 20:35:06 +1000
commit28323e30792dab3be6c5a2aae0cec98efda071a7 (patch)
treeb93518eb0df7856d9411e80abe6b3ec5b4ee5044
parentec6ffd73975936d8c78583343d27b6eaa682c1ab (diff)
downloadmariadb-git-28323e30792dab3be6c5a2aae0cec98efda071a7.tar.gz
add innodb combination
-rw-r--r--mysql-test/suite/period/r/overlaps.result12
-rw-r--r--mysql-test/suite/period/t/overlaps.test15
2 files changed, 18 insertions, 9 deletions
diff --git a/mysql-test/suite/period/r/overlaps.result b/mysql-test/suite/period/r/overlaps.result
index f56c55d7f87..e4f02b68356 100644
--- a/mysql-test/suite/period/r/overlaps.result
+++ b/mysql-test/suite/period/r/overlaps.result
@@ -9,7 +9,7 @@ t CREATE TABLE `t` (
`e` date NOT NULL,
PERIOD FOR `p` (`s`, `e`),
PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
insert into t values (1, '2003-01-01', '2003-03-01'),
(1, '2003-05-01', '2003-07-01');
insert into t values (1, '2003-02-01', '2003-04-01');
@@ -86,7 +86,7 @@ t CREATE TABLE `t` (
PERIOD FOR `p` (`s`, `e`),
PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS),
UNIQUE KEY `u` (`u`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
insert into t values (1, 1, '2003-03-01', '2003-05-01');
insert into t values (1, 2, '2003-05-01', '2003-07-01');
insert into t values (1, 3, '2003-04-01', '2003-05-01');
@@ -105,12 +105,12 @@ t CREATE TABLE `t` (
PERIOD FOR `p` (`s`, `e`),
PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS),
UNIQUE KEY `u` (`u`,`p` WITHOUT OVERLAPS)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
insert into t values (1, 1, '2003-03-01', '2003-05-01');
insert into t values (1, 2, '2003-05-01', '2003-07-01');
insert into t values (2, 1, '2003-05-01', '2003-07-01');
create or replace table t(id int, s date, e date,
-period for p(s,e)) engine=innodb;
+period for p(s,e));
insert into t values (1, '2003-01-01', '2003-03-01'),
(1, '2003-05-01', '2003-07-01'),
(1, '2003-02-01', '2003-04-01');
@@ -134,7 +134,7 @@ t CREATE TABLE `t` (
`y` int(11) DEFAULT NULL,
PERIOD FOR `p` (`s`, `e`),
PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
alter table t drop y;
create or replace table t1 like t;
show create table t1;
@@ -145,7 +145,7 @@ t1 CREATE TABLE `t1` (
`e` date NOT NULL,
PERIOD FOR `p` (`s`, `e`),
PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
create or replace table t1 (x int, s date, e date,
period for p(s,e),
primary key(x, p without overlaps)
diff --git a/mysql-test/suite/period/t/overlaps.test b/mysql-test/suite/period/t/overlaps.test
index 65a3532a5eb..abfc3d3dbe9 100644
--- a/mysql-test/suite/period/t/overlaps.test
+++ b/mysql-test/suite/period/t/overlaps.test
@@ -1,10 +1,15 @@
---source include/have_innodb.inc
--source include/have_partition.inc
-create or replace table t(id int, s date, e date,
+# Test both myisam and innodb
+--source suite/period/engines.inc
+
+let $default_engine= `select @@default_storage_engine`;
+
+create or replace table t(id int NULL, s date, e date,
period for p(s,e),
primary key(id, p without overlaps));
+--replace_result $default_engine DEFAULT_ENGINE
show create table t;
@@ -84,6 +89,7 @@ create or replace table t(id int, u int, s date, e date,
period for p(s,e),
primary key(id, p without overlaps),
unique(u));
+--replace_result $default_engine DEFAULT_ENGINE
show create table t;
insert into t values (1, 1, '2003-03-01', '2003-05-01');
insert into t values (1, 2, '2003-05-01', '2003-07-01');
@@ -94,13 +100,14 @@ create or replace table t(id int, u int, s date, e date,
period for p(s,e),
primary key(id, p without overlaps),
unique(u, p without overlaps));
+--replace_result $default_engine DEFAULT_ENGINE
show create table t;
insert into t values (1, 1, '2003-03-01', '2003-05-01');
insert into t values (1, 2, '2003-05-01', '2003-07-01');
insert into t values (2, 1, '2003-05-01', '2003-07-01');
create or replace table t(id int, s date, e date,
- period for p(s,e)) engine=innodb;
+ period for p(s,e));
insert into t values (1, '2003-01-01', '2003-03-01'),
(1, '2003-05-01', '2003-07-01'),
@@ -121,10 +128,12 @@ insert into t values (1, '2003-01-01', '2003-03-01'),
--echo # `without overlaps` is not lost on alter table
alter table t add y int;
+--replace_result $default_engine DEFAULT_ENGINE
show create table t;
alter table t drop y;
create or replace table t1 like t;
+--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
--error ER_PERIOD_WITHOUT_OVERLAPS_PARTITIONED