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
9aae0be8
Commit
9aae0be8
authored
Oct 24, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: disabled SYSTEM_TIME partitioning for InnoDB [fixes #294]
parent
0ab99d2f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
mysql-test/suite/versioning/r/partition.result
mysql-test/suite/versioning/r/partition.result
+12
-12
mysql-test/suite/versioning/t/partition.combinations
mysql-test/suite/versioning/t/partition.combinations
+3
-3
sql/partition_info.cc
sql/partition_info.cc
+1
-1
sql/sql_partition.cc
sql/sql_partition.cc
+1
-1
No files found.
mysql-test/suite/versioning/r/partition.result
View file @
9aae0be8
...
...
@@ -147,7 +147,7 @@ ERROR HY000: Wrong partitions consistency for `t1`: must have at least one 'VERS
alter table t1 add partition (
partition p1 versioning);
Warnings:
Warning 4
078
Maybe missing parameters: no rotation condition for multiple `VERSIONING` partitions.
Warning 4
105
Maybe missing parameters: no rotation condition for multiple `VERSIONING` partitions.
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
@@ -157,9 +157,9 @@ t1 CREATE TABLE `t1` (
PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
) ENGINE=${INNODB_OR_MYISAM} DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
PARTITION BY SYSTEM_TIME
(PARTITION
p0
VERSIONING ENGINE = ${INNODB_OR_MYISAM},
PARTITION
p1
VERSIONING ENGINE = ${INNODB_OR_MYISAM},
PARTITION
pn
AS OF NOW ENGINE = ${INNODB_OR_MYISAM})
(PARTITION
`p0`
VERSIONING ENGINE = ${INNODB_OR_MYISAM},
PARTITION
`p1`
VERSIONING ENGINE = ${INNODB_OR_MYISAM},
PARTITION
`pn`
AS OF NOW ENGINE = ${INNODB_OR_MYISAM})
insert into t1 values (1), (2);
alter table t1 drop partition pn;
ERROR HY000: Wrong partitions consistency for `t1`: must have at least one 'VERSIONING' and exactly one last 'AS OF NOW'
...
...
@@ -278,9 +278,9 @@ t1 CREATE TABLE `t1` (
PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
) ENGINE=${INNODB_OR_MYISAM} DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
PARTITION BY SYSTEM_TIME LIMIT 1
(PARTITION
p0
VERSIONING ENGINE = ${INNODB_OR_MYISAM},
PARTITION
p1
VERSIONING ENGINE = ${INNODB_OR_MYISAM},
PARTITION
pn
AS OF NOW ENGINE = ${INNODB_OR_MYISAM})
(PARTITION
`p0`
VERSIONING ENGINE = ${INNODB_OR_MYISAM},
PARTITION
`p1`
VERSIONING ENGINE = ${INNODB_OR_MYISAM},
PARTITION
`pn`
AS OF NOW ENGINE = ${INNODB_OR_MYISAM})
alter table t1 drop partition non_existent;
ERROR HY000: Error in list of partitions to DROP
insert into t1 values (1), (2);
...
...
@@ -290,7 +290,7 @@ x
2
delete from t1;
Warnings:
Note 4
079
Switching from partition `p0` to `p1`
Note 4
106
Switching from partition `p0` to `p1`
select * from t1 partition (p0) for system_time all;
x
1
...
...
@@ -300,7 +300,7 @@ x
insert into t1 values (3);
delete from t1;
Warnings:
Warning 4
077
Using full partition `p1`, need more VERSIONING partitions!
Warning 4
104
Using full partition `p1`, need more VERSIONING partitions!
select * from t1 partition (p1) for system_time all;
x
2
...
...
@@ -333,7 +333,7 @@ x
insert into t1 values (4);
delete from t1;
Warnings:
Note 4
079
Switching from partition `p0` to `p1`
Note 4
106
Switching from partition `p0` to `p1`
select * from t1 partition (p1) for system_time all;
x
4
...
...
@@ -355,8 +355,8 @@ x
2
delete from t1;
Warnings:
Note 4
079
Switching from partition `p0` to `p1`
Warning 4
077
Using full partition `p1`, need more VERSIONING partitions!
Note 4
106
Switching from partition `p0` to `p1`
Warning 4
104
Using full partition `p1`, need more VERSIONING partitions!
select * from t1 partition (p0sp0) for system_time all;
x
1
...
...
mysql-test/suite/versioning/t/partition.combinations
View file @
9aae0be8
[innodb]
partition
default-storage-engine=innodb
#
[innodb]
#
partition
#
default-storage-engine=innodb
[myisam]
partition
...
...
sql/partition_info.cc
View file @
9aae0be8
...
...
@@ -951,7 +951,7 @@ bool partition_info::vers_setup_expression(THD * thd, uint32 alter_add)
{
DBUG_ASSERT
(
part_type
==
VERSIONING_PARTITION
);
if
(
!
table
->
versioned
())
if
(
!
table
->
versioned
_by_sql
())
{
my_error
(
ER_VERSIONING_REQUIRED
,
MYF
(
0
),
table
->
s
->
table_name
);
return
true
;
...
...
sql/sql_partition.cc
View file @
9aae0be8
...
...
@@ -2324,7 +2324,7 @@ char *generate_partition_syntax(THD *thd, partition_info *part_info,
err
+=
str
.
append
(
STRING_WITH_LEN
(
"HASH "
));
break
;
case
VERSIONING_PARTITION
:
err
+=
str
.
append
(
STRING_WITH_LEN
(
"SYSTEM_TIME"
));
err
+=
str
.
append
(
STRING_WITH_LEN
(
"SYSTEM_TIME
"
));
break
;
default:
DBUG_ASSERT
(
0
);
...
...
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