summaryrefslogtreecommitdiff
path: root/ndb/src/mgmclient/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorunknown <matthias@three.local.lan>2004-11-19 08:38:20 +0100
committerunknown <matthias@three.local.lan>2004-11-19 08:38:20 +0100
commitd15053f8e8187214a53dec279b6d85c19244d858 (patch)
tree32b28efcf3060d794a86dfc5ea9fe609a389af36 /ndb/src/mgmclient/CommandInterpreter.cpp
parentd111d7e65e3906d9387deee327fce9671f8666fd (diff)
parent11411969e627ce1d35d488e6f67ad92a7b54cc8c (diff)
downloadmariadb-git-d15053f8e8187214a53dec279b6d85c19244d858.tar.gz
Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1
into three.local.lan:/home/matthias/Arbeit/mysql-4.1/src
Diffstat (limited to 'ndb/src/mgmclient/CommandInterpreter.cpp')
-rw-r--r--ndb/src/mgmclient/CommandInterpreter.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp
index d940f6e165a..bdeb885ed8b 100644
--- a/ndb/src/mgmclient/CommandInterpreter.cpp
+++ b/ndb/src/mgmclient/CommandInterpreter.cpp
@@ -193,7 +193,7 @@ extern "C" {
{
return (Ndb_mgmclient_handle) new Ndb_mgmclient(connect_string);
}
- int ndb_mgmclient_execute(Ndb_mgmclient_handle h, int argc, const char** argv)
+ int ndb_mgmclient_execute(Ndb_mgmclient_handle h, int argc, char** argv)
{
return ((Ndb_mgmclient*)h)->execute(argc, argv, 1);
}
@@ -226,7 +226,7 @@ extern "C" {
#include <util/InputStream.hpp>
#include <util/OutputStream.hpp>
-int Ndb_mgmclient::execute(int argc, const char** argv, int _try_reconnect)
+int Ndb_mgmclient::execute(int argc, char** argv, int _try_reconnect)
{
if (argc <= 0)
return 0;
@@ -1386,7 +1386,7 @@ void
CommandInterpreter::executeDumpState(int processId, const char* parameters,
bool all)
{
- if(parameters == 0 || strlen(parameters) == 0){
+ if(emptyString(parameters)){
ndbout << "Expected argument" << endl;
return;
}
@@ -1806,6 +1806,10 @@ CommandInterpreter::executeEventReporting(int processId,
const char* parameters,
bool all)
{
+ if (emptyString(parameters)) {
+ ndbout << "Expected argument" << endl;
+ return;
+ }
connect();
BaseString tmp(parameters);
@@ -1906,6 +1910,7 @@ void
CommandInterpreter::executeAbortBackup(char* parameters)
{
connect();
+
strtok(parameters, " ");
struct ndb_mgm_reply reply;
char* id = strtok(NULL, "\0");