summaryrefslogtreecommitdiff
path: root/ndb/tools/delete_all.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/tools/delete_all.cpp')
-rw-r--r--ndb/tools/delete_all.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/ndb/tools/delete_all.cpp b/ndb/tools/delete_all.cpp
index 38a9cdd9354..4a153208c65 100644
--- a/ndb/tools/delete_all.cpp
+++ b/ndb/tools/delete_all.cpp
@@ -24,9 +24,6 @@
static int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab, int parallelism=240);
-enum ndb_delete_all {
- NDB_STD_OPTS_OPTIONS
-};
NDB_STD_OPTS_VARS;
static const char* _dbname = "TEST_DB";
@@ -38,16 +35,12 @@ static struct my_option my_long_options[] =
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-static void print_version()
-{
- printf("MySQL distrib %s, for %s (%s)\n",MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
-}
static void usage()
{
char desc[] =
"tabname\n"\
"This program will delete all records in the specified table using scan delete.\n";
- print_version();
+ ndb_std_print_version();
my_print_help(my_long_options);
my_print_variables(my_long_options);
}
@@ -55,18 +48,8 @@ static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
- switch (optid) {
- case '#':
- DBUG_PUSH(argument ? argument : "d:t:O,/tmp/ndb_delete_all.trace");
- break;
- case 'V':
- print_version();
- exit(0);
- case '?':
- usage();
- exit(0);
- }
- return 0;
+ return ndb_std_get_one_option(optid, opt, argument ? argument :
+ "d:t:O,/tmp/ndb_delete_all.trace");
}
int main(int argc, char** argv){