diff options
| author | Igor Babaev <igor@askmonty.org> | 2023-03-22 21:59:18 -0700 |
|---|---|---|
| committer | Igor Babaev <igor@askmonty.org> | 2023-03-25 12:36:59 -0700 |
| commit | f33fc2fae5c3f3e80c4d24348609f3ce5246ca9c (patch) | |
| tree | c29efad6c8b20b73d5578c981ff54af96aac0b66 /sql/sql_delete.cc | |
| parent | 011261f4e95890b63bac83d7842ff93ced6d3ec8 (diff) | |
| download | mariadb-git-f33fc2fae5c3f3e80c4d24348609f3ce5246ca9c.tar.gz | |
MDEV-30539 EXPLAIN EXTENDED: no message with queries for DML statements
EXPLAIN EXTENDED for an UPDATE/DELETE/INSERT/REPLACE statement did not
produce the warning containing the text representation of the query
obtained after the optimization phase. Such warning was produced for
SELECT statements, but not for DML statements.
The patch fixes this defect of EXPLAIN EXTENDED for DML statements.
Diffstat (limited to 'sql/sql_delete.cc')
| -rw-r--r-- | sql/sql_delete.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 1b3fa3087e7..776dfffe113 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -1084,6 +1084,8 @@ int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, DBUG_RETURN(TRUE); select_lex->fix_prepare_information(thd, conds, &fake_conds); + if (!thd->lex->upd_del_where) + thd->lex->upd_del_where= *conds; DBUG_RETURN(FALSE); } |
