From e49db547e673495b4653210eea008ff56f763fe2 Mon Sep 17 00:00:00 2001 From: "mkindahl@dl145h.mysql.com" <> Date: Fri, 25 Aug 2006 16:50:01 +0200 Subject: [PATCH] BUG#21833 (Prepare_commit_mutex not locked and unlocked under same condition): Adding condition to ensure that mutex are locked and unlocked under same condition. --- sql/ha_innodb.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 00a92e05ffb..d39f87ee3ec 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -7387,7 +7387,9 @@ innobase_xa_prepare( int error = 0; trx_t* trx = check_trx_exists(thd); - if (thd->lex->sql_command != SQLCOM_XA_PREPARE) { + if (thd->lex->sql_command != SQLCOM_XA_PREPARE && + (all || !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) + { /* For ibbackup to work the order of transactions in binlog and InnoDB must be the same. Consider the situation