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.2179 06/03/14 01:24:06 mikael@zim.(none) +3 -0
Merge zim.(none):/home/mikael/bug15961
into zim.(none):/home/mikael/bug16370
mysql-test/t/partition.test
1.24 06/03/14 01:23:59 mikael@zim.(none) +8 -8
manual merge
mysql-test/r/partition.result
1.21 06/03/14 01:23:59 mikael@zim.(none) +3 -4
manual merge
sql/sql_partition.cc
1.48 06/03/14 01:13:27 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/bug16370/RESYNC
--- 1.20/mysql-test/r/partition.result 2006-03-14 00:51:36 -08:00
+++ 1.21/mysql-test/r/partition.result 2006-03-14 01:23:59 -08:00
@@ -429,6 +429,53 @@
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
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
--- 1.23/mysql-test/t/partition.test 2006-03-14 00:51:36 -08:00
+++ 1.24/mysql-test/t/partition.test 2006-03-14 01:23:59 -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 15961 No error when subpartition defined without subpartition by clause
#
--error ER_SUBPARTITION_ERROR
--- 1.47/sql/sql_partition.cc 2006-03-14 01:07:21 -08:00
+++ 1.48/sql/sql_partition.cc 2006-03-14 01:13:27 -08:00
@@ -692,12 +692,19 @@
char *same_name;
DBUG_ENTER("check_partition_info");
+ if (unlikely(!part_info->is_sub_partitioned() &&
+ !(part_info->use_default_subpartitions &&
+ part_info->use_default_no_subpartitions)))
+ {
+ my_error(ER_SUBPARTITION_ERROR, MYF(0));
+ goto end;
+ }
if (unlikely(part_info->is_sub_partitioned() &&
(!(part_info->part_type == RANGE_PARTITION ||
part_info->part_type == LIST_PARTITION))))
{
/* Only RANGE and LIST partitioning can be subpartitioned */
- my_error(ER_SUBPARTITION_ERROR, MYF(0));
+ my_error(ER_PARTITION_SUBPART_MIX_ERROR, MYF(0));
goto end;
}
if (unlikely(part_info->set_up_defaults_for_partitioning(file,
| Thread |
|---|
| • bk commit into 5.1 tree (mikael:1.2179) | Mikael | 14 Mar |