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
dfb6f96e
Commit
dfb6f96e
authored
Feb 21, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15190 Bad error for non-versioned table PARTITION BY SYSTEM_TIME
parent
edeeaac4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
mysql-test/suite/versioning/r/partition.result
mysql-test/suite/versioning/r/partition.result
+2
-2
mysql-test/suite/versioning/t/partition.test
mysql-test/suite/versioning/t/partition.test
+2
-2
sql/partition_info.cc
sql/partition_info.cc
+2
-1
sql/sql_table.cc
sql/sql_table.cc
+6
-0
No files found.
mysql-test/suite/versioning/r/partition.result
View file @
dfb6f96e
...
@@ -42,13 +42,13 @@ create or replace table t1 (x int)
...
@@ -42,13 +42,13 @@ create or replace table t1 (x int)
partition by system_time (
partition by system_time (
partition p0 history,
partition p0 history,
partition pn current);
partition pn current);
ERROR HY000: T
ransaction system versioning for `t1` is not support
ed
ERROR HY000: T
able `t1` is not system-version
ed
create or replace table t1 (x int);
create or replace table t1 (x int);
alter table t1
alter table t1
partition by system_time (
partition by system_time (
partition p0 history,
partition p0 history,
partition pn current);
partition pn current);
Got one of the listed errors
ERROR HY000: Table `t1` is not system-versioned
create or replace table t1 (x int)
create or replace table t1 (x int)
with system versioning
with system versioning
partition by system_time (
partition by system_time (
...
...
mysql-test/suite/versioning/t/partition.test
View file @
dfb6f96e
...
@@ -33,14 +33,14 @@ eval alter table t1 engine=$non_default_engine;
...
@@ -33,14 +33,14 @@ eval alter table t1 engine=$non_default_engine;
--
echo
## CREATE TABLE
--
echo
## CREATE TABLE
--
error
ER_VERS_
ENGINE_UNSUPPORT
ED
--
error
ER_VERS_
NOT_VERSION
ED
create
or
replace
table
t1
(
x
int
)
create
or
replace
table
t1
(
x
int
)
partition
by
system_time
(
partition
by
system_time
(
partition
p0
history
,
partition
p0
history
,
partition
pn
current
);
partition
pn
current
);
create
or
replace
table
t1
(
x
int
);
create
or
replace
table
t1
(
x
int
);
--
error
ER_VERS_
ENGINE_UNSUPPORTED
,
ER_VERS_ENGINE_UNSUPPORT
ED
--
error
ER_VERS_
NOT_VERSION
ED
alter
table
t1
alter
table
t1
partition
by
system_time
(
partition
by
system_time
(
partition
p0
history
,
partition
p0
history
,
...
...
sql/partition_info.cc
View file @
dfb6f96e
...
@@ -928,7 +928,8 @@ bool partition_info::vers_setup_expression(THD * thd, uint32 alter_add)
...
@@ -928,7 +928,8 @@ bool partition_info::vers_setup_expression(THD * thd, uint32 alter_add)
{
{
if
(
!
table
->
versioned
())
if
(
!
table
->
versioned
())
{
{
my_error
(
ER_VERS_ENGINE_UNSUPPORTED
,
MYF
(
0
),
table
->
s
->
table_name
.
str
);
// frm must be corrupted, normally CREATE/ALTER TABLE checks for that
my_error
(
ER_FILE_CORRUPT
,
MYF
(
0
),
table
->
s
->
path
.
str
);
return
true
;
return
true
;
}
}
...
...
sql/sql_table.cc
View file @
dfb6f96e
...
@@ -4641,6 +4641,12 @@ handler *mysql_create_frm_image(THD *thd,
...
@@ -4641,6 +4641,12 @@ handler *mysql_create_frm_image(THD *thd,
goto
err
;
goto
err
;
part_info
->
default_engine_type
=
engine_type
;
part_info
->
default_engine_type
=
engine_type
;
if
(
part_info
->
vers_info
&&
!
create_info
->
versioned
())
{
my_error
(
ER_VERS_NOT_VERSIONED
,
MYF
(
0
),
table_name
->
str
);
goto
err
;
}
/*
/*
We reverse the partitioning parser and generate a standard format
We reverse the partitioning parser and generate a standard format
for syntax stored in frm file.
for syntax stored in frm file.
...
...
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