Commit 82e96819 authored by Jan Lindström's avatar Jan Lindström

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.
parent c2dc72c0
...@@ -7201,6 +7201,8 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, ...@@ -7201,6 +7201,8 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
if (thd->wsrep_conflict_state == MUST_REPLAY) if (thd->wsrep_conflict_state == MUST_REPLAY)
{ {
if (thd->lex->explain)
delete_explain_query(thd->lex);
wsrep_replay_transaction(thd); wsrep_replay_transaction(thd);
} }
...@@ -7251,8 +7253,12 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, ...@@ -7251,8 +7253,12 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
} }
/* If retry is requested clean up explain structure */ /* 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); delete_explain_query(thd->lex);
}
} while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT); } while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment