Commit e19b7f19 authored by unknown's avatar unknown

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


sql/sql_show.cc:
  a fix (bug #14207: strange change of values CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH).
  Interchange of CHARACTER_MAXIMUM_LENGTH and CHARACTER_OCTET_LENGTH.
parent d29ecd5e
...@@ -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