summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2005-04-16 23:35:39 +0400
committersergefp@mysql.com <>2005-04-16 23:35:39 +0400
commit6b4e759cf77b4193c1b8152bef8d10c0be1edf8a (patch)
tree9e457f16f8e9bf7d9240be2a5ad78046d134ab09 /sql/sql_show.cc
parent62079eca1c25657c6cc0d1e2cfdfd6e7a6ea7d01 (diff)
downloadmariadb-git-6b4e759cf77b4193c1b8152bef8d10c0be1edf8a.tar.gz
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)
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc4
1 files changed, 2 insertions, 2 deletions
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();