From ae736acfc3d94537d48be8d85d2c260154d76a52 Mon Sep 17 00:00:00 2001
From: unknown <jonas@mysql.com>
Date: Wed, 5 Jan 2005 13:37:34 +0100
Subject: [PATCH] ndb - getTable retry if DICT busy

ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  getTable retry if DICT busy
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
---
 BitKeeper/etc/logging_ok             | 1 +
 ndb/src/ndbapi/NdbDictionaryImpl.cpp | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 2b3339e59d3..04e18ab8892 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -96,6 +96,7 @@ jcole@tetra.spaceapes.com
 jimw@mysql.com
 joerg@mysql.com
 jon@gigan.
+jonas@mysql.com
 joreland@bk-internal.mysql.com
 joreland@mysql.com
 jorge@linux.jorge.mysql.com
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index 2d37c7883ec..5a4bfb77541 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -941,7 +941,7 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal,
       for (int j=0; j < noerrcodes; j++)
 	if(m_error.code == errcodes[j]) {
 	  doContinue = 1;
-	  continue;
+	  break;
 	}
       if (doContinue)
 	continue;
@@ -1007,12 +1007,14 @@ NdbDictInterface::getTable(class NdbApiSignal * signal,
 			   Uint32 noOfSections, bool fullyQualifiedNames)
 {
   //GetTabInfoReq * const req = CAST_PTR(GetTabInfoReq, signal->getDataPtrSend());
+  int errCodes[] = {GetTabInfoRef::Busy };
+
   int r = dictSignal(signal,ptr,noOfSections,
 		     0/*do not use masternode id*/,
 		     100,
 		     WAIT_GET_TAB_INFO_REQ,
 		     WAITFOR_RESPONSE_TIMEOUT,
-		     NULL,0);
+		     errCodes, 1);
   if (r) return 0;
 
   NdbTableImpl * rt = 0;
-- 
2.30.9