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

Fix for bug#14271 I_S: columns has no size for (var)binary columns

set character_octet_length, character_maximum_length for
  binary and varbinary field types


mysql-test/r/information_schema.result:
  Fix for bug#14271 I_S: columns has no size for (var)binary columns
    test case
mysql-test/t/information_schema.test:
  Fix for bug#14271 I_S: columns has no size for (var)binary columns
    test case
This commit is contained in:
unknown
2005-12-19 16:21:02 +04:00
parent c7a440d1c6
commit d920097af4
3 changed files with 18 additions and 1 deletions

View File

@@ -2616,7 +2616,9 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
table->field[6]->store((const char*) pos,
strlen((const char*) pos), cs);
is_blob= (field->type() == FIELD_TYPE_BLOB);
if (field->has_charset() || is_blob)
if (field->has_charset() || is_blob ||
field->real_type() == MYSQL_TYPE_VARCHAR || // For varbinary type
field->real_type() == MYSQL_TYPE_STRING) // For binary type
{
longlong char_max_len= is_blob ?
(longlong) field->max_length() / field->charset()->mbminlen :