MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:March 19 2010 8:14am
Subject:bzr commit into mysql-5.1-telco-6.3 branch (jonas:3156) Bug#52201
View as plain text  
#At file:///home/jonas/src/telco-6.3/ based on revid:jonas@stripped

 3156 Jonas Oreland	2010-03-19
      ndb - bug#52201 - make sure that ACC_ABORTREQ runs with canBlock=0 in execTUPKEYREF

    modified:
      storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2010-03-05 06:27:20 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2010-03-19 08:14:19 +0000
@@ -2427,7 +2427,7 @@ private:
   void srPhase3Start(Signal* signal);
   void checkStartCompletedLab(Signal* signal);
   void continueAbortLab(Signal* signal);
-  void abortContinueAfterBlockedLab(Signal* signal, bool canBlock);
+  void abortContinueAfterBlockedLab(Signal* signal);
   void abortCommonLab(Signal* signal);
   void localCommitLab(Signal* signal);
   void abortErrorLab(Signal* signal);

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-03-05 06:32:06 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-03-19 08:14:19 +0000
@@ -7415,15 +7415,7 @@ void Dblqh::abortStateHandlerLab(Signal*
     return;
   case TcConnectionrec::WAIT_ACC:
     jam();
-/* ------------------------------------------------------------------------- */
-// We start the abort immediately since the operation is still in the active
-// list and the fragment cannot have been frozen yet. By sending LCP_HOLDOPCONF
-// as direct signals we avoid the problem that we might find the operation
-// in an unexpected list in ACC.
-// We cannot accept being blocked before aborting ACC here since that would
-// lead to seriously complex issues.
-/* ------------------------------------------------------------------------- */
-    abortContinueAfterBlockedLab(signal, false);
+    abortContinueAfterBlockedLab(signal);
     return;
     break;
   case TcConnectionrec::LOG_QUEUED:
@@ -7578,7 +7570,7 @@ void Dblqh::abortCommonLab(Signal* signa
     case Fragrecord::CRASH_RECOVERING:
     case Fragrecord::ACTIVE_CREATION:
       jam();
-      abortContinueAfterBlockedLab(signal, true);
+      abortContinueAfterBlockedLab(signal);
       return;
       break;
     case Fragrecord::BLOCKED:
@@ -7603,7 +7595,7 @@ void Dblqh::abortCommonLab(Signal* signa
   }//if
 }//Dblqh::abortCommonLab()
 
-void Dblqh::abortContinueAfterBlockedLab(Signal* signal, bool canBlock) 
+void Dblqh::abortContinueAfterBlockedLab(Signal* signal) 
 {
   /* ------------------------------------------------------------------------
    *       INPUT:          TC_CONNECTPTR           ACTIVE OPERATION RECORD
@@ -7618,10 +7610,23 @@ void Dblqh::abortContinueAfterBlockedLab
   TcConnectionrec * const regTcPtr = tcConnectptr.p;
   
   TRACE_OP(regTcPtr, "ACC ABORT");
-  
+  Uint32 canBlock = 2; // 2, block if needed
+  switch(regTcPtr->transactionState){
+  case TcConnectionrec::WAIT_TUP:
+    /**
+     * This is when getting from execTUPKEYREF
+     *   in which case we *do* have ACC lock
+     *   and should not (need to) block
+     */
+    canBlock = 0;
+    break;
+  default:
+    break;
+  }
+
   regTcPtr->transactionState = TcConnectionrec::WAIT_ACC_ABORT;
   signal->theData[0] = regTcPtr->accConnectrec;
-  signal->theData[1] = 2; // JOB BUFFER IF NEEDED
+  signal->theData[1] = canBlock;
   EXECUTE_DIRECT(DBACC, GSN_ACC_ABORTREQ, signal, 2);
 
   if (signal->theData[1] == RNIL)


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20100319081419-gqnfiu1x2yn3il19.bundle
Thread
bzr commit into mysql-5.1-telco-6.3 branch (jonas:3156) Bug#52201Jonas Oreland19 Mar