Bug #48077 Issues with warnings on adding long comments to table/col/index after upgrade
Submitted: 15 Oct 2009 12:04 Modified: 16 Oct 2009 5:24
Reporter: Nidhi Shrotriya Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:6.0.14, 5.5.3-m3, 5.1.47 OS:Any
Assigned to: CPU Architecture:Any
Tags: 6.0-codebase-bugfixing, regression

[15 Oct 2009 12:04] Nidhi Shrotriya
Description:
This is found while testing upgrade/downgrade on WL3736 (long comments supported for tables/columns/indexes).

Table is created as below in 5.1 and upgraded to 6.0. 
CREATE TABLE t1_toupg (c1 INT, c2 VARCHAR(10) COMMENT '01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234') COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';

1) Table name is corrupted in the warning, when alter table to add long comments after upgrade.
 Warnings:
-Warning	1628	Comment for table 't1_toupg' is too long (max = 2048)
+Warning	1628	Comment for table '#sql-3b48_1' is too long (max = 2048)

2) Warnings are shown repeated when below stmts. are run on upgraded table to add columns/indexes with long comments.
Warnings:
 Warning	1629	Comment for field 'c3' is too long (max = 1024)
+Warning	1629	Comment for field 'c3' is too long (max = 1024)

How to repeat:
Attaching the file for stmts. to run after upgrade.
[15 Oct 2009 12:05] Nidhi Shrotriya
Stmts. to run after upgrade

Attachment: bug#48077.odt (application/vnd.oasis.opendocument.text, text), 18.84 KiB.

[16 Oct 2009 5:24] Valeriy Kravchuk
Verified just as described. I've got the same warnings even if table is created in 6.0-codebase initially:

mysql> drop table t1_toupg;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE t1_toupg (c1 INT, c2 VARCHAR(10) COMMENT
    -> '01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678

...

Query OK, 0 rows affected, 1 warning (0.41 sec)

mysql> show warnings\G
*************************** 1. row ***************************
  Level: Warning
   Code: 1629
Message: Comment for field 'c2' is too long (max = 1024)
1 row in set (0.00 sec)

mysql> ALTER TABLE t1_toupg COMMENT='012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012301234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234'; 
Query OK, 0 rows affected, 1 warning (0.39 sec)
Records: 0  Duplicates: 0  Warnings: 1

mysql> show warnings\G
*************************** 1. row ***************************
  Level: Warning
   Code: 1628
Message: Comment for table '#sql-9e81_1' is too long (max = 2048)
1 row in set (0.00 sec)

mysql> select version();
+--------------------+
| version()          |
+--------------------+
| 6.0.14-alpha-debug |
+--------------------+
1 row in set (0.00 sec)
[20 Oct 2009 16:09] Valeriy Kravchuk
In 5.1 one gets:

...
Query OK, 0 rows affected, 2 warnings (0.06 sec)

mysql> show warnings\G
*************************** 1. row ***************************
  Level: Warning
   Code: 1629
Message: Comment for field 'c2' is too long (max = 255)
*************************** 2. row ***************************
  Level: Warning
   Code: 1628
Message: Comment for table 't1_toupg' is too long (max = 60)
2 rows in set (0.00 sec)
[30 Mar 2010 10:49] Nidhi Shrotriya
Present in Celosia build 5.5.3-m3.
[4 Jun 2010 8:39] Nidhi Shrotriya
The issue is not seen in upgraded tables from 5.1 to 5.5.5-m3, whereas seen with tables created in 5.5 and downgraded to 5.1. So the issue need to be fixed in 5.1 now ?