List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:January 26 2009 5:34pm
Subject:bzr commit into mysql-6.0-falcon-team branch (christopher.powers:2975)
Bug#42342
View as plain text  
#At file:///home/cpowers/work/dev/dev-04/mysql/

 2975 Christopher Powers	2009-01-26
      Bug #42342, "Falcon crash in Index::duplicateKey"
      
      Protect record version chain while searching for duplicate keys.
modified:
  storage/falcon/Index.cpp

per-file messages:
  storage/falcon/Index.cpp
    Index::update()
    
    Get a shared lock on syncPrior before calling duplicateKey().
    This avoids collisions with the scavenger and record pruning.
    
    _
=== modified file 'storage/falcon/Index.cpp'
--- a/storage/falcon/Index.cpp	2009-01-26 17:29:41 +0000
+++ b/storage/falcon/Index.cpp	2009-01-26 17:34:37 +0000
@@ -28,6 +28,7 @@
 #include "Database.h"
 #include "Value.h"
 #include "Record.h"
+#include "Format.h"
 #include "ResultSet.h"
 #include "Collation.h"
 #include "Sync.h"
@@ -607,6 +608,9 @@ void Index::update(Record * oldRecord, R
 
 	// If there is a duplicate in the old version chain, don't bother with another
 
+	Sync syncPrior(record->format->table->getSyncPrior(record), "Index::update");
+	syncPrior.lock(Shared);
+
 	if (duplicateKey (&key, oldRecord))
 		return;
 

Thread
bzr commit into mysql-6.0-falcon-team branch (christopher.powers:2975)Bug#42342Christopher Powers26 Jan