List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:May 26 2011 11:10am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:4420)
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:frazer.clement@stripped

 4420 Jonas Oreland	2011-05-26
      ndb fix incorrect assertion (only in mt case...seen in real life)

    modified:
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2011-05-25 09:30:37 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2011-05-26 11:10:07 +0000
@@ -9241,6 +9241,16 @@ inline
 void
 Dbdih::enqueue(DIVERIFY_queue & q, Uint32 senderData, Uint64 gci)
 {
+#ifndef NDEBUG
+  /**
+   * - assert only
+   * - we must read first *before* "publishing last
+   *   or else DIH-thread could already have consumed entry
+   *   when we call assert
+   */
+  Uint32 first = q.cfirstVerifyQueue;
+#endif
+
   Uint32 last = q.clastVerifyQueue;
   ApiConnectRecord * apiConnectRecord = q.apiConnectRecord;
 
@@ -9255,7 +9265,7 @@ Dbdih::enqueue(DIVERIFY_queue & q, Uint3
   {
     q.clastVerifyQueue = last + 1;
   }
-  assert(q.clastVerifyQueue != q.cfirstVerifyQueue);
+  assert(q.clastVerifyQueue != first);
 }
 
 inline


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110526111007-o1151zzrs9pwcadg.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:4420) Jonas Oreland26 May