Skip to content
Permalink
Browse files
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.
  • Loading branch information
Jan Lindström committed Apr 13, 2018
1 parent 479fb6c commit fe20fe0
Showing 1 changed file with 7 additions and 1 deletion.
@@ -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);

0 comments on commit fe20fe0

Please sign in to comment.