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 cac225e01e7..6aec301bedc 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4983,6 +4983,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;