Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e040bdf0
Commit
e040bdf0
authored
Nov 25, 2019
by
Nikita Malyavin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add innodb combination
parent
c85698cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
mysql-test/suite/period/r/overlaps.result
mysql-test/suite/period/r/overlaps.result
+6
-6
mysql-test/suite/period/t/overlaps.test
mysql-test/suite/period/t/overlaps.test
+12
-3
No files found.
mysql-test/suite/period/r/overlaps.result
View file @
e040bdf0
...
...
@@ -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)
...
...
mysql-test/suite/period/t/overlaps.test
View file @
e040bdf0
--
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment