diff options
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 63e45ac1fec..1b808d333d8 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1066,6 +1066,13 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list, thd->lex->allow_sum_func= 0; + /* + We do not call DT_MERGE_FOR_INSERT because it has no sense for simple + (not multi-) update + */ + if (mysql_handle_derived(thd->lex, DT_PREPARE)) + DBUG_RETURN(TRUE); + if (setup_tables_and_check_access(thd, &select_lex->context, &select_lex->top_join_list, table_list, |