List:Commits« Previous MessageNext Message »
From:holyfoot Date:December 18 2006 10:39am
Subject:bk commit into 5.1 tree (holyfoot:1.2359) BUG#24502
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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@stripped, 2006-12-18 14:39:23+04:00, holyfoot@stripped +3 -0
  bug #24502 (reorganize partition closes connection)
  
  when REORGANIZE creates new partition, no_subparts for that partition
  isn't set right (call handler::set_partitions_defaults always returns 1)
  Normally the number of subpartitions should be inherited from the
  table.

  mysql-test/r/partition.result@stripped, 2006-12-18 14:39:19+04:00, holyfoot@stripped +10 -0
    result fixed

  mysql-test/t/partition.test@stripped, 2006-12-18 14:39:19+04:00, holyfoot@stripped +16 -0
    testcase

  sql/sql_partition.cc@stripped, 2006-12-18 14:39:19+04:00, holyfoot@stripped +1 -0
    no_subparts is set for newly created partitions

# 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:	holyfoot
# Host:	deer.(none)
# Root:	/home/hf/work/24502/my51-24502

--- 1.56/mysql-test/r/partition.result	2006-12-18 14:39:32 +04:00
+++ 1.57/mysql-test/r/partition.result	2006-12-18 14:39:32 +04:00
@@ -1128,4 +1128,14 @@ a
 18446744073709551613
 18446744073709551614
 drop table t1;
+CREATE TABLE t1 (
+num int(11) NOT NULL, cs int(11) NOT NULL)
+PARTITION BY RANGE (num) SUBPARTITION BY HASH (
+cs) SUBPARTITIONS 2 (PARTITION p_X VALUES LESS THAN MAXVALUE);
+ALTER TABLE t1 
+REORGANIZE PARTITION p_X INTO ( 
+PARTITION p_100 VALUES LESS THAN (100), 
+PARTITION p_X VALUES LESS THAN MAXVALUE 
+);
+drop table t1;
 End of 5.1 tests

--- 1.50/mysql-test/t/partition.test	2006-12-18 14:39:32 +04:00
+++ 1.51/mysql-test/t/partition.test	2006-12-18 14:39:32 +04:00
@@ -1354,4 +1354,20 @@ delete from t1 where a = 184467440737095
 select * from t1;
 drop table t1;
 
+#
+# Bug 24502 reorganize partition closes connection
+#
+CREATE TABLE t1 (
+  num int(11) NOT NULL, cs int(11) NOT NULL)
+PARTITION BY RANGE (num) SUBPARTITION BY HASH (
+cs) SUBPARTITIONS 2 (PARTITION p_X VALUES LESS THAN MAXVALUE);
+
+ALTER TABLE t1 
+REORGANIZE PARTITION p_X INTO ( 
+    PARTITION p_100 VALUES LESS THAN (100), 
+    PARTITION p_X VALUES LESS THAN MAXVALUE 
+    );
+
+drop table t1;
+
 --echo End of 5.1 tests

--- 1.96/sql/sql_partition.cc	2006-12-18 14:39:32 +04:00
+++ 1.97/sql/sql_partition.cc	2006-12-18 14:39:32 +04:00
@@ -4739,6 +4739,7 @@ state of p1.
       }
       alt_part_info->part_type= tab_part_info->part_type;
       alt_part_info->subpart_type= tab_part_info->subpart_type;
+      alt_part_info->no_subparts= tab_part_info->no_subparts;
       DBUG_ASSERT(!alt_part_info->use_default_partitions);
       if (alt_part_info->set_up_defaults_for_partitioning(table->file,
                                                           ULL(0), 
Thread
bk commit into 5.1 tree (holyfoot:1.2359) BUG#24502holyfoot18 Dec