summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-05-27 00:03:55 -0700
committerIgor Babaev <igor@askmonty.org>2011-05-27 00:03:55 -0700
commitc9a349488b95a9a938564fe1ac06dafc70db5864 (patch)
treedb5bff7867f4d077edaf2a9c9b4a737e25973dbf /sql/sql_update.cc
parent317e04ce67d97ab4a11582236f1e46ccf25c94fb (diff)
downloadmariadb-git-c9a349488b95a9a938564fe1ac06dafc70db5864.tar.gz
Applied Sanja's patch to fix LP bug #784297 in the tree for mwl106.
The patch imposes unconditional materialization for derived tables used in update and multi-update statements. Fixed a bug with a wrong order of processing derived tables/views at the prepare stage that caused a crash for the variant of the query from test case for bug 52157.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 215c5cbd4b3..4821fc2bd8f 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1040,8 +1040,8 @@ reopen_tables:
//We need to merge for insert prior to prepare.
if (mysql_handle_list_of_derived(lex, table_list, DT_MERGE_FOR_INSERT))
DBUG_RETURN(1);
- if (mysql_handle_list_of_derived(lex, table_list, DT_PREPARE))
- DBUG_RETURN(1);
+ if (mysql_handle_derived(lex, DT_PREPARE))
+ DBUG_RETURN(TRUE);
if (setup_tables_and_check_access(thd, &lex->select_lex.context,
&lex->select_lex.top_join_list,