List:Commits« Previous MessageNext Message »
From:jonas oreland Date:November 22 2011 7:46am
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4684 to 4685)
View as plain text  
 4685 jonas oreland	2011-11-22
      ndb - fix race discovered when working on trpman
        interestingly enough, the race was fixed for CM_REGREQ but not for API_REGREQ
        weird?

    modified:
      storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
      storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
      storage/ndb/src/kernel/blocks/trpman.cpp
 4684 Martin Skold	2011-11-21
      Bug#13400970   CRASH WITH ICP AND NULL FIELDS: Removed too restrictive type checking, added test case

    modified:
      mysql-test/suite/ndb/r/ndb_condition_pushdown.result
      mysql-test/suite/ndb/t/ndb_condition_pushdown.test
      sql/ha_ndbcluster_cond.cc
=== modified file 'storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp'
--- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2011-11-22 07:39:16 +0000
@@ -1039,10 +1039,6 @@ void Cmvmi::execCONNECT_REP(Signal *sign
   jamEntry();
   
   const NodeInfo::NodeType type = (NodeInfo::NodeType)getNodeInfo(hostId).m_type;
-  ndbrequire(type != NodeInfo::INVALID);
-  globalData.m_nodeInfo[hostId].m_version = 0;
-  globalData.m_nodeInfo[hostId].m_mysql_version = 0;
-  
   /**
    * Inform QMGR that client has connected
    */

=== modified file 'storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp'
--- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2011-11-22 07:39:16 +0000
@@ -480,6 +480,13 @@ void Qmgr::execCONNECT_REP(Signal* signa
     return;
   }
 
+  if (c_connectedNodes.get(connectedNodeId) == false)
+  {
+    jam();
+    setNodeInfo(connectedNodeId).m_version = 0;
+    setNodeInfo(connectedNodeId).m_mysql_version = 0;
+  }
+
   c_connectedNodes.set(connectedNodeId);
 
   {
@@ -769,7 +776,6 @@ void Qmgr::execCM_REGREQ(Signal* signal)
                         cmRegReq->nodeId,
                         (unsigned)isNdbMt());
 
-    ndbrequire(isNdbMt());
     return;
   }
 
@@ -3522,7 +3528,17 @@ void Qmgr::execAPI_REGREQ(Signal* signal
      */
     return;
   }
-  
+
+  if (!c_connectedNodes.get(apiNodePtr.i))
+  {
+    jam();
+    /**
+     * We have not yet heard execCONNECT_REP
+     *   so ignore this until we do...
+     */
+    return;
+  }
+
 #if 0
   ndbout_c("Qmgr::execAPI_REGREQ: Recd API_REGREQ (NodeId=%d)", apiNodePtr.i);
 #endif

=== modified file 'storage/ndb/src/kernel/blocks/trpman.cpp'
--- a/storage/ndb/src/kernel/blocks/trpman.cpp	2011-11-16 15:38:25 +0000
+++ b/storage/ndb/src/kernel/blocks/trpman.cpp	2011-11-22 07:39:16 +0000
@@ -123,8 +123,6 @@ Trpman::execCONNECT_REP(Signal *signal)
 
   const NodeInfo::NodeType type = (NodeInfo::NodeType)getNodeInfo(hostId).m_type;
   ndbrequire(type != NodeInfo::INVALID);
-  globalData.m_nodeInfo[hostId].m_version = 0;
-  globalData.m_nodeInfo[hostId].m_mysql_version = 0;
 
   /**
    * Inform QMGR that client has connected

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4684 to 4685) jonas oreland22 Nov