From 1727aec6304caec3326298f3026384436de48818 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Apr 2006 14:11:54 -0400 Subject: BUG#19067: Alter table add partition for subpartitioned table crashes Changed variable name for improved clarity and debugging possibilities Fixed bug in not assigning subpart_type mysql-test/t/partition.test: Added new test case sql/partition_info.cc: Changed variable name for improved clarity and debugging possibilities Fixed bug in not assigning subpart_type sql/sql_partition.cc: Changed variable name for improved clarity and debugging possibilities Fixed bug in not assigning subpart_type --- mysql-test/t/partition.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 272cdc27af6..16edabd7912 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1009,4 +1009,15 @@ select auto_increment from information_schema.tables where table_name='t1'; select * from t1; drop table t1; +# +# 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)); +alter table t1 reorganize partition p1 into (partition p1 values less than (3)); +drop table t1; + --echo End of 5.1 tests -- cgit v1.2.1 From 661537c744232bb2e110bf9e8973deb962d2a72b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Apr 2006 08:43:07 -0400 Subject: BUG#19067: Crash when ALTER TABLE for default subpartitioned table mysql-test/r/partition.result: New test cases mysql-test/r/partition_02myisam.result: ENGINE always specified per partition in show table mysql-test/t/partition.test: New test cases sql/partition_element.h: New copy constructor for partition_element sql/partition_info.cc: Use new copy constructor to ensure default subpartitions inherit partition options from parent Ensure engine is always set on both partitions and subpartitions sql/sql_partition.cc: Removed unneeded bool to generate_partition_syntax Write partition options also for subpartitioned tables when subpartitioning is by default Set up defaults for new partitions also in REORGANIZE PARTITION sql/sql_partition.h: Removed unneeded parameter to generate_partition_syntax call sql/sql_show.cc: Removed unneeded parameter to generate_partition_syntax call sql/sql_table.cc: Removed unneeded parameter to generate_partition_syntax call --- mysql-test/t/partition.test | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'mysql-test/t') diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 16edabd7912..9316a4afc70 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -9,6 +9,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 # @@ -1009,15 +1022,5 @@ select auto_increment from information_schema.tables where table_name='t1'; select * from t1; drop table t1; -# -# 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)); -alter table t1 reorganize partition p1 into (partition p1 values less than (3)); -drop table t1; --echo End of 5.1 tests -- cgit v1.2.1