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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ea5d2043
Commit
ea5d2043
authored
Sep 07, 2009
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix to ensure that all subpartitions gets deleted before renaming starts, BUG#47029
parent
80d872bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
mysql-test/r/partition_innodb.result
mysql-test/r/partition_innodb.result
+14
-0
mysql-test/t/partition_innodb.test
mysql-test/t/partition_innodb.test
+17
-0
sql/ha_partition.cc
sql/ha_partition.cc
+1
-0
No files found.
mysql-test/r/partition_innodb.result
View file @
ea5d2043
drop table if exists t1;
create table t1 (a int not null,
b datetime not null,
primary key (a,b))
engine=innodb
partition by range (to_days(b))
subpartition by hash (a)
subpartitions 2
( partition p0 values less than (to_days('2009-01-01')),
partition p1 values less than (to_days('2009-02-01')),
partition p2 values less than (to_days('2009-03-01')),
partition p3 values less than maxvalue);
alter table t1 reorganize partition p1,p2 into
( partition p2 values less than (to_days('2009-03-01')));
drop table t1;
CREATE TABLE t1 (id INT PRIMARY KEY, data INT) ENGINE = InnoDB
PARTITION BY RANGE(id) (
PARTITION p0 VALUES LESS THAN (5),
...
...
mysql-test/t/partition_innodb.test
View file @
ea5d2043
...
...
@@ -5,6 +5,23 @@
drop
table
if
exists
t1
;
--
enable_warnings
#
# Bug#47029: Crash when reorganize partition with subpartition
#
create
table
t1
(
a
int
not
null
,
b
datetime
not
null
,
primary
key
(
a
,
b
))
engine
=
innodb
partition
by
range
(
to_days
(
b
))
subpartition
by
hash
(
a
)
subpartitions
2
(
partition
p0
values
less
than
(
to_days
(
'2009-01-01'
)),
partition
p1
values
less
than
(
to_days
(
'2009-02-01'
)),
partition
p2
values
less
than
(
to_days
(
'2009-03-01'
)),
partition
p3
values
less
than
maxvalue
);
alter
table
t1
reorganize
partition
p1
,
p2
into
(
partition
p2
values
less
than
(
to_days
(
'2009-03-01'
)));
drop
table
t1
;
#
# Bug#40595: Non-matching rows not released with READ-COMMITTED on tables
# with partitions
...
...
sql/ha_partition.cc
View file @
ea5d2043
...
...
@@ -705,6 +705,7 @@ int ha_partition::rename_partitions(const char *path)
if
(
m_is_sub_partitioned
)
{
List_iterator
<
partition_element
>
sub_it
(
part_elem
->
subpartitions
);
j
=
0
;
do
{
sub_elem
=
sub_it
++
;
...
...
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