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
f8bbea4b
Commit
f8bbea4b
authored
May 27, 2006
by
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#19830: ALTER TABLE REORGANIZE partition crashes
New test cases added
parent
cdc9025e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
219 additions
and
0 deletions
+219
-0
mysql-test/r/partition_range.result
mysql-test/r/partition_range.result
+105
-0
mysql-test/t/partition_range.test
mysql-test/t/partition_range.test
+114
-0
No files found.
mysql-test/r/partition_range.result
View file @
f8bbea4b
...
...
@@ -387,3 +387,108 @@ ALTER TABLE t1 DROP PARTITION p0;
ALTER TABLE t1 DROP PARTITION p1;
ALTER TABLE t1 DROP PARTITION p2;
drop table t1;
create table t1 (a int DEFAULT NULL,
b varchar(30) DEFAULT NULL,
c date DEFAULT NULL)
ENGINE=MYISAM DEFAULT CHARSET=latin1;
insert into t1 values (1, 'abc', '1995-01-01');
insert into t1 values (1, 'abc', '1995-01-02');
insert into t1 values (1, 'abc', '1995-01-03');
insert into t1 values (1, 'abc', '1995-01-04');
insert into t1 values (1, 'abc', '1995-01-05');
insert into t1 values (1, 'abc', '1995-01-06');
insert into t1 values (1, 'abc', '1995-01-07');
insert into t1 values (1, 'abc', '1995-01-08');
insert into t1 values (1, 'abc', '1995-01-09');
insert into t1 values (1, 'abc', '1995-01-10');
insert into t1 values (1, 'abc', '1995-01-11');
insert into t1 values (1, 'abc', '1995-01-12');
insert into t1 values (1, 'abc', '1995-01-13');
insert into t1 values (1, 'abc', '1995-01-14');
insert into t1 values (1, 'abc', '1995-01-15');
insert into t1 values (1, 'abc', '1997-01-01');
insert into t1 values (1, 'abc', '1997-01-02');
insert into t1 values (1, 'abc', '1997-01-03');
insert into t1 values (1, 'abc', '1997-01-04');
insert into t1 values (1, 'abc', '1997-01-05');
insert into t1 values (1, 'abc', '1997-01-06');
insert into t1 values (1, 'abc', '1997-01-07');
insert into t1 values (1, 'abc', '1997-01-08');
insert into t1 values (1, 'abc', '1997-01-09');
insert into t1 values (1, 'abc', '1997-01-10');
insert into t1 values (1, 'abc', '1997-01-11');
insert into t1 values (1, 'abc', '1997-01-12');
insert into t1 values (1, 'abc', '1997-01-13');
insert into t1 values (1, 'abc', '1997-01-14');
insert into t1 values (1, 'abc', '1997-01-15');
insert into t1 values (1, 'abc', '1998-01-01');
insert into t1 values (1, 'abc', '1998-01-02');
insert into t1 values (1, 'abc', '1998-01-03');
insert into t1 values (1, 'abc', '1998-01-04');
insert into t1 values (1, 'abc', '1998-01-05');
insert into t1 values (1, 'abc', '1998-01-06');
insert into t1 values (1, 'abc', '1998-01-07');
insert into t1 values (1, 'abc', '1998-01-08');
insert into t1 values (1, 'abc', '1998-01-09');
insert into t1 values (1, 'abc', '1998-01-10');
insert into t1 values (1, 'abc', '1998-01-11');
insert into t1 values (1, 'abc', '1998-01-12');
insert into t1 values (1, 'abc', '1998-01-13');
insert into t1 values (1, 'abc', '1998-01-14');
insert into t1 values (1, 'abc', '1998-01-15');
insert into t1 values (1, 'abc', '1999-01-01');
insert into t1 values (1, 'abc', '1999-01-02');
insert into t1 values (1, 'abc', '1999-01-03');
insert into t1 values (1, 'abc', '1999-01-04');
insert into t1 values (1, 'abc', '1999-01-05');
insert into t1 values (1, 'abc', '1999-01-06');
insert into t1 values (1, 'abc', '1999-01-07');
insert into t1 values (1, 'abc', '1999-01-08');
insert into t1 values (1, 'abc', '1999-01-09');
insert into t1 values (1, 'abc', '1999-01-10');
insert into t1 values (1, 'abc', '1999-01-11');
insert into t1 values (1, 'abc', '1999-01-12');
insert into t1 values (1, 'abc', '1999-01-13');
insert into t1 values (1, 'abc', '1999-01-14');
insert into t1 values (1, 'abc', '1999-01-15');
insert into t1 values (1, 'abc', '2000-01-01');
insert into t1 values (1, 'abc', '2000-01-02');
insert into t1 values (1, 'abc', '2000-01-03');
insert into t1 values (1, 'abc', '2000-01-04');
insert into t1 values (1, 'abc', '2000-01-05');
insert into t1 values (1, 'abc', '2000-01-06');
insert into t1 values (1, 'abc', '2000-01-07');
insert into t1 values (1, 'abc', '2000-01-08');
insert into t1 values (1, 'abc', '2000-01-09');
insert into t1 values (1, 'abc', '2000-01-15');
insert into t1 values (1, 'abc', '2000-01-11');
insert into t1 values (1, 'abc', '2000-01-12');
insert into t1 values (1, 'abc', '2000-01-13');
insert into t1 values (1, 'abc', '2000-01-14');
insert into t1 values (1, 'abc', '2000-01-15');
insert into t1 values (1, 'abc', '2001-01-01');
insert into t1 values (1, 'abc', '2001-01-02');
insert into t1 values (1, 'abc', '2001-01-03');
insert into t1 values (1, 'abc', '2001-01-04');
insert into t1 values (1, 'abc', '2001-01-05');
insert into t1 values (1, 'abc', '2001-01-06');
insert into t1 values (1, 'abc', '2001-01-07');
insert into t1 values (1, 'abc', '2001-01-08');
insert into t1 values (1, 'abc', '2001-01-09');
insert into t1 values (1, 'abc', '2001-01-15');
insert into t1 values (1, 'abc', '2001-01-11');
insert into t1 values (1, 'abc', '2001-01-12');
insert into t1 values (1, 'abc', '2001-01-13');
insert into t1 values (1, 'abc', '2001-01-14');
insert into t1 values (1, 'abc', '2001-01-15');
alter table t1
partition by range (year(c))
(partition p5 values less than (2000), partition p10 values less than (2010));
alter table t1
reorganize partition p5 into
(partition p1 values less than (1996),
partition p2 values less than (1997),
partition p3 values less than (1998),
partition p4 values less than (1999),
partition p5 values less than (2000));
drop table t1;
mysql-test/t/partition_range.test
View file @
f8bbea4b
...
...
@@ -416,3 +416,117 @@ ALTER TABLE t1 DROP PARTITION p0;
ALTER
TABLE
t1
DROP
PARTITION
p1
;
ALTER
TABLE
t1
DROP
PARTITION
p2
;
drop
table
t1
;
#
# Bug 19830: ALTER TABLE t1 REORGANIZE PARTITION crashes
#
create
table
t1
(
a
int
DEFAULT
NULL
,
b
varchar
(
30
)
DEFAULT
NULL
,
c
date
DEFAULT
NULL
)
ENGINE
=
MYISAM
DEFAULT
CHARSET
=
latin1
;
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-01'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-02'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-03'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-04'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-05'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-06'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-07'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-08'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-09'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-10'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-11'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-12'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-13'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-14'
);
insert
into
t1
values
(
1
,
'abc'
,
'1995-01-15'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-01'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-02'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-03'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-04'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-05'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-06'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-07'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-08'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-09'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-10'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-11'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-12'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-13'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-14'
);
insert
into
t1
values
(
1
,
'abc'
,
'1997-01-15'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-01'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-02'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-03'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-04'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-05'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-06'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-07'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-08'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-09'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-10'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-11'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-12'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-13'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-14'
);
insert
into
t1
values
(
1
,
'abc'
,
'1998-01-15'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-01'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-02'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-03'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-04'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-05'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-06'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-07'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-08'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-09'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-10'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-11'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-12'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-13'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-14'
);
insert
into
t1
values
(
1
,
'abc'
,
'1999-01-15'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-01'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-02'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-03'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-04'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-05'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-06'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-07'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-08'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-09'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-15'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-11'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-12'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-13'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-14'
);
insert
into
t1
values
(
1
,
'abc'
,
'2000-01-15'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-01'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-02'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-03'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-04'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-05'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-06'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-07'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-08'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-09'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-15'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-11'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-12'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-13'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-14'
);
insert
into
t1
values
(
1
,
'abc'
,
'2001-01-15'
);
alter
table
t1
partition
by
range
(
year
(
c
))
(
partition
p5
values
less
than
(
2000
),
partition
p10
values
less
than
(
2010
));
alter
table
t1
reorganize
partition
p5
into
(
partition
p1
values
less
than
(
1996
),
partition
p2
values
less
than
(
1997
),
partition
p3
values
less
than
(
1998
),
partition
p4
values
less
than
(
1999
),
partition
p5
values
less
than
(
2000
));
drop
table
t1
;
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