Loading sql/ha_ndbcluster.cc +27 −5 Original line number Diff line number Diff line Loading @@ -5650,11 +5650,23 @@ ndb_get_table_statistics(Ndb* ndb, const char * table, { DBUG_ENTER("ndb_get_table_statistics"); DBUG_PRINT("enter", ("table: %s", table)); NdbTransaction* pTrans= ndb->startTransaction(); NdbTransaction* pTrans; int retries= 10; int retry_sleep= 30 * 1000; /* 30 milliseconds */ do { pTrans= ndb->startTransaction(); if (pTrans == NULL) { if (ndb->getNdbError().status == NdbError::TemporaryError && retries--) { my_sleep(retry_sleep); continue; } break; } NdbScanOperation* pOp= pTrans->getNdbScanOperation(table); if (pOp == NULL) Loading @@ -5678,7 +5690,17 @@ ndb_get_table_statistics(Ndb* ndb, const char * table, NdbTransaction::AbortOnError, TRUE); if (check == -1) { if (pTrans->getNdbError().status == NdbError::TemporaryError && retries--) { ndb->closeTransaction(pTrans); pTrans= 0; my_sleep(retry_sleep); continue; } break; } Uint32 count= 0; Uint64 sum_rows= 0; Loading Loading @@ -5713,7 +5735,7 @@ ndb_get_table_statistics(Ndb* ndb, const char * table, sum_mem, count)); DBUG_RETURN(0); } while (0); } while(1); if (pTrans) ndb->closeTransaction(pTrans); Loading Loading
sql/ha_ndbcluster.cc +27 −5 Original line number Diff line number Diff line Loading @@ -5650,11 +5650,23 @@ ndb_get_table_statistics(Ndb* ndb, const char * table, { DBUG_ENTER("ndb_get_table_statistics"); DBUG_PRINT("enter", ("table: %s", table)); NdbTransaction* pTrans= ndb->startTransaction(); NdbTransaction* pTrans; int retries= 10; int retry_sleep= 30 * 1000; /* 30 milliseconds */ do { pTrans= ndb->startTransaction(); if (pTrans == NULL) { if (ndb->getNdbError().status == NdbError::TemporaryError && retries--) { my_sleep(retry_sleep); continue; } break; } NdbScanOperation* pOp= pTrans->getNdbScanOperation(table); if (pOp == NULL) Loading @@ -5678,7 +5690,17 @@ ndb_get_table_statistics(Ndb* ndb, const char * table, NdbTransaction::AbortOnError, TRUE); if (check == -1) { if (pTrans->getNdbError().status == NdbError::TemporaryError && retries--) { ndb->closeTransaction(pTrans); pTrans= 0; my_sleep(retry_sleep); continue; } break; } Uint32 count= 0; Uint64 sum_rows= 0; Loading Loading @@ -5713,7 +5735,7 @@ ndb_get_table_statistics(Ndb* ndb, const char * table, sum_mem, count)); DBUG_RETURN(0); } while (0); } while(1); if (pTrans) ndb->closeTransaction(pTrans); Loading