Increasing a size for COLUMN_COMMENT (INFORMATION_SCHEMA.COLUMNS.COLUMN_COMMENT)

Developed In: None/Text — Contributed by: Kapil Bedarkar

Patch to increase the COLUMN_COMMENT size to 1024 bytes.

This is code patch for MySQL (V.5.1.37), it will need to recompile the MySQL Server.

(*Please note - Changes are not tested with standard mysql testing tools, nor verified for backward compatibility, but seems to be working with some normal operations.)


Kapil Bedarkar
None/Text
  1. diff -cr mysql-5.1.37.edited/sql/sql_show.cc mysql-5.1.37/sql/sql_show.cc
  2. *** mysql-5.1.37.edited/sql/sql_show.cc 2009-07-14 04:42:08.000000000 +0530
  3. --- mysql-5.1.37/sql/sql_show.cc 2009-09-16 18:01:03.000000000 +0530
  4. ***************
  5. *** 6180,6186 ****
  6. {"COLUMN_KEY", 3, MYSQL_TYPE_STRING, 0, 0, "Key", OPEN_FRM_ONLY},
  7. {"EXTRA", 27, MYSQL_TYPE_STRING, 0, 0, "Extra", OPEN_FRM_ONLY},
  8. {"PRIVILEGES", 80, MYSQL_TYPE_STRING, 0, 0, "Privileges", OPEN_FRM_ONLY},
  9. ! {"COLUMN_COMMENT", 255, MYSQL_TYPE_STRING, 0, 0, "Comment", OPEN_FRM_ONLY},
  10. {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
  11. };
  12.  
  13. --- 6180,6186 ----
  14. {"COLUMN_KEY", 3, MYSQL_TYPE_STRING, 0, 0, "Key", OPEN_FRM_ONLY},
  15. {"EXTRA", 27, MYSQL_TYPE_STRING, 0, 0, "Extra", OPEN_FRM_ONLY},
  16. {"PRIVILEGES", 80, MYSQL_TYPE_STRING, 0, 0, "Privileges", OPEN_FRM_ONLY},
  17. ! {"COLUMN_COMMENT", 1024, MYSQL_TYPE_STRING, 0, 0, "Comment", OPEN_FRM_ONLY},
  18. {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
  19. };
  20.  
  21. diff -cr mysql-5.1.37.edited/sql/unireg.cc mysql-5.1.37/sql/unireg.cc
  22. *** mysql-5.1.37.edited/sql/unireg.cc 2009-07-14 04:42:08.000000000 +0530
  23. --- mysql-5.1.37/sql/unireg.cc 2009-09-16 18:01:29.000000000 +0530
  24. ***************
  25. *** 609,615 ****
  26. field->comment.str,
  27. field->comment.str +
  28. field->comment.length,
  29. ! 255);
  30. if (tmp_len < field->comment.length)
  31. {
  32. if ((current_thd->variables.sql_mode &
  33. --- 609,615 ----
  34. field->comment.str,
  35. field->comment.str +
  36. field->comment.length,
  37. ! 1024);
  38. if (tmp_len < field->comment.length)
  39. {
  40. if ((current_thd->variables.sql_mode &
  41.  

You must be logged in to tag this tool

No Comments yet

Votes

Not yet rated.
You must be logged in to vote.

Watches

0 members are watching this tool
You must be logged in to track this tool.

Provide Feedback

Please note:
HTML will be purified, but we allow for a number of HTML tags so that you have the flexibility to decorate your comment text to some extent. The comments allow the following HTML tags:

strong, b, em, blockquote, a, code, pre

To put code into your comment, simply encapsulate your code with
[code language="XXX"][/code], where XXX is any common language, for instance "PHP", "SQL", "C", etc.



You must be logged in to comment