summaryrefslogtreecommitdiff
path: root/ndb/tools/desc.cpp
diff options
context:
space:
mode:
authortomas@poseidon.ndb.mysql.com <>2005-01-28 00:42:41 +0100
committertomas@poseidon.ndb.mysql.com <>2005-01-28 00:42:41 +0100
commit732d1a5e81037407067c345f5f6f33ee95210e6e (patch)
treeb49b8c43f32032d4eac08d9789796e546970efec /ndb/tools/desc.cpp
parent42531336f0b3e79c9b58c41cf46831f30977e359 (diff)
downloadmariadb-git-732d1a5e81037407067c345f5f6f33ee95210e6e.tar.gz
Bug#8167 signal usage clash between mysql server and ndb shared memory
added shared memory config parameter, signum for use in signalling added global variable for holdign signum to be used for shared memory connection only fiddle with signals if it is set simplified common ndb client option handling
Diffstat (limited to 'ndb/tools/desc.cpp')
-rw-r--r--ndb/tools/desc.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/ndb/tools/desc.cpp b/ndb/tools/desc.cpp
index 4bca51ee903..4287a771694 100644
--- a/ndb/tools/desc.cpp
+++ b/ndb/tools/desc.cpp
@@ -19,9 +19,6 @@
#include <NDBT.hpp>
#include <NdbApi.hpp>
-enum ndb_desc_options {
- NDB_STD_OPTS_OPTIONS
-};
NDB_STD_OPTS_VARS;
static const char* _dbname = "TEST_DB";
@@ -37,17 +34,13 @@ 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 properties of table(s) in NDB Cluster.\n"\
- " ex: desc T1 T2 T4\n";
- print_version();
+ " ex: desc T1 T2 T4\n";
+ 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_desc.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_desc.trace");
}
int main(int argc, char** argv){