List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:September 22 2009 7:32am
Subject:bzr commit into mysql-5.1-telco-6.2 branch (jonas:3001) Bug#47505
View as plain text  
#At file:///home/jonas/src/telco-6.2/ based on revid:martin.skold@stripped

 3001 Jonas Oreland	2009-09-22
      ndb - bug#47505 - make sure to init tcconnectrecord used for COPY_FRAGREQ, so that it will always be found by LQH_TRANSREQ

    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	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2009-09-22 07:32:29 +0000
@@ -2963,6 +2963,8 @@ public:
 #ifdef ERROR_INSERT
   void TRACE_OP_DUMP(const TcConnectionrec* regTcPtr, const char * pos);
 #endif
+
+  Uint32 get_node_status(Uint32 nodeId) const;
 };
 
 inline

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2009-09-22 07:32:29 +0000
@@ -3529,15 +3529,10 @@ void Dblqh::execLQHKEYREQ(Signal* signal
     return;
   }
 
+  if (unlikely(get_node_status(refToNode(sig5)) != ZNODE_UP))
   {
-    HostRecordPtr Thostptr;
-    Thostptr.i = refToNode(sig5); // TC-ref
-    ptrCheckGuard(Thostptr, chostFileSize, hostRecord);
-    if (unlikely(Thostptr.p->nodestatus != ZNODE_UP))
-    {
-      noFreeRecordLab(signal, lqhKeyReq, ZNODE_FAILURE_ERROR);
-      return;
-    }
+    noFreeRecordLab(signal, lqhKeyReq, ZNODE_FAILURE_ERROR);
+    return;
   }
   
   Uint32 senderVersion = getNodeInfo(refToNode(senderRef)).m_version;
@@ -5380,7 +5375,9 @@ void Dblqh::packLqhkeyreqLab(Signal* sig
   }
   else
   {
-    ndbassert(LqhKeyReq::getOperation(Treqinfo) != ZINSERT);
+    if (fragptr.p->m_copy_started_state != Fragrecord::AC_IGNORED)
+      ndbassert(LqhKeyReq::getOperation(Treqinfo) != ZINSERT ||
+                get_node_status(nextNodeId) != ZNODE_UP);
   }
   
   UintR TreadLenAiInd = (regTcPtr->readlenAi == 0 ? 0 : 1);
@@ -7845,9 +7842,23 @@ void Dblqh::lqhTransNextLab(Signal* sign
 	  default:
 	    ndbrequire(false);
 	  }
-        }//if
-      }//if
-    }//if
+        }
+      }
+      else
+      {
+#if defined VM_TRACE || defined ERROR_INSERT
+        jam();
+        ndbrequire(tcConnectptr.p->tcScanRec == RNIL);
+#endif
+      }
+    }
+    else
+    {
+#if defined VM_TRACE || defined ERROR_INSERT
+      jam();
+      ndbrequire(tcConnectptr.p->tcScanRec == RNIL);
+#endif
+    }
   }//for
   tcNodeFailptr.p->tcRecNow = tend + 1;
   signal->theData[0] = ZLQH_TRANS_NEXT;
@@ -10509,6 +10520,8 @@ void Dblqh::execCOPY_FRAGREQ(Signal* sig
   tcConnectptr.p->schemaVersion = scanptr.p->scanSchemaVersion;
   tcConnectptr.p->savePointId = gci;
   tcConnectptr.p->applRef = 0;
+  tcConnectptr.p->transactionState = TcConnectionrec::SCAN_STATE_USED;
+
   scanptr.p->scanState = ScanRecord::WAIT_ACC_COPY;
   AccScanReq * req = (AccScanReq*)&signal->theData[0];
   req->senderData = scanptr.i;
@@ -20138,3 +20151,12 @@ Dblqh::TRACE_OP_DUMP(const Dblqh::TcConn
   (* traceopout) << endl;
 }
 #endif
+
+Uint32
+Dblqh::get_node_status(Uint32 nodeId) const
+{
+  HostRecordPtr Thostptr;
+  Thostptr.i = nodeId;
+  ptrCheckGuard(Thostptr, chostFileSize, hostRecord);
+  return Thostptr.p->nodestatus;
+}


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090922073229-u6ctnzllazlslpkj.bundle
Thread
bzr commit into mysql-5.1-telco-6.2 branch (jonas:3001) Bug#47505Jonas Oreland22 Sep