summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 5a4e2f53fe9..632639d60de 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -4855,7 +4855,7 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
parent_l->next_global= *parent_l->table->child_last_l;
}
- if (thd->variables.optimizer_use_stat_tables > 0)
+ if (!opt_no_stat_tables && thd->variables.optimizer_use_stat_tables > 0)
{
if (tables->table && tables->table->s &&
tables->table->s->table_category != TABLE_CATEGORY_SYSTEM)