Skip to content

Commit d0f77b8

Browse files
author
Jan Lindström
committed
Fixed issue with retrying autocommitted transactions. We might need to
clean up the explain structure in this case.
1 parent caa1b78 commit d0f77b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sql/sql_parse.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6788,6 +6788,11 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
67886788
}
67896789
mysql_mutex_unlock(&thd->LOCK_wsrep_thd);
67906790
}
6791+
6792+
/* If retry is requested clean up explain structure */
6793+
if (thd->wsrep_conflict_state == RETRY_AUTOCOMMIT && thd->lex->explain)
6794+
delete_explain_query(thd->lex);
6795+
67916796
} while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT);
67926797

67936798
if (thd->wsrep_retry_query)

0 commit comments

Comments
 (0)