List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:October 13 2011 9:04am
Subject:bzr push into mysql-5.1-telco-7.0 branch (pekka.nousiainen:4592 to 4593)
View as plain text  
 4593 Pekka Nousiainen	2011-10-13 [merge]
      merge bug32040 to 7.0

    modified:
      storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
 4592 Jonas Oreland	2011-10-12
      ndb - fix bug in arena-ification of dbdict

    modified:
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp	2011-10-13 09:02:21 +0000
@@ -842,6 +842,8 @@ public:
   static Uint32 mt_buildIndexFragment_wrapper(void*);
 private:
   Uint32 mt_buildIndexFragment(struct mt_BuildIndxCtx*);
+
+  Signal* c_signal_bug32040;
 };
 
 // Dbtux::TupLoc

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp	2011-07-04 13:37:56 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp	2011-10-13 09:02:21 +0000
@@ -90,6 +90,8 @@ Dbtux::Dbtux(Block_context& ctx, Uint32
   addRecSignal(GSN_NODE_STATE_REP, &Dbtux::execNODE_STATE_REP, true);
 
   addRecSignal(GSN_DROP_FRAG_REQ, &Dbtux::execDROP_FRAG_REQ);
+
+  c_signal_bug32040 = 0;
 }
 
 Dbtux::~Dbtux()
@@ -152,6 +154,7 @@ Dbtux::execSTTOR(Signal* signal)
     CLEAR_ERROR_INSERT_VALUE;
     c_tup = (Dbtup*)globalData.getBlock(DBTUP, instance());
     ndbrequire(c_tup != 0);
+    c_signal_bug32040 = signal;
     break;
   case 3:
     jam();

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp	2011-10-13 09:02:21 +0000
@@ -911,7 +911,11 @@ Dbtux::scanNext(ScanOpPtr scanPtr, bool
   }
 #endif
   // cannot be moved away from tuple we have locked
+#if defined VM_TRACE || defined ERROR_INSERT
   ndbrequire(scan.m_state != ScanOp::Locked);
+#else
+  ndbrequire(fromMaintReq || scan.m_state != ScanOp::Locked);
+#endif
   // scan direction
   const unsigned idir = scan.m_descending; // 0, 1
   const int jdir = 1 - 2 * (int)idir;      // 1, -1
@@ -921,6 +925,24 @@ Dbtux::scanNext(ScanOpPtr scanPtr, bool
   NodeHandle origNode(frag);
   selectNode(origNode, pos.m_loc);
   ndbrequire(islinkScan(origNode, scanPtr));
+  if (unlikely(scan.m_state == ScanOp::Locked)) {
+    // bug#32040 - no fix, just unlock and continue
+    jam();
+    if (scan.m_accLockOp != RNIL) {
+      jam();
+      Signal* signal = c_signal_bug32040;
+      AccLockReq* const lockReq = (AccLockReq*)signal->getDataPtrSend();
+      lockReq->returnCode = RNIL;
+      lockReq->requestInfo = AccLockReq::Abort;
+      lockReq->accOpPtr = scan.m_accLockOp;
+      EXECUTE_DIRECT(DBACC, GSN_ACC_LOCKREQ, signal, AccLockReq::UndoSignalLength);
+      jamEntry();
+      ndbrequire(lockReq->returnCode == AccLockReq::Success);
+      scan.m_accLockOp = RNIL;
+      scan.m_lockwait = false;
+    }
+    scan.m_state = ScanOp::Next;
+  }
   // current node in loop
   NodeHandle node = origNode;
   // copy of entry found

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (pekka.nousiainen:4592 to 4593) Pekka Nousiainen13 Oct