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
11c68827
Commit
11c68827
authored
Dec 25, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
parent
4236f589
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
mysql-test/suite/versioning/r/partition.result
mysql-test/suite/versioning/r/partition.result
+6
-0
mysql-test/suite/versioning/t/partition.test
mysql-test/suite/versioning/t/partition.test
+7
-0
sql/partition_info.cc
sql/partition_info.cc
+5
-1
No files found.
mysql-test/suite/versioning/r/partition.result
View file @
11c68827
...
...
@@ -366,5 +366,11 @@ partition pn current);
set autocommit= off;
truncate table t1;
set autocommit= on;
MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
create or replace table t1 (x int) with system versioning;
lock table t1 write;
alter table t1 partition by system_time interval 1 week (
partition p1 history,
partition pn current);
drop table t1;
drop table t2;
mysql-test/suite/versioning/t/partition.test
View file @
11c68827
...
...
@@ -314,6 +314,13 @@ set autocommit= off;
truncate
table
t1
;
set
autocommit
=
on
;
--
echo
MDEV
-
14747
ALTER
PARTITION
BY
SYSTEM_TIME
after
LOCK
TABLES
create
or
replace
table
t1
(
x
int
)
with
system
versioning
;
lock
table
t1
write
;
alter
table
t1
partition
by
system_time
interval
1
week
(
partition
p1
history
,
partition
pn
current
);
drop
table
t1
;
drop
table
t2
;
...
...
sql/partition_info.cc
View file @
11c68827
...
...
@@ -1057,9 +1057,13 @@ class Table_locker
{
DBUG_ASSERT
(
table
.
file
);
// FIXME: check consistency with table.reginfo.lock_type
if
(
table
.
file
->
get_lock_type
()
!=
F_UNLCK
)
if
(
table
.
file
->
get_lock_type
()
!=
F_UNLCK
||
table
.
s
->
tmp_table
)
{
return
false
;
}
thd
->
lock
=
NULL
;
thd
->
locked_tables_mode
=
LTM_NONE
;
bool
res
=
lock_tables
(
thd
,
&
table_list
,
1
,
0
);
locked
=
!
res
;
return
res
;
...
...
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