diff options
author | unknown <tomas@poseidon.(none)> | 2004-09-02 15:51:44 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.(none)> | 2004-09-02 15:51:44 +0000 |
commit | 0d3ade0bb5bdb4abade0f2178b30dab8e39f03bf (patch) | |
tree | 92f3e6a76aa05fa9be6b0987926131ad74ef9115 /ndb/tools | |
parent | 467017139e7ed040bdf4c2650ac037a9a558dc63 (diff) | |
download | mariadb-git-0d3ade0bb5bdb4abade0f2178b30dab8e39f03bf.tar.gz |
fixed wrong initial auto increment value bug#5369
ndb/tools/waiter.cpp:
added option to set timeout to ndb_waiter
Diffstat (limited to 'ndb/tools')
-rw-r--r-- | ndb/tools/waiter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ndb/tools/waiter.cpp b/ndb/tools/waiter.cpp index 86d34066c55..63469c6d746 100644 --- a/ndb/tools/waiter.cpp +++ b/ndb/tools/waiter.cpp @@ -27,17 +27,17 @@ #include <NDBT.hpp> int -waitClusterStatus(const char* _addr, - ndb_mgm_node_status _status= NDB_MGM_NODE_STATUS_STARTED, - unsigned int _timeout= 120); +waitClusterStatus(const char* _addr, ndb_mgm_node_status _status, unsigned int _timeout); int main(int argc, const char** argv){ const char* _hostName = NULL; int _no_contact = 0; int _help = 0; + int _timeout = 120; struct getargs args[] = { + { "timeout", 0, arg_integer, &_timeout, "Timeout to wait", "#" }, { "no-contact", 0, arg_flag, &_no_contact, "Wait for cluster no contact", "" }, { "usage", '?', arg_flag, &_help, "Print help", "" } }; @@ -92,9 +92,9 @@ int main(int argc, const char** argv){ } if (_no_contact) { - if (waitClusterStatus(_hostName, NDB_MGM_NODE_STATUS_NO_CONTACT) != 0) + if (waitClusterStatus(_hostName, NDB_MGM_NODE_STATUS_NO_CONTACT, _timeout) != 0) return NDBT_ProgramExit(NDBT_FAILED); - } else if (waitClusterStatus(_hostName) != 0) + } else if (waitClusterStatus(_hostName, NDB_MGM_NODE_STATUS_STARTED, _timeout) != 0) return NDBT_ProgramExit(NDBT_FAILED); return NDBT_ProgramExit(NDBT_OK); |