1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix for bug #14290: wrong CHARACTER_MAXIMUM_LENGTH value for some text fields.

This commit is contained in:
ramil@mysql.com
2005-10-25 17:22:58 +05:00
parent c88f0e9c19
commit c06673d49b
3 changed files with 20 additions and 2 deletions

View File

@@ -2559,8 +2559,9 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
is_blob= (field->type() == FIELD_TYPE_BLOB);
if (field->has_charset() || is_blob)
{
longlong char_max_len= is_blob ? (longlong) field->max_length() :
(longlong) field->max_length()/field->charset()->mbmaxlen;
longlong char_max_len= is_blob ?
(longlong) field->max_length() / field->charset()->mbminlen :
(longlong) field->max_length() / field->charset()->mbmaxlen;
table->field[8]->store(char_max_len, TRUE);
table->field[8]->set_notnull();
table->field[9]->store((longlong) field->max_length(), TRUE);