diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-30 11:35:52 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-30 11:38:41 +0200 |
commit | 5b035c84567b60c2ca680de96f5179a6dd3d9e61 (patch) | |
tree | bc4407cc8a8672f6e2a22b14c4db31e85eb0beac /sql/sql_parse.cc | |
parent | a8793a2c02f805a4a1c4dbd1416b594169b77541 (diff) | |
download | mariadb-git-5b035c84567b60c2ca680de96f5179a6dd3d9e61.tar.gz |
MDEV-14572: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX
(the same but in other way made before INSERT/DELETE/SELECT)
Without it, mysql_update() didn't know that there will be EXPLAIN result set and was sending OK at the end of the update, which conflicted with the EOF sent later by EXPLAIN.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3f9d9190d76..73b820cf87c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3800,6 +3800,16 @@ end_with_restore_list: else res= 0; + /* + We can not use mysql_explain_union() because of parameters of + mysql_select in mysql_multi_update so just set the option if needed + */ + if (thd->lex->describe) + { + select_lex->set_explain_type(FALSE); + select_lex->options|= SELECT_DESCRIBE; + } + res= mysql_multi_update_prepare(thd); #ifdef HAVE_REPLICATION |