Bug #15408 Partitions: subpartition names are not unique
Submitted: 2 Dec 2005 3:16 Modified: 8 Mar 2006 16:22
Reporter: Peter Gulutzan
Status: Closed
Category:Server: Partition Severity:S3 (Non-critical)
Version:5.1.4-alpha-debug OS:Linux (linux)
Assigned to: Reggie Burnett Target Version:

[2 Dec 2005 3:16] Peter Gulutzan
Description:
I can define two subpartitions with the same name.
That's no good. All subpartition names should be
unique within the table, even if the subpartitions
belong to different partitions.
 

How to repeat:
mysql> create table tpp (s1 int, s2 int) partition by list (s1)  (partition p1 values in
(0) (subpartition p1b), partition p2 values in (2) (subpartition p1b));
Query OK, 0 rows affected (0.00 sec)
[6 Jan 2006 19:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/716
[16 Feb 2006 22:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2752
[22 Feb 2006 0:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3004
[23 Feb 2006 12:18] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented functionality change in 5.1.7 changelog. Closed.
[24 Feb 2006 21:11] Peter Gulutzan
I am still able to create one table with two subpartitions with the same name, thus:

mysql> create table t2 (s1 int) partition by list (s1) subpartition by hash(s1)          
                                 (partition p1 values in (1) (subpartition s0), partition
p2 values in (2) (subpa                                           rtition `s0 `));
Query OK, 0 rows affected (0.01 sec)

mysql> show create table t2;
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                   
                                                                                          
                                                                                          
 |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t2    | CREATE TABLE `t2` (
  `s1` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY LIST (s1) SUBPARTITION BY HASH (s1)
(PARTITION p1 VALUES IN (1)  (SUBPARTITION s0 ENGINE = MyISAM), PARTITION p2 VALUES IN
(2)  (SUBPARTITION s0 ENGINE = MyISAM)) |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

... so I changed the bug status back to 'verified'.
[24 Feb 2006 21:35] Peter Gulutzan
When closing again, please look at the manual:
http://dev.mysql.com/doc/refman/5.1/en/partitioning-subpartitions.html
The page still says that:
"Names of subpartitions must be unique within each partition, but do not
have to be unique within the table as a whole."
[6 Mar 2006 6:21] Reggie Burnett
This is, in fact, fixed.  You have found a different bug.  Show create table appears to be
trimming space from the end of the subpart names and therefore they are shown as not
having a trailing space.  

Stefan,

We need to modify this documentation page to indicate that subparts names now have to be
unique across the entire table.

http://dev.mysql.com/doc/refman/5.1/en/partitioning-subpartitions.html
[8 Mar 2006 16:22] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented feature change in 5.1.8 changelog and Partitioning chapter in 5.1 Manual.
Closed.