summaryrefslogtreecommitdiff
path: root/ndb/tools/drop_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/tools/drop_index.cpp')
-rw-r--r--ndb/tools/drop_index.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/ndb/tools/drop_index.cpp b/ndb/tools/drop_index.cpp
index cc0dd9a8be6..47baee0b66f 100644
--- a/ndb/tools/drop_index.cpp
+++ b/ndb/tools/drop_index.cpp
@@ -83,16 +83,18 @@ int main(int argc, char** argv){
{
return NDBT_ProgramExit(NDBT_FAILED);
}
- Ndb MyNdb(&con, _dbname );
+ if (con.wait_until_ready(30,0) < 0)
+ {
+ ndbout << "Cluster nodes not ready in 30 seconds." << endl;
+ return NDBT_ProgramExit(NDBT_FAILED);
+ }
+ Ndb MyNdb(&con, _dbname );
if(MyNdb.init() != 0){
ERR(MyNdb.getNdbError());
return NDBT_ProgramExit(NDBT_FAILED);
}
- while(MyNdb.waitUntilReady() != 0)
- ndbout << "Waiting for ndb to become ready..." << endl;
-
int res = 0;
for(int i = 0; i<argc; i++){
ndbout << "Dropping index " << argv[i] << "...";