Commit 02c0fe62 authored by ramil@mysql.com's avatar ramil@mysql.com

a fix (bug #14207: strange change of values CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH).

parent 0647d280
...@@ -2559,11 +2559,11 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables, ...@@ -2559,11 +2559,11 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
is_blob= (field->type() == FIELD_TYPE_BLOB); is_blob= (field->type() == FIELD_TYPE_BLOB);
if (field->has_charset() || is_blob) if (field->has_charset() || is_blob)
{ {
longlong c_octet_len= is_blob ? (longlong) field->max_length() : longlong char_max_len= is_blob ? (longlong) field->max_length() :
(longlong) field->max_length()/field->charset()->mbmaxlen; (longlong) field->max_length()/field->charset()->mbmaxlen;
table->field[8]->store((longlong) field->max_length(), TRUE); table->field[8]->store(char_max_len, TRUE);
table->field[8]->set_notnull(); table->field[8]->set_notnull();
table->field[9]->store(c_octet_len, TRUE); table->field[9]->store((longlong) field->max_length(), TRUE);
table->field[9]->set_notnull(); table->field[9]->set_notnull();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment