summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-06-26 17:34:44 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-06-26 17:34:44 +0300
commitc6392d52ee2e918a65b05c275286ff4d450eef2c (patch)
tree1a5f9623ff08bfca9eacb83e21502563e656e932 /sql/sql_statistics.cc
parentc4eb4bcef648eb2ebdc6edc06905f39f95ef7f6b (diff)
parentcc8772f33e8f94844e32f3aa79e5f41d784f8ec0 (diff)
downloadmariadb-git-c6392d52ee2e918a65b05c275286ff4d450eef2c.tar.gz
Merge 10.0 into 10.1
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 b7ccbb5c212..abf3975dd9c 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -3091,7 +3091,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 &&
@@ -3103,7 +3103,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 &&
@@ -3232,7 +3232,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 &&