List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:July 19 2007 6:45pm
Subject:bk commit into 6.0-falcon tree (jas:1.2646)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When  does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-07-19 14:45:16-04:00, jas@rowvwade. +4 -0
  Be a little more careful about referencing through a potentially
  disappearing transaction pointer.

  storage/falcon/Index.cpp@stripped, 2007-07-19 14:45:02-04:00, jas@rowvwade. +1 -1
    Be a little more careful about referencing through a potentially
    disappearing transaction pointer.

  storage/falcon/RecordVersion.cpp@stripped, 2007-07-19 14:45:02-04:00, jas@rowvwade. +5 -3
    Be a little more careful about referencing through a potentially
    disappearing transaction pointer.

  storage/falcon/Transaction.cpp@stripped, 2007-07-19 14:45:03-04:00, jas@rowvwade. +5 -5
    Be a little more careful about referencing through a potentially
    disappearing transaction pointer.

  storage/falcon/Transaction.h@stripped, 2007-07-19 14:45:03-04:00, jas@rowvwade. +1 -1
    Be a little more careful about referencing through a potentially
    disappearing transaction pointer.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jas
# Host:	rowvwade.
# Root:	D:/MySQL/mysql-5.1-falcon

--- 1.57/storage/falcon/Index.cpp	2007-07-19 14:45:41 -04:00
+++ 1.58/storage/falcon/Index.cpp	2007-07-19 14:45:41 -04:00
@@ -410,7 +410,7 @@
 			{
 			for (DeferredIndex *deferredIndex = deferredIndexes.first; deferredIndex; deferredIndex = deferredIndex->next)
 				{
-				if (transaction->visible(deferredIndex->transaction))
+				if (transaction->visible(deferredIndex->transaction, deferredIndex->transaction->transactionId))
 					{
 					deferredIndex->scanIndex(lowKey, highKey, searchFlags, bitmap);
 					

--- 1.49/storage/falcon/RecordVersion.cpp	2007-07-19 14:45:41 -04:00
+++ 1.50/storage/falcon/RecordVersion.cpp	2007-07-19 14:45:41 -04:00
@@ -87,18 +87,20 @@
 	// Unless the record is at least as old as the transaction, it's not for us
 
 	Transaction *recTransaction = transaction;
-	
+
 	if (state != recLock)
 		{
 		if (trans->isolationLevel == TRANSACTION_READ_COMMITTED)
 			{
-			if (!recTransaction || recTransaction->state == Committed || recTransaction == trans)
+			int state = (recTransaction) ? recTransaction->state : 0;
+			
+			if (!transaction || state == Committed || recTransaction == trans)
 				return (getRecordData()) ? this : NULL;
 			}
 		// else TRANSACTION_REPEATABLE_READ OR TRANSACTION_WRITE_COMMITTED
 		else if (transactionId <= trans->transactionId)
 			{
-			if (trans->visible(recTransaction))
+			if (trans->visible(recTransaction, transactionId))
 				return (getRecordData()) ? this : NULL;
 			}
 		}

--- 1.117/storage/falcon/Transaction.cpp	2007-07-19 14:45:41 -04:00
+++ 1.118/storage/falcon/Transaction.cpp	2007-07-19 14:45:41 -04:00
@@ -618,7 +618,7 @@
 			it is invisible to this transaction.
 ***/
 
-bool Transaction::visible(Transaction * transaction)
+bool Transaction::visible(Transaction * transaction, TransId transId)
 {
 	// If the transaction is NULL, it is long gone and therefore committed
 
@@ -627,7 +627,7 @@
 
 	// If we're the transaction in question, consider us committed
 
-	if (transaction == this)
+	if (transId == transactionId)
 		return true;
 
 	// If we're the system transaction, just use the state of the other transaction
@@ -649,13 +649,13 @@
 	// This is REPEATABLE_READ
 	// If the transaction started after we did, consider the transaction active
 
-	if (transaction->transactionId > transactionId)
+	if (transId > transactionId)
 		return false;
 
 	// If the transaction was active when we started, use it's state at that point
 
 	for (int n = 0; n < numberStates; ++n)
-		if (states [n].transactionId == transaction->transactionId)
+		if (states [n].transactionId == transId)
 			return false;
 
 	return true;
@@ -775,7 +775,7 @@
 		// Return CommittedAndOlder if the other trans has a lower TransId and 
 		// it was committed when we started.
 		
-		if (visible (transaction))
+		if (visible (transaction, transId))
 			return CommittedAndOlder;
 
 		return CommittedButYounger;

--- 1.55/storage/falcon/Transaction.h	2007-07-19 14:45:41 -04:00
+++ 1.56/storage/falcon/Transaction.h	2007-07-19 14:45:41 -04:00
@@ -91,7 +91,7 @@
 	void		expungeTransaction (Transaction *transaction);
 	void		commitRecords();
 	void		releaseDependencies();
-	bool		visible (Transaction *transaction);
+	bool		visible (Transaction *transaction, TransId transId);
 	void		addRecord (RecordVersion *record);
 	void		prepare(int xidLength, const UCHAR *xid);
 	void		rollback();
Thread
bk commit into 6.0-falcon tree (jas:1.2646)U-ROWVWADEjas19 Jul