summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 77e6b2b6571..5059e4f656e 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4585,6 +4585,9 @@ bool LEX::save_prep_leaf_tables()
bool st_select_lex::save_prep_leaf_tables(THD *thd)
{
+ if (prep_leaf_list_state == SAVED)
+ return FALSE;
+
List_iterator_fast<TABLE_LIST> li(leaf_tables);
TABLE_LIST *table;