summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-04-11 16:15:19 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2023-04-11 16:15:19 +0300
commit5bada1246de48ef4a18fa30388f06719c971c3d7 (patch)
tree65de1dc70eebfc94385afadb7202b86a009425c8 /sql/sql_update.cc
parent375991a531f8885634e7a2af224bf396ee7e1f60 (diff)
parentfb72dfbf7fb52a4be12bad7f173baa71942fd558 (diff)
downloadmariadb-git-5bada1246de48ef4a18fa30388f06719c971c3d7.tar.gz
Merge 10.5 into 10.6
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 d341206732f..4c45822a802 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1379,7 +1379,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);
@@ -1453,6 +1454,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);
}
@@ -1980,7 +1983,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);