MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Mikael Date:March 14 2006 9:07am
Subject:bk commit into 5.1 tree (mikael:1.2178)
View as plain text  
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 01:07:29 mikael@zim.(none) +3 -0
  Merge mronstrom@stripped:/home/bk/mysql-5.1-new
  into  zim.(none):/home/mikael/bug16370

  sql/sql_partition.cc
    1.47 06/03/14 01:07:21 mikael@zim.(none) +1 -1
    manual merge

  mysql-test/t/partition.test
    1.23 06/03/14 01:07:21 mikael@zim.(none) +0 -0
    manual merge

  mysql-test/r/partition.result
    1.20 06/03/14 01:07:21 mikael@zim.(none) +0 -0
    manual merge

# 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/bug16370/RESYNC

--- 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 01:07:21 -08:00
@@ -428,6 +428,54 @@
 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 list (a)
+(partition p0 values in (5));
+insert into t1 values (0);
+ERROR HY000: Table has no partition for value 0
+drop table t1;
+create table t1 (a int)
+partition by range (a) subpartition by hash (a)
+(partition p0 values less than (100));
+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) )
+alter table t1 add partition (partition p1 values less than (200)
+(subpartition subpart21));
+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)  (SUBPARTITION p0sp0 ENGINE = MyISAM), PARTITION p1 VALUES LESS THAN (200)  (SUBPARTITION subpart21 ENGINE = MyISAM))
+drop table t1;
+create table t1 (a int)
+partition by key (a);
+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) 
+alter table t1 add partition (partition p1);
+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) (PARTITION p0  ENGINE = MyISAM, PARTITION p1  ENGINE = MyISAM)
+drop table t1;
+create table t1 (a int, b int)
+partition by range (a)
+subpartition by hash(a)
+(partition p0 values less than (0) (subpartition sp0),
+partition p1 values less than (1));
+ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ')' at line 5
+create table t1 (a int, b int)
+partition by range (a)
+subpartition by hash(a)
+(partition p0 values less than (0),
+partition p1 values less than (1) (subpartition sp0));
+ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 5
 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 01:07:21 -08:00
@@ -553,6 +553,59 @@
 drop table t1;
 
 #
+# BUG 15253 Insert that should fail doesn't
+#
+create table t1 (a int)
+partition by list (a)
+(partition p0 values in (5));
+
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+insert into t1 values (0);
+
+drop table t1;
+
+#
+# BUG #16370 Subpartitions names not shown in SHOW CREATE TABLE output
+#
+create table t1 (a int)
+partition by range (a) subpartition by hash (a)
+(partition p0 values less than (100));
+
+show create table t1;
+alter table t1 add partition (partition p1 values less than (200)
+(subpartition subpart21));
+
+show create table t1;
+
+drop table t1;
+
+create table t1 (a int)
+partition by key (a);
+
+show create table t1;
+alter table t1 add partition (partition p1);
+show create table t1;
+
+drop table t1;
+
+#
+# BUG 15407 Crash with subpartition
+#
+--error 1064
+create table t1 (a int, b int)
+partition by range (a)
+subpartition by hash(a)
+(partition p0 values less than (0) (subpartition sp0),
+ partition p1 values less than (1));
+
+--error 1064
+create table t1 (a int, b int)
+partition by range (a)
+subpartition by hash(a)
+(partition p0 values less than (0),
+ partition p1 values less than (1) (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-11 06:32:19 -08:00
+++ 1.47/sql/sql_partition.cc	2006-03-14 01:07:21 -08:00
@@ -4061,6 +4061,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 |
@@ -4070,19 +4079,12 @@
   {
     partition_info *tab_part_info= table->part_info;
     partition_info *alt_part_info= thd->lex->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;
Thread
bk commit into 5.1 tree (mikael:1.2178)Mikael14 Mar