MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:jonas Date:March 16 2007 9:58am
Subject:bk commit into 5.1 tree (jonas:1.2438) BUG#27203
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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, 2007-03-16 10:58:24+01:00, jonas@stripped +2 -0
  ndb - bug#27203
    Allow readTablePk to stumble on scan+deleted tuple,
        reporting no-match instead of crash (in case scan is lock-owner)

  storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp@stripped, 2007-03-16 10:58:22+01:00, jonas@stripped +1 -1
    Allow readTablePk to stumble on scan+deleted tuple,
      reporting no-match instead of crash

  storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp@stripped, 2007-03-16 10:58:22+01:00, jonas@stripped +15 -4
    Allow readTablePk to stumble on scan+deleted tuple,
      reporting no-match instead of crash

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-telco-gca

--- 1.34/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp	2007-03-16 10:58:30 +01:00
+++ 1.35/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp	2007-03-16 10:58:30 +01:00
@@ -760,7 +760,7 @@
   void increaselistcont(Signal* signal);
   void seizeLeftlist(Signal* signal);
   void seizeRightlist(Signal* signal);
-  Uint32 readTablePk(Uint32 localkey1, Uint32 eh, const Operationrec*);
+  Uint32 readTablePk(Uint32 localkey1, Uint32 eh, OperationrecPtr);
   Uint32 getElement(Signal* signal, OperationrecPtr& lockOwner);
   void getdirindex(Signal* signal);
   void commitdelete(Signal* signal);

--- 1.81/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp	2007-03-16 10:58:30 +01:00
+++ 1.82/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp	2007-03-16 10:58:30 +01:00
@@ -46,6 +46,7 @@
    ndbrequire(false); } } while(0)
 #else
 #define vlqrequire(x) ndbrequire(x)
+#define dump_lock_queue(x)
 #endif
 
 
@@ -3184,7 +3185,7 @@
 }//Dbacc::getdirindex()
 
 Uint32
-Dbacc::readTablePk(Uint32 localkey1, Uint32 eh, const Operationrec* op)
+Dbacc::readTablePk(Uint32 localkey1, Uint32 eh, Ptr<Operationrec> opPtr)
 {
   int ret;
   Uint32 tableId = fragrecptr.p->myTableId;
@@ -3205,8 +3206,17 @@
   else
   {
     ndbrequire(ElementHeader::getLocked(eh));
-    ndbrequire((op->m_op_bits & Operationrec::OP_MASK) != ZSCAN_OP);
-    ret = c_lqh->readPrimaryKeys(op->userptr, ckeys, xfrm);
+    if (unlikely((opPtr.p->m_op_bits & Operationrec::OP_MASK) == ZSCAN_OP))
+    {
+      dump_lock_queue(opPtr);
+      ndbrequire(opPtr.p->nextParallelQue == RNIL);
+      ndbrequire(opPtr.p->nextSerialQue == RNIL);
+      ndbrequire(opPtr.p->m_op_bits & Operationrec::OP_ELEMENT_DISAPPEARED);
+      ndbrequire(opPtr.p->m_op_bits & Operationrec::OP_COMMIT_DELETE_CHECK);
+      ndbrequire((opPtr.p->m_op_bits & Operationrec::OP_STATE_MASK) == Operationrec::OP_STATE_RUNNING);
+      return 0;
+    }
+    ret = c_lqh->readPrimaryKeys(opPtr.p->userptr, ckeys, xfrm);
   }
   jamEntry();
   ndbrequire(ret >= 0);
@@ -3351,7 +3361,7 @@
           if (! searchLocalKey) 
 	  {
             Uint32 len = readTablePk(localkey1, tgeElementHeader, 
-				     lockOwnerPtr.p);
+				     lockOwnerPtr);
             found = (len == operationRecPtr.p->xfrmtupkeylen) &&
 	      (memcmp(Tkeydata, ckeys, len << 2) == 0);
           } else {
@@ -6866,6 +6876,7 @@
   {
     tatrOpPtr.p->transId1 = signal->theData[2];
     tatrOpPtr.p->transId2 = signal->theData[3];
+    validate_lock_queue(tatrOpPtr);
   } else {
     jam();
     signal->theData[0] = cminusOne;
Thread
bk commit into 5.1 tree (jonas:1.2438) BUG#27203jonas16 Mar