From 109c104d07c6cce68ecae66c1a4dcdb83826954f Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sun, 9 Dec 2012 21:33:08 -0800 Subject: Addressed the following issue from the review of the patch for engine-independent statistics. If a table was created for InnoDB then the execution of the ANALYZE command over this table blocked any INSERT/DELETE/UPDATE of the table. --- sql/sql_statistics.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/sql_statistics.cc') diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index f8f1175ac28..4becf5ab7ae 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -2058,6 +2058,8 @@ int collect_statistics_for_table(THD *thd, TABLE *table) /* Perform a full table scan to collect statistics on 'table's columns */ if (!(rc= file->ha_rnd_init(TRUE))) { + DEBUG_SYNC(table->in_use, "statistics_collection_start"); + while ((rc= file->ha_rnd_next(table->record[0])) != HA_ERR_END_OF_FILE) { if (thd->killed) -- cgit v1.2.1