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

Fix for BUG#9439:

Changed type of "Sub_part" column in SHOW KEYS from TINYINT to SMALLINT (as MAX_KEY_LENGTH=1024)
(this is the final cset with proper tests)
This commit is contained in:
sergefp@mysql.com
2005-04-16 23:35:39 +04:00
parent 62079eca1c
commit 6b4e759cf7
3 changed files with 34 additions and 2 deletions

View File

@@ -980,7 +980,7 @@ mysqld_show_keys(THD *thd, TABLE_LIST *table_list)
field_list.push_back(item=new Item_int("Cardinality",0,21));
item->maybe_null=1;
field_list.push_back(item=new Item_return_int("Sub_part",3,
MYSQL_TYPE_TINY));
MYSQL_TYPE_SHORT));
item->maybe_null=1;
field_list.push_back(item=new Item_empty_string("Packed",10));
item->maybe_null=1;
@@ -1025,7 +1025,7 @@ 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_short((longlong) key_part->length /
key_part->field->charset()->mbmaxlen);
else
protocol->store_null();