From 9e5325ab5ccbee693e2837865786c65888b75658 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 16 Apr 2005 23:35:39 +0400 Subject: 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) mysql-test/r/show_check.result: Testcase for BUG#9439 mysql-test/t/show_check.test: Testcase for BUG#9439 sql/sql_show.cc: Fix for BUG#9439: Changed type of "Sub_part" column in SHOW KEYS from TINYINT to SMALLINT (as MAX_KEY_LENGTH=1024) --- sql/sql_show.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/sql_show.cc b/sql/sql_show.cc index f979b3ca771..7e0ee0dab68 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -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(); -- cgit v1.2.1