summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-02-05 06:23:23 +0300
committerunknown <sergefp@mysql.com>2005-02-05 06:23:23 +0300
commitdf1fab9d45cb7ffb3cf850d933341be13f7f416b (patch)
tree713f7212de5cccbf005183f78e513e933a8a22e0 /sql
parentd4ac4cb112076cb9f79674f46591c3608cc10318 (diff)
downloadmariadb-git-df1fab9d45cb7ffb3cf850d933341be13f7f416b.tar.gz
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.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_show.cc3
1 files changed, 2 insertions, 1 deletions
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;