summaryrefslogtreecommitdiff
path: root/ndb/tools/listTables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/tools/listTables.cpp')
-rw-r--r--ndb/tools/listTables.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/ndb/tools/listTables.cpp b/ndb/tools/listTables.cpp
index e018bd6d9a5..a49fbde596e 100644
--- a/ndb/tools/listTables.cpp
+++ b/ndb/tools/listTables.cpp
@@ -161,9 +161,6 @@ list(const char * tabname,
}
}
-enum ndb_show_tables_options {
- NDB_STD_OPTS_OPTIONS
-};
NDB_STD_OPTS_VARS;
static const char* _dbname = "TEST_DB";
@@ -186,20 +183,16 @@ static struct my_option my_long_options[] =
GET_BOOL, NO_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 list all system objects in NDB Cluster.\n"\
"Type of objects to display can be limited with -t option\n"\
- " ex: list_tables -t 2 would show all UserTables\n"\
+ " ex: ndb_show_tables -t 2 would show all UserTables\n"\
"To show all indexes for a table write table name as final argument\n"\
- " ex: list_tables T1\n";
- print_version();
+ " ex: ndb_show_tables T1\n";
+ ndb_std_print_version();
my_print_help(my_long_options);
my_print_variables(my_long_options);
}
@@ -207,18 +200,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_show_tables.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_show_tables.trace");
}
int main(int argc, char** argv){