21 #include <ndb_version.h>
24 static void default_ndb_opt_short(
void)
26 ndb_short_usage_sub(NULL);
29 static void default_ndb_opt_usage(
void)
33 NDB_STD_OPTS(
"ndbapi_program")
35 const char *load_default_groups[]= {
"mysql_cluster", 0 };
37 ndb_usage(default_ndb_opt_short, load_default_groups, my_long_options);
40 static void (*g_ndb_opt_short_usage)(void)= default_ndb_opt_short;
41 static void (*g_ndb_opt_usage)(void)= default_ndb_opt_usage;
43 void ndb_opt_set_usage_funcs(
void (*short_usage)(
void),
50 g_ndb_opt_short_usage= short_usage;
52 g_ndb_opt_usage= usage;
56 const char* ndb_progname(
void)
60 return "<unknown program>";
63 void ndb_short_usage_sub(
const char*
extra)
65 printf(
"Usage: %s [OPTIONS]%s%s\n", ndb_progname(),
70 void ndb_usage(
void (*usagefunc)(
void),
const char *load_default_groups[],
75 ndb_std_print_version();
76 print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
78 my_print_help(my_long_options);
79 my_print_variables(my_long_options);
84 ndb_std_get_one_option(
int optid,
85 const struct my_option *opt __attribute__((unused)),
86 char *argument __attribute__((unused)))
93 DBUG_SET_INITIAL(argument ? argument : opt_debug);
98 ndb_std_print_version();
101 (*g_ndb_opt_usage)();
107 void ndb_std_print_version()
110 const char *suffix=
"-debug";
112 const char *suffix=
"";
114 printf(
"MySQL distrib %s%s, for %s (%s)\n",
115 NDB_VERSION_STRING,suffix,SYSTEM_TYPE,MACHINE_TYPE);
118 my_bool ndb_is_load_default_arg_separator(
const char* arg)
120 #ifndef MYSQL_VERSION_ID
121 #error "Need MYSQL_VERSION_ID defined"
124 #if MYSQL_VERSION_ID >= 50510
129 if (my_getopt_is_args_separator(arg))
131 #elif MYSQL_VERSION_ID >= 50501
132 if (arg == args_separator)