summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-06-26 18:16:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-06-26 18:16:49 +0300
commit31c950cca8fa1623d41a8a7784e09fbcd6bc2c71 (patch)
treee0a2b134996c7fc07efe5f254943683f8a02c220 /sql/sql_statistics.cc
parent0e937f30f6cdadd2bc1607efa4a07f19c88e1b68 (diff)
parentc6392d52ee2e918a65b05c275286ff4d450eef2c (diff)
downloadmariadb-git-31c950cca8fa1623d41a8a7784e09fbcd6bc2c71.tar.gz
Merge 10.1 into 10.2
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 0e4749dbe6e..0743e886eb1 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -3101,7 +3101,7 @@ bool statistics_for_tables_is_needed(THD *thd, TABLE_LIST *tables)
for (TABLE_LIST *tl= tables; tl; tl= tl->next_global)
{
- if (!tl->is_view_or_derived() && tl->table)
+ if (!tl->is_view_or_derived() && !is_temporary_table(tl) && tl->table)
{
TABLE_SHARE *table_share= tl->table->s;
if (table_share &&
@@ -3113,7 +3113,7 @@ bool statistics_for_tables_is_needed(THD *thd, TABLE_LIST *tables)
for (TABLE_LIST *tl= tables; tl; tl= tl->next_global)
{
- if (!tl->is_view_or_derived() && tl->table)
+ if (!tl->is_view_or_derived() && !is_temporary_table(tl) && tl->table)
{
TABLE_SHARE *table_share= tl->table->s;
if (table_share &&
@@ -3242,7 +3242,7 @@ int read_statistics_for_tables_if_needed(THD *thd, TABLE_LIST *tables)
for (TABLE_LIST *tl= tables; tl; tl= tl->next_global)
{
- if (!tl->is_view_or_derived() && tl->table)
+ if (!tl->is_view_or_derived() && !is_temporary_table(tl) && tl->table)
{
TABLE_SHARE *table_share= tl->table->s;
if (table_share &&