Bug #17973 Partitions: names can have trailing space
Submitted: 6 Mar 2006 15:56 Modified: 16 Apr 2006 14:38
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version: OS:
Assigned to: Mikael Ronström CPU Architecture:Any

[6 Mar 2006 15:56] Peter Gulutzan
Description:
I can make partitions and subpartitions with trailing
spaces in their names. This in itself might not be an
error (users and procedure variables can also have
trailing spaces in their names). But SHOW CREATE
TABLE doesn't use delimited identifers for partition
or subpartition names, so there is no way to know if
the spaces are there.

How to repeat:
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)
[6 Mar 2006 16:03] MySQL Verification Team
Thank you for the bug report.
[10 Apr 2006 12:20] Mikael Ronström
This is part of the same patch as done for BUG #18750
[12 Apr 2006 8:52] Mikael Ronström
This patch will appear in 5.1.10 (was pushed by the same fix as for BUG 18750)
Was reviewed by Sergey Gluhov
[16 Apr 2006 14:38] 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 in 5.1.10 changelog: Trailing spaces no longer permitted in names of (sub)partitions. Closed.