[Commits] e56856d7e9d: MDEV-15580: Assertion `!lex->explain' failed in lex_start(THD*):
revision-id: e56856d7e9d8e2eabd670305d15cc232e2e689db (mariadb-10.2.14-40-ge56856d7e9d) parent(s): 36c01167200cf29ac92f3bd3263d7757c55cbb89 author: Jan Lindström committer: Jan Lindström timestamp: 2018-04-12 16:02:25 +0300 message: 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. --- sql/sql_parse.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 5edf92f2a96..886a16f803b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -7741,6 +7741,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); } @@ -7793,8 +7795,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);
participants (1)
-
jan