1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#7943: Wrong prefix lengths reported on UTF-8 columns

SHOW KEYS FROM t1 now displays number of characters in Sub_part,
not number of bytes, to be compatible with SHOW CREATE TABLE.
This commit is contained in:
bar@mysql.com
2005-01-21 16:49:20 +04:00
parent e0df86cd35
commit 2f6e0864ad
2 changed files with 4 additions and 3 deletions

View File

@ -1025,7 +1025,8 @@ mysqld_show_keys(THD *thd, TABLE_LIST *table_list)
/* Check if we have a key part that only uses part of the field */
if (!(key_info->flags & HA_FULLTEXT) && (!key_part->field ||
key_part->length != table->field[key_part->fieldnr-1]->key_length()))
protocol->store_tiny((longlong) key_part->length);
protocol->store_tiny((longlong) key_part->length /
key_part->field->charset()->mbmaxlen);
else
protocol->store_null();
protocol->store_null(); // No pack_information yet