Commit 3f950c92 authored by unknown's avatar unknown
Browse files

ndb - bug#20185

  update test prg + fix typo


storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  compile error
storage/ndb/test/ndbapi/testNodeRestart.cpp:
  upgrade test prg not to kill master node
    as master take over wont work with all these dealyed GCP_PREPARE
parent d411a684
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7093,7 +7093,7 @@ Dbtc::nodeFailCheckTransactions(Signal* signal,
  for (transPtr.i = transPtrI; transPtr.i < capiConnectFilesize; transPtr.i++)
  {
    ptrCheckGuard(transPtr, capiConnectFilesize, apiConnectRecord); 
    Uiint32 state = transPtr.p->apiConnectstate;
    Uint32 state = transPtr.p->apiConnectstate;
    if (transPtr.p->m_transaction_nodes.get(failedNodeId))
    {
      jam();
+11 −2
Original line number Diff line number Diff line
@@ -879,12 +879,15 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
  HugoOperations hugoOps(*ctx->getTab());
  Ndb* pNdb = GETNDB(step);
  
  const int masterNode = restarter.getMasterNodeId();

  int dump[] = { 7090, 20 } ;
  if (restarter.dumpStateAllNodes(dump, 2))
    return NDBT_FAILED;
  
  NdbSleep_MilliSleep(3000);
  
retry:
  if(hugoOps.startTransaction(pNdb) != 0)
    return NDBT_FAILED;
  
@@ -894,8 +897,14 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
  if (hugoOps.execute_NoCommit(pNdb) != 0)
    return NDBT_FAILED;
  
  int nodeId;
  const int node = hugoOps.getTransaction()->getConnectedNodeId();
  if (node != masterNode)
  {
    hugoOps.closeTransaction(pNdb);
    goto retry;
  } 
  
  int nodeId;
  do {
    nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
  } while (nodeId == node);