-
unknown authored
To the documentor: The DEFAULT value in SHOW COLUMNS/SELECT FROM I_S.COLUMNS was truncated to NAME_LEN (which effectively is 64) characters. mysql-test/r/information_schema.result: Update result Because the length of I_S.COLUMNS.COLUMN_DEFAULT was increased to 65535 the column changed it's type from varchar(64) to longtext The type is longtext if the length is > 65532 (the max varchar len) mysql-test/t/information_schema.test: test case for bug#23037: Bug in field "Default" of query "SHOW COLUMNS FROM table" Both SHOW COLUMNS and I_S.COLUMNS is TESTED as well the value returned by both. Using --replace_regex is unfeasible as the repetition value cannot be > 255. --replace_regex /A{256}/VALUE/ doesn't work, not to talk about /A{65532}/VALUE/ /(A{255}){255}/VALUE/ is awfully slow. Thus, simple function with cursor is used to extract the value. sql/sql_show.cc: Default value can have TIMESTAMP, CHAR, VARCHAR, ENUM VARCHAR can have the longest value, up to 65535. However, because of table handler limitations the actual limit is 65532 characters, latin1 charset. However, here is used MAX_FIELD_VARCHARLENGTH macro, because there could be a storage engine without such limitation.
29947efc