commit ac5f3c0b928c7c2ebf95e873169def85d7bce314 Author: Laurynas Biveinis Date: Tue Sep 27 13:01:54 2016 +0300 Fix bug 71761 / 1626441 (ANALYZE TABLE should remove its table from background stat processing queue) Make InnoDB ANALYZE TABLE remove its table from the background stat processing queue, if it's there. diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 967918e..99300c5 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -14764,6 +14764,14 @@ ha_innobase::info_low( if (dict_stats_is_persistent_enabled(ib_table)) { if (is_analyze) { + + /* If this table is already queued for + background analyze, remove it from the + queue as we are about to do the same */ + dict_mutex_enter_for_mysql(); + dict_stats_recalc_pool_del(ib_table); + dict_mutex_exit_for_mysql(); + opt = DICT_STATS_RECALC_PERSISTENT; } else { /* This is e.g. 'SHOW INDEXES', fetch