Commit 1c24fc31 authored by unknown's avatar unknown
Browse files

ha_ndbcluster.cc:

    Bug #25668    ndb: mysqld may core if cluster disconnected
    -- pTrans may be NULL, remove not needed usage of handler::ndb_err


sql/ha_ndbcluster.cc:
    Bug #25668    ndb: mysqld may core if cluster disconnected
    -- pTrans may be NULL, remove not needed usage of handler::ndb_err
parent dbf4dc3d
Loading
Loading
Loading
Loading
+9 −16
Original line number Diff line number Diff line
@@ -6109,32 +6109,25 @@ ndb_get_table_statistics(ha_ndbcluster* file, bool report_error, Ndb* ndb,

    DBUG_RETURN(0);
retry:
    if(report_error)

    {
      if (file)
      ndb->closeTransaction(pTrans);
      pTrans= NULL;
    }
    if (error.status == NdbError::TemporaryError && retries--)
    {
        reterr= file->ndb_err(pTrans);
      my_sleep(retry_sleep);
      continue;
    }
      else
    if(report_error)
    {
      const NdbError& tmp= error;
      ERR_PRINT(tmp);
      reterr= ndb_to_mysql_error(&tmp);
    }
    }
    else
      reterr= error.code;

    if (pTrans)
    {
      ndb->closeTransaction(pTrans);
      pTrans= NULL;
    }
    if (error.status == NdbError::TemporaryError && retries--)
    {
      my_sleep(retry_sleep);
      continue;
    }
    break;
  } while(1);
  DBUG_PRINT("exit", ("failed, reterr: %u, NdbError %u(%s)", reterr,