diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-04-12 16:02:25 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-04-13 07:40:34 +0300 |
commit | fe20fe0d0af38450aa570883563ee2fe5e543747 (patch) | |
tree | 0653c3431fc5f1a4b9c5ffb767e509337a2e9285 | |
parent | 479fb6c1e9c04b8e98d9ad890e621c7270b8dfe3 (diff) | |
download | mariadb-git-fe20fe0d0af38450aa570883563ee2fe5e543747.tar.gz |
MDEV-15580: Assertion `!lex->explain' failed in lex_start(THD*):
Problem was that we did not delete explain information
when Galera must replay a query.
Could not find easily repeatable test case that would not
cause other problems.
-rw-r--r-- | sql/sql_parse.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 27edfa47799..fbcf09758e6 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -7818,6 +7818,8 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, if (thd->wsrep_conflict_state == MUST_REPLAY) { + if (thd->lex->explain) + delete_explain_query(thd->lex); wsrep_replay_transaction(thd); } @@ -7870,8 +7872,12 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, } /* If retry is requested clean up explain structure */ - if (thd->wsrep_conflict_state == RETRY_AUTOCOMMIT && thd->lex->explain) + if ((thd->wsrep_conflict_state == RETRY_AUTOCOMMIT || + thd->wsrep_conflict_state == MUST_REPLAY ) + && thd->lex->explain) + { delete_explain_query(thd->lex); + } } while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT); |