List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:May 3 2012 9:49am
Subject:bzr push into mysql-5.1-telco-7.0 branch (pekka.nousiainen:4921 to 4924)
Bug#13834481
View as plain text  
 4924 Pekka Nousiainen	2012-05-03
      bug#13834481 a03_fix.diff
      TC(6.3)->LQH(7.x) hashHi caused timeout

    modified:
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
 4923 Pekka Nousiainen	2012-05-03
      bug#13834481 a02_fix.diff
      clear attrLen to avoid interpret as 7.x bits

    modified:
      storage/ndb/include/kernel/signaldata/ScanFrag.hpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
 4922 Pekka Nousiainen	2012-05-03
      bug#13834481 a01_fix.diff
      TC(7.x)->LQH(6.3) missing shift caused 1231

    modified:
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
 4921 Martin Skold	2012-04-30
      Setting ndb version to 7.0.34

    modified:
      storage/ndb/ndb_configure.m4
=== modified file 'storage/ndb/include/kernel/signaldata/ScanFrag.hpp'
--- a/storage/ndb/include/kernel/signaldata/ScanFrag.hpp	2011-11-09 13:10:53 +0000
+++ b/storage/ndb/include/kernel/signaldata/ScanFrag.hpp	2012-05-03 09:48:34 +0000
@@ -89,6 +89,7 @@ public:
   static void setDescendingFlag(Uint32 & requestInfo, Uint32 descending);
   static void setTupScanFlag(Uint32 & requestInfo, Uint32 tupScan);
   static void setAttrLen(Uint32 & requestInfo, Uint32 attrLen);
+  static void clearAttrLen(Uint32 & requestInfo);
   static void setScanPrio(Uint32& requestInfo, Uint32 prio);
   static void setNoDiskFlag(Uint32& requestInfo, Uint32 val);
   static void setLcpScanFlag(Uint32 & requestInfo, Uint32 val);
@@ -277,7 +278,7 @@ public:
  *           1111111111222222222233
  * 01234567890123456789012345678901
  *  rrcdlxhkrztppppaaaaaaaaaaaaaaaa   Short variant ( < 6.4.0)
- *  rrcdlxhkrztppppAs                 Long variant (6.4.0 +)
+ *  rrcdlxhkrztppppCs                 Long variant (6.4.0 +)
  */
 #define SF_LOCK_MODE_SHIFT   (5)
 #define SF_LOCK_MODE_MASK    (1)
@@ -422,6 +423,13 @@ ScanFragReq::setAttrLen(UintR & requestI
 }
 
 inline
+void
+ScanFragReq::clearAttrLen(Uint32 & requestInfo)
+{
+  requestInfo &= ~((Uint32)SF_ATTR_LEN_MASK << SF_ATTR_LEN_SHIFT);
+}
+
+inline
 Uint32
 ScanFragReq::getNoDiskFlag(const Uint32 & requestInfo){
   return (requestInfo >> SF_NO_DISK_SHIFT) & 1;

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2012-04-24 15:10:04 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2012-05-03 09:49:00 +0000
@@ -9777,6 +9777,10 @@ void Dblqh::execSCAN_NEXTREQ(Signal* sig
   const Uint32 transid2 = nextReq->transId2;
   const Uint32 senderData = nextReq->senderData;
   Uint32 hashHi = signal->getSendersBlockRef();
+  // bug#13834481 hashHi!=0 caused timeout (tx not found)
+  const NodeInfo& senderInfo = getNodeInfo(refToNode(hashHi));
+  if (unlikely(senderInfo.m_version < NDBD_LONG_SCANFRAGREQ))
+    hashHi = 0;
 
   if (findTransaction(transid1, transid2, senderData, hashHi) != ZOK){
     jam();
@@ -10291,8 +10295,10 @@ void Dblqh::execSCAN_FRAGREQ(Signal* sig
   Uint32 hashIndex;
   TcConnectionrecPtr nextHashptr;
   Uint32 senderHi = signal->getSendersBlockRef();
-
-  const Uint32 reqinfo = scanFragReq->requestInfo;
+  // bug#13834481 hashHi!=0 caused timeout (tx not found)
+  const NodeInfo& senderInfo = getNodeInfo(refToNode(senderHi));
+  if (unlikely(senderInfo.m_version < NDBD_LONG_SCANFRAGREQ))
+    senderHi = 0;
 
   /* Short SCANFRAGREQ has no sections, Long SCANFRAGREQ has 1 or 2
    * Section 0 : Mandatory ATTRINFO section
@@ -10322,9 +10328,17 @@ void Dblqh::execSCAN_FRAGREQ(Signal* sig
   else
   {
     /* Short request, get Attr + Key len from signal */
-    aiLen= ScanFragReq::getAttrLen(reqinfo);
+    aiLen= ScanFragReq::getAttrLen(scanFragReq->requestInfo);
     keyLen= (scanFragReq->fragmentNoKeyLen >> 16);
+    /*
+     * bug#13834481.  Clear attribute length so that it is not
+     * re-interpreted as new 7.x bits.  initScanrec() uses signal
+     * data so we must modify signal data.
+     */
+    ScanFragReq::clearAttrLen(scanFragReq->requestInfo);
   }
+
+  const Uint32 reqinfo = scanFragReq->requestInfo;
   
   const Uint32 fragId = (scanFragReq->fragmentNoKeyLen & 0xFFFF);
   tabptr.i = scanFragReq->tableId;

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2012-04-24 14:11:49 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2012-05-03 09:47:51 +0000
@@ -12009,7 +12009,11 @@ void Dbtc::sendScanFragReq(Signal* signa
      */
     Uint32 reqAttrLen = sections.m_ptr[0].sz;
     ScanFragReq::setAttrLen(req->requestInfo, reqAttrLen);
-    req->fragmentNoKeyLen |= reqKeyLen;
+    /*
+     * bug#13834481 missing shift, causing fragment not found
+     * (error 1231) on 6.3 node.
+     */
+    req->fragmentNoKeyLen |= (reqKeyLen << 16);
     sendSignal(scanFragP->lqhBlockref, GSN_SCAN_FRAGREQ, signal,
                ScanFragReq::SignalLength, JBB);
     if(reqKeyLen > 0)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (pekka.nousiainen:4921 to 4924)Bug#13834481Pekka Nousiainen3 May