From 53cd54118792af3f1bb96981810bc7405b3d077d Mon Sep 17 00:00:00 2001 From: "stewart@mysql.com" <> Date: Thu, 18 May 2006 21:32:24 +1000 Subject: [PATCH] BUG#18966 Change in stop/shutdown behaviour Now need this fix to prevent crash of ndb_mgm on invalid mgm protocol. --- ndb/src/mgmclient/CommandInterpreter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 0fdb81989b3..9e1224ab3ef 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -429,14 +429,14 @@ emptyString(const char* s) void CommandInterpreter::printError() { - if (ndb_mgm_check_connection(m_mgmsrv)) - { - disconnect(); - } ndbout_c("* %5d: %s", ndb_mgm_get_latest_error(m_mgmsrv), ndb_mgm_get_latest_error_msg(m_mgmsrv)); ndbout_c("* %s", ndb_mgm_get_latest_error_desc(m_mgmsrv)); + if (ndb_mgm_check_connection(m_mgmsrv)) + { + disconnect(); + } } //*****************************************************************************