summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se>2006-05-11 16:03:12 -0400
committerunknown <mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se>2006-05-11 16:03:12 -0400
commit5479f8ded6404e9bb62b5b0f9c75a7d47ef76b63 (patch)
tree9314b0c43cc79b441efe7ec2df80d33033826ac1 /mysql-test
parent3065eeb3f8cff732e1a462b58996105881c7ca88 (diff)
parent10f571384d491cc5a11554a5eed37f1b0c591114 (diff)
downloadmariadb-git-5479f8ded6404e9bb62b5b0f9c75a7d47ef76b63.tar.gz
Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19067 sql/partition_element.h: Auto merged sql/partition_info.cc: Auto merged sql/sql_partition.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Manual merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/partition.result19
-rw-r--r--mysql-test/r/partition_02myisam.result4
-rw-r--r--mysql-test/t/partition.test14
3 files changed, 34 insertions, 3 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 0da071374ea..7aab302b54d 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -1,4 +1,21 @@
drop table if exists t1;
+create table t1 (a int)
+partition by range (a)
+subpartition by key (a)
+(partition p0 values less than (1));
+alter table t1 add partition (partition p1 values less than (2));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (2) ENGINE = MyISAM)
+alter table t1 reorganize partition p1 into (partition p1 values less than (3));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (3) ENGINE = MyISAM)
+drop table t1;
CREATE TABLE t1 (
a int not null,
b int not null,
@@ -570,7 +587,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (100) )
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM)
alter table t1 add partition (partition p1 values less than (200)
(subpartition subpart21));
show create table t1;
diff --git a/mysql-test/r/partition_02myisam.result b/mysql-test/r/partition_02myisam.result
index a7786bfcfbd..147e705f861 100644
--- a/mysql-test/r/partition_02myisam.result
+++ b/mysql-test/r/partition_02myisam.result
@@ -996,7 +996,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL,
`f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (100) , PARTITION part2 VALUES LESS THAN (2147483647) )
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION part2 VALUES LESS THAN (2147483647) ENGINE = MyISAM)
SELECT COUNT(*) = 0 AS my_value FROM t1;
my_value
1
@@ -1098,7 +1098,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL,
`f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (100) , PARTITION part2 VALUES LESS THAN (2147483647) )
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION part2 VALUES LESS THAN (2147483647) ENGINE = MyISAM)
SELECT COUNT(*) = 0 AS my_value FROM t1;
my_value
1
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 272cdc27af6..9316a4afc70 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -10,6 +10,19 @@ drop table if exists t1;
--enable_warnings
#
+# BUG 19067 ALTER TABLE .. ADD PARTITION for subpartitioned table crashes
+#
+create table t1 (a int)
+partition by range (a)
+subpartition by key (a)
+(partition p0 values less than (1));
+alter table t1 add partition (partition p1 values less than (2));
+show create table t1;
+alter table t1 reorganize partition p1 into (partition p1 values less than (3));
+show create table t1;
+drop table t1;
+
+#
# Partition by key no partition defined => OK
#
CREATE TABLE t1 (
@@ -1009,4 +1022,5 @@ select auto_increment from information_schema.tables where table_name='t1';
select * from t1;
drop table t1;
+
--echo End of 5.1 tests