summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index f8e6a13ce97..30562b5c12c 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -2951,7 +2951,9 @@ bool Item_exists_subselect::select_prepare_to_be_in()
bool trans_res= FALSE;
DBUG_ENTER("Item_exists_subselect::select_prepare_to_be_in");
if (!optimizer &&
- thd->lex->sql_command == SQLCOM_SELECT &&
+ (thd->lex->sql_command == SQLCOM_SELECT ||
+ thd->lex->sql_command == SQLCOM_UPDATE_MULTI ||
+ thd->lex->sql_command == SQLCOM_DELETE_MULTI) &&
!unit->first_select()->is_part_of_union() &&
optimizer_flag(thd, OPTIMIZER_SWITCH_EXISTS_TO_IN) &&
(is_top_level_item() ||