summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-12-09 21:33:08 -0800
committerIgor Babaev <igor@askmonty.org>2012-12-09 21:33:08 -0800
commit109c104d07c6cce68ecae66c1a4dcdb83826954f (patch)
tree71e5a958c3bc7ee2a559231f699062eb3188649c /sql/sql_statistics.cc
parent2447bc4c818434d2e6411dccf58887b45d47af58 (diff)
downloadmariadb-git-109c104d07c6cce68ecae66c1a4dcdb83826954f.tar.gz
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.
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc2
1 files changed, 2 insertions, 0 deletions
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)