List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:February 13 2009 7:45pm
Subject:bzr commit into mysql-6.0-falcon-team branch (vvaintroub:3018)
Bug#42745
View as plain text  
#At file:///G:/bzr/mysql-6.0-falcon-team/ based on revid:vvaintroub@stripped

 3018 Vladislav Vaintroub	2009-02-13
      Bug#42745: TableSpace not found during recovery.
      
      The reason for the error is that tablespace was not recreated in recovery, even if enough information in serial log was available to do that.
      
      What happens:
      - tablespace info is not on disk (in falcon system tables) at the start of recovery
      - SRLCreateTableSpace  ld is found before the checkpoint record  in serial log and is ignored.
      
      Fix: 
      remove post-flush check from SRLCreateTableSpace::redo(), and recreate tablespace if it is not already present.
      modified:
        storage/falcon/SRLCreateTableSpace.cpp
        storage/falcon/SerialLog.cpp

=== modified file 'storage/falcon/SRLCreateTableSpace.cpp'
--- a/storage/falcon/SRLCreateTableSpace.cpp	2009-01-28 23:57:54 +0000
+++ b/storage/falcon/SRLCreateTableSpace.cpp	2009-02-13 19:45:32 +0000
@@ -90,12 +90,12 @@ void SRLCreateTableSpace::pass1()
 
 void SRLCreateTableSpace::pass2()
 {
-	if (control->isPostFlush())
-		{
-		TableSpaceInit tsInit;
-		tsInit.comment		= comment;
-		log->database->tableSpaceManager->redoCreateTableSpace(tableSpaceId, nameLength, name, filenameLength, filename, type, &tsInit);
-		}
+	if (log->database->tableSpaceManager->findTableSpace(tableSpaceId))
+		return;
+
+	TableSpaceInit tsInit;
+	tsInit.comment		= comment;
+	log->database->tableSpaceManager->redoCreateTableSpace(tableSpaceId, nameLength, name, filenameLength, filename, type, &tsInit);
 }
 
 void SRLCreateTableSpace::commit()

=== modified file 'storage/falcon/SerialLog.cpp'
--- a/storage/falcon/SerialLog.cpp	2009-02-11 00:54:25 +0000
+++ b/storage/falcon/SerialLog.cpp	2009-02-13 19:45:32 +0000
@@ -365,22 +365,7 @@ void SerialLog::recover()
 			Log::log("Processed: %8ld\n", recordCount);
 			
 		if (!isTableSpaceDropped(record->tableSpaceId) || record->type == srlDropTableSpace)
-			try 
-				{
-				record->pass2();
-				}
-			catch(SQLException &e)
-				{
-				// We can have missing tablespaces at this stage.
-				//(missing in the system table at the time of crash
-				// and not found by bootstrap). Handle them as dropped
-				// until someone comes up with a better idea
-				if (e.getSqlcode() == TABLESPACE_NOT_EXIST_ERROR)
-					{
-					Log::log("Cannot find tablespace %d",record->tableSpaceId);
-					setTableSpaceDropped(record->tableSpaceId);
-					}
-				}
+			record->pass2();
 		}
 
 	Log::log("Processed: %8ld\n", recordCount);

Thread
bzr commit into mysql-6.0-falcon-team branch (vvaintroub:3018)Bug#42745Vladislav Vaintroub13 Feb