Commit 92bbbaa4 authored by unknown's avatar unknown
Browse files

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:
  Adding condition to release and aquire mutex under same conditions.
parent ac03e433
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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