diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 16ec6f9234c..eed47bbee28 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2101,7 +2101,7 @@ mysql_execute_command(THD *thd) /* Fix tables-to-be-deleted-from list to point at opened tables */ for (auxi=(TABLE_LIST*) aux_tables ; auxi ; auxi=auxi->next) auxi->table= auxi->table_list->table; - fix_tables_pointers(&lex->select_lex); + fix_tables_pointers(lex->all_selects_list); if (!thd->fatal_error && (result= new multi_delete(thd,aux_tables, table_count))) {