summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorSergei Petrunia <sergey@mariadb.com>2023-04-14 17:40:41 +0300
committerSergei Petrunia <sergey@mariadb.com>2023-04-17 16:50:01 +0300
commitc7fe8e51de4e67f8515b3cf8b6bcd1c5bf1d184b (patch)
tree73c2939dfd955ffedd4b1089d19da821f7da472d /sql/sql_update.cc
parent8e55d7ea4a2f94ae3f38fdd8785778612d4b1203 (diff)
parent656c2e18b1e9ea5d0314745f3988d126eedbc22a (diff)
downloadmariadb-git-c7fe8e51de4e67f8515b3cf8b6bcd1c5bf1d184b.tar.gz
Merge 10.11 into 11.0
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 4173d6d82ec..922dfc5cab8 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1393,7 +1393,8 @@ produce_explain_and_leave:
goto err;
emit_explain_and_leave:
- int err2= thd->lex->explain->send_explain(thd);
+ bool extended= thd->lex->describe & DESCRIBE_EXTENDED;
+ int err2= thd->lex->explain->send_explain(thd, extended);
delete select;
free_underlaid_joins(thd, select_lex);
@@ -1467,6 +1468,8 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
select_lex->fix_prepare_information(thd, conds, &fake_conds);
+ if (!thd->lex->upd_del_where)
+ thd->lex->upd_del_where= *conds;
DBUG_RETURN(FALSE);
}
@@ -1994,7 +1997,10 @@ bool mysql_multi_update(THD *thd, TABLE_LIST *table_list, List<Item> *fields,
else
{
if (thd->lex->describe || thd->lex->analyze_stmt)
- res= thd->lex->explain->send_explain(thd);
+ {
+ bool extended= thd->lex->describe & DESCRIBE_EXTENDED;
+ res= thd->lex->explain->send_explain(thd, extended);
+ }
}
thd->abort_on_warning= 0;
DBUG_RETURN(res);