MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:September 8 2008 9:56pm
Subject:bzr commit into mysql-6.0-falcon branch (vvaintroub:2814) Bug#38947
View as plain text  
#At file:///G:/bzr/bla/

 2814 Vladislav Vaintroub	2008-09-08
      Bug#38947 -don't signal waiting thread until the very end of rollback(), to avoid races.
modified:
  storage/falcon/Transaction.cpp

=== modified file 'storage/falcon/Transaction.cpp'
--- a/storage/falcon/Transaction.cpp	2008-09-03 22:17:54 +0000
+++ b/storage/falcon/Transaction.cpp	2008-09-08 21:56:03 +0000
@@ -370,8 +370,8 @@ void Transaction::commitNoUpdates(void)
 	connection = NULL;
 	transactionId = 0;
 	writePending = false;
-	syncActiveTransactions.unlock();
 	state = Available;
+	syncActiveTransactions.unlock();
 	syncIsActive.unlock();
 	release();
 }
@@ -436,10 +436,8 @@ void Transaction::rollback()
 		database->backLog->rollbackRecords(backloggedRecords, this);
 
 	ASSERT(writePending);
-	state = RolledBack;
 	writePending = false;
 	releaseDependencies();
-	syncIsActive.unlock();
 	
 	if (hasUpdates)
 		database->serialLog->preCommit(this);
@@ -464,6 +462,8 @@ void Transaction::rollback()
 	inList = false;
 	transactionManager->activeTransactions.remove(this);
 	syncActiveTransactions.unlock();
+	state = RolledBack;
+	syncIsActive.unlock();
 	release();
 }
 

Thread
bzr commit into mysql-6.0-falcon branch (vvaintroub:2814) Bug#38947Vladislav Vaintroub8 Sep