diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-18 19:07:14 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-18 19:07:14 +0000 |
commit | 57b6bfc9cff184daf6f44a89dbbb9084a8e92032 (patch) | |
tree | 169b1c1e3f1017c50d714362d2d7f4b38ec5fe03 /ndb/tools | |
parent | 319df4bb619ee1d7f667f79aab6d1fea59714357 (diff) | |
download | mariadb-git-57b6bfc9cff184daf6f44a89dbbb9084a8e92032.tar.gz |
bug#6684, error messages id wrong settings
Diffstat (limited to 'ndb/tools')
-rw-r--r-- | ndb/tools/restore/main.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/ndb/tools/restore/main.cpp b/ndb/tools/restore/main.cpp index 482212911cb..064fbad43a3 100644 --- a/ndb/tools/restore/main.cpp +++ b/ndb/tools/restore/main.cpp @@ -74,7 +74,7 @@ static struct my_option my_long_options[] = "No of parallel transactions during restore of data." "(parallelism can be 1 to 1024)", (gptr*) &ga_nParallelism, (gptr*) &ga_nParallelism, 0, - GET_INT, REQUIRED_ARG, 128, 0, 0, 0, 0, 0 }, + GET_INT, REQUIRED_ARG, 128, 1, 1024, 0, 1, 0 }, { "print", 256, "Print data and log to stdout", (gptr*) &_print, (gptr*) &_print, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, @@ -120,6 +120,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'V': print_version(); exit(0); + case 'n': + if (ga_nodeId == 0) + { + printf("Error in --nodeid|-n setting, see --help\n"); + exit(1); + } + case 'b': + if (ga_backupId == 0) + { + printf("Error in --backupid|-b setting, see --help\n"); + exit(1); + } case '?': usage(); exit(0); @@ -131,11 +143,8 @@ readArguments(int *pargc, char*** pargv) { const char *load_default_groups[]= { "ndb_tools","ndb_restore",0 }; load_defaults("my",load_default_groups,pargc,pargv); - if (handle_options(pargc, pargv, my_long_options, get_one_option) || - ga_nodeId == 0 || - ga_backupId == 0 || - ga_nParallelism < 1 || - ga_nParallelism >1024) { + if (handle_options(pargc, pargv, my_long_options, get_one_option)) + { exit(1); } @@ -343,7 +352,8 @@ main(int argc, char** argv) if (res < 0) { - err << "Restore: An error occured while restoring data. Exiting... res=" << res << endl; + err << "Restore: An error occured while restoring data. Exiting... " + << "res=" << res << endl; return -1; } @@ -369,7 +379,8 @@ main(int argc, char** argv) } if (res < 0) { - err << "Restore: An restoring the data log. Exiting... res=" << res << endl; + err << "Restore: An restoring the data log. Exiting... res=" + << res << endl; return -1; } logIter.validateFooter(); //not implemented |