Bug #37728 Partitions: too-long comment causes no warning
Submitted: 29 Jun 2008 18:27 Modified: 15 Mar 2012 14:49
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:6.0.6-alpha-debug,5.1 OS:Linux (SUSE 10 | 32-bit)
Assigned to: Mikael Ronström CPU Architecture:Any

[29 Jun 2008 18:27] Peter Gulutzan
Description:
Supposedly the maximum length of a partition comment is 80.
In fact I can create a table with a partition comment longer than that.
And when I say SHOW CREATE TABLE, I see the long comment.
But when I select information_schema.partitions.partition_comment,
I only see 80 characters.

How to repeat:
create table t (s1 int) partition by list (s1) (partition p1 values in (1) comment 'a12345678901234567890123456789012345678901234567890123456789012345678901234567890!');
show create table t;
select partition_comment from information_schema.partitions where table_name='t';
[30 Jun 2008 10:18] Susanne Ebrecht
Verified as described
[30 Jun 2008 10:19] Susanne Ebrecht
Verified by using test from reporter and MySQL 6.0-bzr tree from one hour ago.
[7 Jul 2009 15:46] Tomas Ulin
same in 5.1, updating version info
[14 Mar 2012 16:14] 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 bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[14 Mar 2012 16:15] Jon Stephens
Fixed in 5.6. Documented in the 5.6.6 changelog as follows:

      The 80-character limit on the length of a partition comment
      was not always properly enforced.

Closed.
[15 Mar 2012 14:49] Jon Stephens
Following email discussion with Mattias, updated changelog entry to read:

        The PARTITION_COMMENT column of the 
        INFORMATION_SCHEMA.PARTITIONS table truncated partition comments, 
        displaying only the first 80 characters.

        As part of the fix for this issue, the maximum length for a
        partition comment is now set at 1024 characters, and this width
        is honored by INORMATION_SCHEMA.PARTITIONS.PARTITION_COMMENT.

Issue and fix also noted in I_S.PARTITIONS and CREATE TABLE syntax for partitioning in 5.1/5.5/5.6 Manual as appropraite to version.

Closed.