summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <stewart@mysql.com>2005-11-24 20:58:06 +1100
committerunknown <stewart@mysql.com>2005-11-24 20:58:06 +1100
commit60f3487405f812d0004242485ed6b00241e726fe (patch)
treefe812315ccdaeb0f0f49e909cbd6b6bbf610029b /ndb
parent97bfd41fe1382ff33a9fc458c0bd092342b217e5 (diff)
parentc2421d3f0dffe87a272483712a4c6a455b1b3ecd (diff)
downloadmariadb-git-60f3487405f812d0004242485ed6b00241e726fe.tar.gz
Merge mysql.com:/home/stewart/Documents/MySQL/5.0/main
into mysql.com:/home/stewart/Documents/MySQL/5.0/bug15215
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/common/mgmcommon/ConfigRetriever.cpp6
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp8
2 files changed, 13 insertions, 1 deletions
diff --git a/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/ndb/src/common/mgmcommon/ConfigRetriever.cpp
index b3d0221fedb..278bf2b8ec7 100644
--- a/ndb/src/common/mgmcommon/ConfigRetriever.cpp
+++ b/ndb/src/common/mgmcommon/ConfigRetriever.cpp
@@ -341,9 +341,15 @@ ConfigRetriever::allocNodeId(int no_retries, int retry_delay_in_seconds)
{
while (1)
{
+ if(!ndb_mgm_is_connected(m_handle))
+ if(!ndb_mgm_connect(m_handle, 0, 0, 0))
+ goto next;
+
int res= ndb_mgm_alloc_nodeid(m_handle, m_version, m_node_type);
if(res >= 0)
return _ownNodeId= (Uint32)res;
+
+ next:
if (no_retries == 0)
break;
no_retries--;
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp
index 9bb238ca90b..a69a61dcda7 100644
--- a/ndb/src/mgmapi/mgmapi.cpp
+++ b/ndb/src/mgmapi/mgmapi.cpp
@@ -336,10 +336,16 @@ ndb_mgm_call(NdbMgmHandle handle, const ParserRow<ParserDummy> *command_reply,
const Properties* p = parser.parse(ctx, session);
if (p == NULL){
if(!ndb_mgm_is_connected(handle)) {
- return NULL;
+ DBUG_RETURN(NULL);
}
else
{
+ if(ctx.m_status==Parser_t::Eof
+ || ctx.m_status==Parser_t::NoLine)
+ {
+ ndb_mgm_disconnect(handle);
+ DBUG_RETURN(NULL);
+ }
/**
* Print some info about why the parser returns NULL
*/