summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 1349571a3f8..361dacb51f4 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1162,7 +1162,17 @@ int ha_partition::analyze(THD *thd, HA_CHECK_OPT *check_opt)
{
DBUG_ENTER("ha_partition::analyze");
- DBUG_RETURN(handle_opt_partitions(thd, check_opt, ANALYZE_PARTS));
+ int result= handle_opt_partitions(thd, check_opt, ANALYZE_PARTS);
+
+ if ((result == 0) && m_file[0]
+ && (m_file[0]->ha_table_flags() & HA_ONLINE_ANALYZE))
+ {
+ /* If this is ANALYZE TABLE that will not force table definition cache
+ eviction, update statistics for the partition handler. */
+ this->info(HA_STATUS_CONST | HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+ }
+
+ DBUG_RETURN(result);
}