From d0f77b83611077344ff29db02ea5593c9da62537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 20 Jan 2014 12:17:31 +0200 Subject: [PATCH] Fixed issue with retrying autocommitted transactions. We might need to clean up the explain structure in this case. --- sql/sql_parse.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 72f85eb2f94..62a12241c5a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6788,6 +6788,11 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, } mysql_mutex_unlock(&thd->LOCK_wsrep_thd); } + + /* If retry is requested clean up explain structure */ + if (thd->wsrep_conflict_state == RETRY_AUTOCOMMIT && thd->lex->explain) + delete_explain_query(thd->lex); + } while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT); if (thd->wsrep_retry_query)