summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-07-16 23:57:43 -0700
committerIgor Babaev <igor@askmonty.org>2011-07-16 23:57:43 -0700
commitd37465a9cc458ab215105de22875ce0a64c0efc2 (patch)
tree2fc2c3e0ee8a246b65001039b7651a2f38091608 /sql/sql_delete.cc
parent6e5413853e9788b7e86808c8765983f8724122d8 (diff)
downloadmariadb-git-d37465a9cc458ab215105de22875ce0a64c0efc2.tar.gz
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.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc4
1 files changed, 3 insertions, 1 deletions
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