From 6264451f25143c43e1ad8e045054b720effaf8cb Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Sat, 6 Jun 2015 16:13:51 +0200 Subject: MDEV-8114: server crash on updates with joins still on 10.0.18 Check that leaf table list is really built before storing it. --- sql/sql_base.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_base.cc') diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 592215da4d0..fcd17b25b2d 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -8291,9 +8291,10 @@ bool setup_tables(THD *thd, Name_resolution_context *context, if (select_lex->first_cond_optimization) { leaves.empty(); - if (!select_lex->is_prep_leaf_list_saved) + if (select_lex->prep_leaf_list_state != SELECT_LEX::SAVED) { make_leaves_list(leaves, tables, full_table_list, first_select_table); + select_lex->prep_leaf_list_state= SELECT_LEX::READY; select_lex->leaf_tables_exec.empty(); } else -- cgit v1.2.1