From df1fab9d45cb7ffb3cf850d933341be13f7f416b Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 5 Feb 2005 06:23:23 +0300 Subject: Fix for BUG#7519: Index statistics is not displayed after ANALYZE for temporary tables: Call file->extra() with HA_STATUS_CONST in mysqld_show_keys. The fix will not be merged into 4.1/5.0 because they don't have this problem already. mysql-test/r/show_check.result: Testcase for BUG#7519 mysql-test/t/show_check.test: Testcase for BUG#7519 sql/sql_show.cc: Fix for BUG#7519: Index statistics is not displayed after ANALYZE for temporary tables: When handling "SHOW INDEX" the call file->extra(HA_STATUS_CONST | ...) is made for regular tables but bypassed for temporary tables. Call file->extra() with HA_STATUS_CONST in mysqld_show_keys to make sure we're always using the current index cardinality values. --- sql/sql_show.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 2506033cda5..27246729162 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -686,7 +686,8 @@ mysqld_show_keys(THD *thd, TABLE_LIST *table_list) String *packet= &thd->packet; KEY *key_info=table->key_info; - table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_TIME); + table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_TIME | + HA_STATUS_CONST); for (uint i=0 ; i < table->keys ; i++,key_info++) { KEY_PART_INFO *key_part= key_info->key_part; -- cgit v1.2.1