Commit e040bdf0 authored by Nikita Malyavin's avatar Nikita Malyavin

add innodb combination

parent c85698cd
......@@ -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)
......
--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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment