Commit 57c432b9 authored by reggie@linux.site's avatar reggie@linux.site

Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  linux.site:/home/reggie/work/mysql-5.1
parents 631b9af2 e389f947
......@@ -112,3 +112,29 @@ ALTER TABLE t1 DROP PARTITION x1;
ALTER TABLE t1 DROP PARTITION x0;
ERROR HY000: Cannot remove all partitions, use DROP TABLE instead
DROP TABLE t1;
CREATE TABLE t1 ( id INT NOT NULL,
fname VARCHAR(50) NOT NULL,
lname VARCHAR(50) NOT NULL,
hired DATE NOT NULL )
PARTITION BY RANGE(YEAR(hired)) (
PARTITION p1 VALUES LESS THAN (1991),
PARTITION p2 VALUES LESS THAN (1996),
PARTITION p3 VALUES LESS THAN (2001),
PARTITION p4 VALUES LESS THAN (2005));
ALTER TABLE t1 ADD PARTITION (
PARTITION p5 VALUES LESS THAN (2010),
PARTITION p6 VALUES LESS THAN MAXVALUE);
DROP TABLE t1;
CREATE TABLE t1 (a INT);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 2;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) PARTITIONS 2
DROP TABLE t1;
......@@ -167,3 +167,29 @@ ALTER TABLE t1 DROP PARTITION x1;
ALTER TABLE t1 DROP PARTITION x0;
DROP TABLE t1;
#
# Bug# 16534 - Trying to add multiple partitions crashes server
#
CREATE TABLE t1 ( id INT NOT NULL,
fname VARCHAR(50) NOT NULL,
lname VARCHAR(50) NOT NULL,
hired DATE NOT NULL )
PARTITION BY RANGE(YEAR(hired)) (
PARTITION p1 VALUES LESS THAN (1991),
PARTITION p2 VALUES LESS THAN (1996),
PARTITION p3 VALUES LESS THAN (2001),
PARTITION p4 VALUES LESS THAN (2005));
ALTER TABLE t1 ADD PARTITION (
PARTITION p5 VALUES LESS THAN (2010),
PARTITION p6 VALUES LESS THAN MAXVALUE);
DROP TABLE t1;
#
#BUG 15523 ALTER TABLE ... PARTITION BY does not work
#
CREATE TABLE t1 (a INT);
SHOW CREATE TABLE t1;
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 2;
SHOW CREATE TABLE t1;
DROP TABLE t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment