From d37465a9cc458ab215105de22875ce0a64c0efc2 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sat, 16 Jul 2011 23:57:43 -0700 Subject: Fixed LP bug #794901. Also: 1. simplified the code of the function mysql_derived_merge_for_insert. 2. moved merge of views/dt for multi-update/delete to the prepare stage. 3. the list of the references to the candidates for semi-join now is allocated in the statement memory. --- sql/sql_delete.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/sql_delete.cc') diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 7f3ed2e705f..becc1ada7ae 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -603,9 +603,11 @@ int mysql_multi_delete_prepare(THD *thd) &thd->lex->select_lex.top_join_list, lex->query_tables, lex->select_lex.leaf_tables, FALSE, - DELETE_ACL, SELECT_ACL, TRUE)) + DELETE_ACL, SELECT_ACL, FALSE)) DBUG_RETURN(TRUE); + if (lex->select_lex.handle_derived(thd->lex, DT_MERGE)) + DBUG_RETURN(TRUE); /* Multi-delete can't be constructed over-union => we always have -- cgit v1.2.1