From: Date: March 14 2006 9:51am Subject: bk commit into 5.1 tree (mikael:1.2178) List-Archive: http://lists.mysql.com/commits/3807 Message-Id: <200603140851.k2E8pneG017999@localhost.localdomain> Below is the list of changes that have just been committed into a local 5.1 repository of mikael. When mikael does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2178 06/03/14 00:51:44 mikael@zim.(none) +4 -0 Merge mronstrom@stripped:/home/bk/mysql-5.1-new into zim.(none):/home/mikael/bug15961 mysql-test/t/partition.test 1.23 06/03/14 00:51:36 mikael@zim.(none) +0 -1 manual merge mysql-test/r/partition.result 1.20 06/03/14 00:51:36 mikael@zim.(none) +0 -0 manual merge sql/sql_partition.cc 1.47 06/03/14 00:43:24 mikael@zim.(none) +0 -0 Auto merged sql/share/errmsg.txt 1.89 06/03/14 00:43:24 mikael@zim.(none) +0 -0 Auto merged # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: mikael # Host: zim.(none) # Root: /home/mikael/bug15961/RESYNC --- 1.88/sql/share/errmsg.txt 2006-03-08 09:48:35 -08:00 +++ 1.89/sql/share/errmsg.txt 2006-03-14 00:43:24 -08:00 @@ -5614,6 +5614,10 @@ ER_PARTITION_SUBPARTITION_ERROR eng "Subpartitions can only be hash partitions and by key" swe "Subpartitioner kan bara vara hash och key partitioner" +ER_PARTITION_SUBPART_MIX_ERROR + eng "Must define subpartitions on all partitions if on one partition" + swe "Subpartitioner mÃ¥ste definieras pÃ¥ alla partitioner om pÃ¥ en" + ER_PARTITION_WRONG_NO_PART_ERROR eng "Wrong number of partitions defined, mismatch with previous setting" swe "Antal partitioner definierade och antal partitioner är inte lika" --- 1.19/mysql-test/r/partition.result 2006-03-13 06:19:43 -08:00 +++ 1.20/mysql-test/r/partition.result 2006-03-14 00:51:36 -08:00 @@ -428,6 +428,10 @@ alter table t1 rebuild partition; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 drop table t1; +create table t1 (a int) +partition by hash (a) +(partition p0 (subpartition sp0)); +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning create table t1 (a int) engine=innodb partition by hash(a) ; show table status like 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment --- 1.22/mysql-test/t/partition.test 2006-03-13 06:20:12 -08:00 +++ 1.23/mysql-test/t/partition.test 2006-03-14 00:51:36 -08:00 @@ -553,6 +553,14 @@ drop table t1; # +# BUG 15961 No error when subpartition defined without subpartition by clause +# +--error ER_SUBPARTITION_ERROR +create table t1 (a int) +partition by hash (a) +(partition p0 (subpartition sp0)); + +# # Bug #14673: Wrong InnoDB default row format # create table t1 (a int) engine=innodb partition by hash(a) ; --- 1.46/sql/sql_partition.cc 2006-03-14 00:39:00 -08:00 +++ 1.47/sql/sql_partition.cc 2006-03-14 00:43:24 -08:00 @@ -4068,6 +4068,15 @@ { DBUG_ENTER("prep_alter_part_table"); + /* + We are going to manipulate the partition info on the table object + so we need to ensure that the data structure of the table object + is freed by setting version to 0. table->s->version= 0 forces a + flush of the table object in close_thread_tables(). + */ + if (table->part_info) + table->s->version= 0L; + if (alter_info->flags & (ALTER_ADD_PARTITION | ALTER_DROP_PARTITION | ALTER_COALESCE_PARTITION | ALTER_REORGANIZE_PARTITION | @@ -4076,19 +4085,12 @@ ALTER_REPAIR_PARTITION | ALTER_REBUILD_PARTITION)) { partition_info *tab_part_info= table->part_info; + uint flags= 0; if (!tab_part_info) { my_error(ER_PARTITION_MGMT_ON_NONPARTITIONED, MYF(0)); DBUG_RETURN(TRUE); } - /* - We are going to manipulate the partition info on the table object - so we need to ensure that the data structure of the table object - is freed by setting version to 0. table->s->version= 0 forces a - flush of the table object in close_thread_tables(). - */ - uint flags= 0; - table->s->version= 0L; if (alter_info->flags == ALTER_TABLE_REORG) { uint new_part_no, curr_part_no;