List:Commits« Previous MessageNext Message »
From:Kevin Lewis Date:June 24 2009 10:17pm
Subject:bzr commit into mysql-6.0-falcon-team branch (kevin.lewis:2745)
Bug#43650
View as plain text  
#At file:///C:/Work/bzr/Merge/mysql-6.0-falcon-team/ based on revid:kevin.lewis@stripped

 2745 Kevin Lewis	2009-06-24
      Bug#43650 - The server calls StorageInterface::rnd_pos() when it has a list of records previously read and sorted and it wants to read them a final time.  If the isolation mode is read-committed, the call to fetchVersion will return NULL if the currently committed version is deleted.  This means it was deleted during the transaction.  Since the transaction was able to find a visible version of the record before, that visible version MUST still be around.  So the only reason that fetchVersion would return NULL is if the current visible version is deleted.  In repeatable-read, fetchVersion would return that previous visible record.
      
      So if fetchVersion or fetchForUpdate returns NULL to StorageDatabase::fetch(), instead of returning 
         StorageErrorRecordNotFound - HA_KEY_NOT_FOUND - "can't find record",
      it should return 
         StorageErrorRecordDeleted - HA_ERR_RECORD_DELETED
      so that the server will ignore this record and go  on to the nexxt record.

    modified:
      storage/falcon/StorageDatabase.cpp
      storage/falcon/StorageTableShare.h
      storage/falcon/ha_falcon.cpp
=== modified file 'storage/falcon/StorageDatabase.cpp'
--- a/storage/falcon/StorageDatabase.cpp	2009-06-03 01:36:57 +0000
+++ b/storage/falcon/StorageDatabase.cpp	2009-06-24 22:17:25 +0000
@@ -375,7 +375,7 @@ int StorageDatabase::fetch(StorageConnec
 			if (!lockForUpdate)
 				candidate->release(REC_HISTORY);
 			
-			return StorageErrorRecordNotFound;
+			return StorageErrorRecordDeleted;
 			}
 		
 		if (!lockForUpdate && record != candidate)

=== modified file 'storage/falcon/StorageTableShare.h'
--- a/storage/falcon/StorageTableShare.h	2009-04-27 16:43:53 +0000
+++ b/storage/falcon/StorageTableShare.h	2009-06-24 22:17:25 +0000
@@ -120,7 +120,8 @@ enum StorageError {
 	StorageErrorDeviceFull			= -110,
 	StorageErrorTableSpaceDataFileExist	= -111,
 	StorageErrorIOErrorSerialLog	= -112,
-	StorageErrorInternalError		= -113
+	StorageErrorInternalError		= -113,
+	StorageErrorRecordDeleted		= -114		// Record requested has been deleted
 	};
 	
 static const int StoreErrorIndexShift	= 10;

=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp	2009-06-24 21:28:30 +0000
+++ b/storage/falcon/ha_falcon.cpp	2009-06-24 22:17:25 +0000
@@ -2213,6 +2213,10 @@ int StorageInterface::getMySqlError(int 
 			DBUG_PRINT("info", ("StorageErrorIOErrorSerialLog"));
 			return (HA_ERR_LOGGING_IMPOSSIBLE);
 
+		case StorageErrorRecordDeleted:
+			DBUG_PRINT("info", ("StorageErrorRecordDeleted"));
+			return (HA_ERR_RECORD_DELETED);
+
 		default:
 			DBUG_PRINT("info", ("Unknown Falcon Error"));
 			return (200 - storageError);


Attachment: [text/bzr-bundle] bzr/kevin.lewis@sun.com-20090624221725-tfcuxzwns2ikjkb5.bundle
Thread
bzr commit into mysql-6.0-falcon-team branch (kevin.lewis:2745)Bug#43650Kevin Lewis25 Jun