List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:February 15 2008 10:23pm
Subject:bk commit into 6.0 tree (jas:1.2816)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 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, 2008-02-15 17:23:25-05:00, jas@rowvwade. +6 -0
  Track contained (chilled) released savepoint to prevent
  the gopher commit at commit or recovery time.  Unless a
  transaction has chilled records, this is completely ignored.

  storage/falcon/SRLSavepointRollback.h@stripped, 2008-02-15 17:23:15-05:00, jas@rowvwade. +0 -1
    Removed redundant field.

  storage/falcon/SRLSession.cpp@stripped, 2008-02-15 17:23:16-05:00, jas@rowvwade. +1 -0
    Force a serial log write for the session record.  This also
    prevents multiple redundant recoveries.

  storage/falcon/SavePoint.cpp@stripped, 2008-02-15 17:23:16-05:00, jas@rowvwade. +22 -0
    Track contained (chilled) released savepoint to prevent
    the gopher commit at commit or recovery time.  Unless a
    transaction has chilled records, this is completely ignored.

  storage/falcon/SavePoint.h@stripped, 2008-02-15 17:23:16-05:00, jas@rowvwade. +5 -0
    Track contained (chilled) released savepoint to prevent
    the gopher commit at commit or recovery time.  Unless a
    transaction has chilled records, this is completely ignored.

  storage/falcon/Transaction.cpp@stripped, 2008-02-15 17:23:17-05:00, jas@rowvwade. +21 -4
    Track contained (chilled) released savepoint to prevent
    the gopher commit at commit or recovery time.  Unless a
    transaction has chilled records, this is completely ignored.

  storage/falcon/Transaction.h@stripped, 2008-02-15 17:23:17-05:00, jas@rowvwade. +0 -5
    Eliminate definition of obsolete and unused struct Savepoint.

diff -Nrup a/storage/falcon/SRLSavepointRollback.h b/storage/falcon/SRLSavepointRollback.h
--- a/storage/falcon/SRLSavepointRollback.h	2008-02-14 16:06:01 -05:00
+++ b/storage/falcon/SRLSavepointRollback.h	2008-02-15 17:23:15 -05:00
@@ -27,7 +27,6 @@ public:
 	virtual void read(void);
 	virtual void pass1(void);
 	
-	TransId	transactionId;
 	int		savepointId;
 };
 
diff -Nrup a/storage/falcon/SRLSession.cpp b/storage/falcon/SRLSession.cpp
--- a/storage/falcon/SRLSession.cpp	2008-01-03 18:18:15 -05:00
+++ b/storage/falcon/SRLSession.cpp	2008-02-15 17:23:16 -05:00
@@ -30,6 +30,7 @@ void SRLSession::append(int64 priorRecov
 	START_RECORD(srlSession, "SRLCheckpoint::append");
 	putInt64(priorRecoveryBlock);
 	putInt64(priorCheckpointBlock);
+	log->flush(false, log->nextBlockNumber, &sync);
 }
 
 void SRLSession::read(void)
diff -Nrup a/storage/falcon/SavePoint.cpp b/storage/falcon/SavePoint.cpp
--- a/storage/falcon/SavePoint.cpp	2007-09-20 11:42:26 -04:00
+++ b/storage/falcon/SavePoint.cpp	2008-02-15 17:23:16 -05:00
@@ -20,6 +20,13 @@
 
 #include "Engine.h"
 #include "SavePoint.h"
+#include "Bitmap.h"
+
+#ifdef _DEBUG
+#undef THIS_FILE
+static const char THIS_FILE[]=__FILE__;
+#endif
+
 
 //////////////////////////////////////////////////////////////////////
 // Construction/Destruction
@@ -35,3 +42,18 @@ SavePoint::~SavePoint()
 
 }
 ***/
+
+
+void SavePoint::setIncludedSavepoint(int savepointId)
+{
+	if (!savepoints)
+		savepoints = new Bitmap;
+	
+	savepoints->set(savepointId);
+}
+
+void SavePoint::clear(void)
+{
+	delete savepoints;
+	savepoints = NULL;
+}
diff -Nrup a/storage/falcon/SavePoint.h b/storage/falcon/SavePoint.h
--- a/storage/falcon/SavePoint.h	2007-09-20 11:42:27 -04:00
+++ b/storage/falcon/SavePoint.h	2008-02-15 17:23:16 -05:00
@@ -25,6 +25,7 @@
 #endif // _MSC_VER > 1000
 
 class RecordVersion;
+class Bitmap;
 
 class SavePoint
 {
@@ -32,9 +33,13 @@ public:
 	//SavePoint();
 	//virtual ~SavePoint();
 
+	void setIncludedSavepoint(int savepointId);
+
 	SavePoint		*next;
+	Bitmap			*savepoints;
 	RecordVersion	**records;
 	int				id;
+	void clear(void);
 };
 
 #endif // !defined(AFX_SAVEPOINT_H__00C992AB_072D_4582_846E_5311807625B5__INCLUDED_)
diff -Nrup a/storage/falcon/Transaction.cpp b/storage/falcon/Transaction.cpp
--- a/storage/falcon/Transaction.cpp	2008-02-14 16:06:00 -05:00
+++ b/storage/falcon/Transaction.cpp	2008-02-15 17:23:17 -05:00
@@ -42,6 +42,7 @@
 #include "Format.h"
 #include "LogLock.h"
 #include "SRLSavepointRollback.h"
+#include "Bitmap.h"
 
 extern uint		falcon_lock_wait_timeout;
 
@@ -530,9 +531,12 @@ void Transaction::chillRecords()
 		
 	uint32 chilledBefore = chilledRecords;
 	uint64 totalDataBefore = totalRecordData;
-	
 	database->dbb->logUpdatedRecords(this, *chillPoint, true);
-	
+
+	for (SavePoint *savePoint = savePoints; savePoint; savePoint = savePoint->next)
+		if (savePoint->id != curSavePointId)
+			savePoint->setIncludedSavepoint(curSavePointId);
+				
 	Log::debug("Record Chill:      trxId=%-5ld records=%7ld  bytes=%8ld\n",
 				transactionId, chilledRecords-chilledBefore, (uint32)(totalDataBefore-totalRecordData), committedRecords);
 }
@@ -1007,8 +1011,8 @@ int Transaction::createSavepoint()
 	savePoint->records = recordPtr;
 	savePoint->id = ++curSavePointId;
 	savePoint->next = savePoints;
+	savePoint->savepoints = NULL;
 	savePoints = savePoint;
-
 	ASSERT(savePoint->next != savePoint);
  	
 	return savePoint->id;
@@ -1021,6 +1025,10 @@ void Transaction::releaseSavepoint(int s
 			{
 			int nextLowerSavePointId = (savePoint->next) ? savePoint->next->id : 0;
 			*ptr = savePoint->next;
+			
+			if (savePoint->savepoints)
+				savePoint->clear();
+
 			savePoint->next = freeSavePoints;
 			freeSavePoints = savePoint;
 			ASSERT((savePoints || freeSavePoints) ? (savePoints != freeSavePoints) : true);
@@ -1055,8 +1063,14 @@ void Transaction::rollbackSavepoint(int 
 	if ((savePoint) && (savePoint->id != savePointId))
 		throw SQLError(RUNTIME_ERROR, "invalid savepoint");
 
-	if (chilledBytes)
+	if (chilledRecords)
+		{
 		database->serialLog->logControl->savepointRollback.append(transactionId, savePointId);
+		
+		if (savePoint->savepoints)
+			for (int n = 0; (n = savePoint->savepoints->nextSet(n)) >= 0; ++n)
+				database->serialLog->logControl->savepointRollback.append(transactionId, n);
+		}				
 
 	savePoint = savePoints;
 	
@@ -1291,6 +1305,9 @@ void Transaction::releaseSavePoints(void
 	while ( (savePoint = savePoints) )
 		{
 		savePoints = savePoint->next;
+		
+		if (savePoint->savepoints)
+			savePoint->clear();
 		
 		if (savePoint < localSavePoints || savePoint >= localSavePoints + LOCAL_SAVE_POINTS)
 			delete savePoint;
diff -Nrup a/storage/falcon/Transaction.h b/storage/falcon/Transaction.h
--- a/storage/falcon/Transaction.h	2008-01-22 17:40:59 -05:00
+++ b/storage/falcon/Transaction.h	2008-02-15 17:23:17 -05:00
@@ -72,11 +72,6 @@ struct TransState {
 	int			state;
 	};
 
-struct Savepoint {
-	int			id;
-	RecordVersion	**records;
-	};
-
 static const int LOCAL_SAVE_POINTS = 5;
 
 static const int FOR_READING = 0;
Thread
bk commit into 6.0 tree (jas:1.2816)U-ROWVWADEjas15 Feb