summaryrefslogtreecommitdiff
path: root/ndb/src/mgmapi/mgmapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/mgmapi/mgmapi.cpp')
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp8
1 files changed, 7 insertions, 1 deletions
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
*/