Commit 7f80eb46 authored by Davi Arnaut's avatar Davi Arnaut

Bug#42733: Type-punning warnings when compiling MySQL

Post-merge fix: remove remaining casts which are now
unnecessary and are actually causing warnings.
parent ecd4a294
...@@ -5954,8 +5954,8 @@ static struct my_option my_long_options[] = ...@@ -5954,8 +5954,8 @@ static struct my_option my_long_options[] =
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"result-format-version", OPT_RESULT_FORMAT_VERSION, {"result-format-version", OPT_RESULT_FORMAT_VERSION,
"Version of the result file format to use", "Version of the result file format to use",
(uchar**) &opt_result_format_version, &opt_result_format_version,
(uchar**) &opt_result_format_version, 0, &opt_result_format_version, 0,
GET_INT, REQUIRED_ARG, 1, 1, 2, 0, 0, 0}, GET_INT, REQUIRED_ARG, 1, 1, 2, 0, 0, 0},
{"server-arg", 'A', "Send option value to embedded server as a parameter.", {"server-arg", 'A', "Send option value to embedded server as a parameter.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -5998,8 +5998,7 @@ static struct my_option my_long_options[] = ...@@ -5998,8 +5998,7 @@ static struct my_option my_long_options[] =
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"connect_timeout", OPT_CONNECT_TIMEOUT, {"connect_timeout", OPT_CONNECT_TIMEOUT,
"Number of seconds before connection timeout.", "Number of seconds before connection timeout.",
(uchar**) &opt_connect_timeout, &opt_connect_timeout, &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG,
(uchar**) &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG,
120, 0, 3600 * 12, 0, 0, 0}, 120, 0, 3600 * 12, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, 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}
}; };
......
...@@ -87,7 +87,8 @@ So, we can read full search-structure as 32-bit word ...@@ -87,7 +87,8 @@ So, we can read full search-structure as 32-bit word
#include "mysql_version.h" #include "mysql_version.h"
#include "lex.h" #include "lex.h"
const char *default_dbug_option="d:t:o,/tmp/gen_lex_hash.trace"; static char default_dbug_option[]= "d:t:o,/tmp/gen_lex_hash.trace";
static char *dbug_option= default_dbug_option;
struct my_option my_long_options[] = struct my_option my_long_options[] =
{ {
...@@ -95,8 +96,8 @@ struct my_option my_long_options[] = ...@@ -95,8 +96,8 @@ struct my_option my_long_options[] =
{"debug", '#', "This is a non-debug version. Catch this and exit", {"debug", '#', "This is a non-debug version. Catch this and exit",
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else #else
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option, {"debug", '#', "Output debug log", &dbug_option,
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, &dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"help", '?', "Display help and exit", {"help", '?', "Display help and exit",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
...@@ -368,7 +369,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -368,7 +369,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
usage(0); usage(0);
exit(0); exit(0);
case '#': case '#':
DBUG_PUSH(argument ? argument : default_dbug_option); DBUG_PUSH(argument ? argument : dbug_option);
break; break;
} }
return 0; return 0;
......
...@@ -46,7 +46,7 @@ static struct my_option my_long_options[] = ...@@ -46,7 +46,7 @@ static struct my_option my_long_options[] =
{"stats", 's', "Report global stats.", {"stats", 's', "Report global stats.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"verbose", 'v', "Be verbose.", {"verbose", 'v', "Be verbose.",
(uchar**) &verbose, (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, &verbose, &verbose, 0, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -58,40 +58,40 @@ const char *opt_debug= 0; ...@@ -58,40 +58,40 @@ const char *opt_debug= 0;
"Set connect string for connecting to ndb_mgmd. " \ "Set connect string for connecting to ndb_mgmd. " \
"Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " \ "Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " \
"Overrides specifying entries in NDB_CONNECTSTRING and my.cnf", \ "Overrides specifying entries in NDB_CONNECTSTRING and my.cnf", \
(uchar**) &opt_ndb_connectstring, (uchar**) &opt_ndb_connectstring, \ &opt_ndb_connectstring, &opt_ndb_connectstring, \
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "ndb-mgmd-host", OPT_NDB_MGMD, \ { "ndb-mgmd-host", OPT_NDB_MGMD, \
"Set host and port for connecting to ndb_mgmd. " \ "Set host and port for connecting to ndb_mgmd. " \
"Syntax: <hostname>[:<port>].", \ "Syntax: <hostname>[:<port>].", \
(uchar**) &opt_ndb_mgmd, (uchar**) &opt_ndb_mgmd, 0, \ &opt_ndb_mgmd, &opt_ndb_mgmd, 0, \
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\ GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "ndb-nodeid", OPT_NDB_NODEID, \ { "ndb-nodeid", OPT_NDB_NODEID, \
"Set node id for this node.", \ "Set node id for this node.", \
(uchar**) &opt_ndb_nodeid, (uchar**) &opt_ndb_nodeid, 0, \ &opt_ndb_nodeid, &opt_ndb_nodeid, 0, \
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\ GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "ndb-shm", OPT_NDB_SHM,\ { "ndb-shm", OPT_NDB_SHM,\
"Allow optimizing using shared memory connections when available",\ "Allow optimizing using shared memory connections when available",\
(uchar**) &opt_ndb_shm, (uchar**) &opt_ndb_shm, 0,\ &opt_ndb_shm, &opt_ndb_shm, 0,\
GET_BOOL, NO_ARG, OPT_NDB_SHM_DEFAULT, 0, 0, 0, 0, 0 },\ GET_BOOL, NO_ARG, OPT_NDB_SHM_DEFAULT, 0, 0, 0, 0, 0 },\
{"ndb-optimized-node-selection", OPT_NDB_OPTIMIZED_NODE_SELECTION,\ {"ndb-optimized-node-selection", OPT_NDB_OPTIMIZED_NODE_SELECTION,\
"Select nodes for transactions in a more optimal way",\ "Select nodes for transactions in a more optimal way",\
(uchar**) &opt_ndb_optimized_node_selection,\ &opt_ndb_optimized_node_selection,\
(uchar**) &opt_ndb_optimized_node_selection, 0,\ &opt_ndb_optimized_node_selection, 0,\
GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},\ GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},\
{ "connect-string", OPT_NDB_CONNECTSTRING, "same as --ndb-connectstring",\ { "connect-string", OPT_NDB_CONNECTSTRING, "same as --ndb-connectstring",\
(uchar**) &opt_ndb_connectstring, (uchar**) &opt_ndb_connectstring, \ &opt_ndb_connectstring, &opt_ndb_connectstring, \
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "core-file", OPT_WANT_CORE, "Write core on errors.",\ { "core-file", OPT_WANT_CORE, "Write core on errors.",\
(uchar**) &opt_core, (uchar**) &opt_core, 0,\ &opt_core, &opt_core, 0,\
GET_BOOL, NO_ARG, OPT_WANT_CORE_DEFAULT, 0, 0, 0, 0, 0},\ GET_BOOL, NO_ARG, OPT_WANT_CORE_DEFAULT, 0, 0, 0, 0, 0},\
{"character-sets-dir", OPT_CHARSETS_DIR,\ {"character-sets-dir", OPT_CHARSETS_DIR,\
"Directory where character sets are.", (uchar**) &charsets_dir,\ "Directory where character sets are.", &charsets_dir,\
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}\ &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}\
#ifndef DBUG_OFF #ifndef DBUG_OFF
#define NDB_STD_OPTS(prog_name) \ #define NDB_STD_OPTS(prog_name) \
{ "debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", \ { "debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", \
(uchar**) &opt_debug, (uchar**) &opt_debug, \ &opt_debug, &opt_debug, \
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 }, \ 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 }, \
NDB_STD_OPTS_COMMON NDB_STD_OPTS_COMMON
#else #else
......
...@@ -39,22 +39,22 @@ static const char *user = 0; ...@@ -39,22 +39,22 @@ static const char *user = 0;
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
{ "work-dir", 'w', "Work directory", { "work-dir", 'w', "Work directory",
(uchar**) &work_dir, (uchar**) &work_dir, 0, &work_dir, &work_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "port", 'p', "TCP port to listen on", { "port", 'p', "TCP port to listen on",
(uchar**) &port, (uchar**) &port, 0, &port, &port, 0,
GET_INT, REQUIRED_ARG, CPCD_DEFAULT_TCP_PORT, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, CPCD_DEFAULT_TCP_PORT, 0, 0, 0, 0, 0 },
{ "syslog", 'S', "Log events to syslog", { "syslog", 'S', "Log events to syslog",
(uchar**) &use_syslog, (uchar**) &use_syslog, 0, &use_syslog, &use_syslog, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "logfile", 'L', "File to log events to", { "logfile", 'L', "File to log events to",
(uchar**) &logfile, (uchar**) &logfile, 0, &logfile, &logfile, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "debug", 'D', "Enable debug mode", { "debug", 'D', "Enable debug mode",
(uchar**) &debug, (uchar**) &debug, 0, &debug, &debug, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "user", 'u', "Run as user", { "user", 'u', "Run as user",
(uchar**) &user, (uchar**) &user, 0, &user, &user, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -74,35 +74,35 @@ static struct my_option my_long_options[] = ...@@ -74,35 +74,35 @@ static struct my_option my_long_options[] =
{ "initial", OPT_INITIAL, { "initial", OPT_INITIAL,
"Perform initial start of ndbd, including cleaning the file system. " "Perform initial start of ndbd, including cleaning the file system. "
"Consult documentation before using this", "Consult documentation before using this",
(uchar**) &_initial, (uchar**) &_initial, 0, &_initial, &_initial, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "nostart", 'n', { "nostart", 'n',
"Don't start ndbd immediately. Ndbd will await command from ndb_mgmd", "Don't start ndbd immediately. Ndbd will await command from ndb_mgmd",
(uchar**) &_no_start, (uchar**) &_no_start, 0, &_no_start, &_no_start, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "daemon", 'd', "Start ndbd as daemon (default)", { "daemon", 'd', "Start ndbd as daemon (default)",
(uchar**) &_daemon, (uchar**) &_daemon, 0, &_daemon, &_daemon, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 },
{ "nodaemon", OPT_NODAEMON, { "nodaemon", OPT_NODAEMON,
"Do not start ndbd as daemon, provided for testing purposes", "Do not start ndbd as daemon, provided for testing purposes",
(uchar**) &_no_daemon, (uchar**) &_no_daemon, 0, &_no_daemon, &_no_daemon, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "foreground", OPT_FOREGROUND, { "foreground", OPT_FOREGROUND,
"Run real ndbd in foreground, provided for debugging purposes" "Run real ndbd in foreground, provided for debugging purposes"
" (implies --nodaemon)", " (implies --nodaemon)",
(uchar**) &_foreground, (uchar**) &_foreground, 0, &_foreground, &_foreground, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "nowait-nodes", OPT_NOWAIT_NODES, { "nowait-nodes", OPT_NOWAIT_NODES,
"Nodes that will not be waited for during start", "Nodes that will not be waited for during start",
(uchar**) &_nowait_nodes, (uchar**) &_nowait_nodes, 0, &_nowait_nodes, &_nowait_nodes, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "initial-start", OPT_INITIAL_START, { "initial-start", OPT_INITIAL_START,
"Perform initial start", "Perform initial start",
(uchar**) &_initialstart, (uchar**) &_initialstart, 0, &_initialstart, &_initialstart, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "bind-address", OPT_NOWAIT_NODES, { "bind-address", OPT_NOWAIT_NODES,
"Local bind address", "Local bind address",
(uchar**) &_bind_address, (uchar**) &_bind_address, 0, &_bind_address, &_bind_address, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -73,11 +73,11 @@ static struct my_option my_long_options[] = ...@@ -73,11 +73,11 @@ static struct my_option my_long_options[] =
NDB_STD_OPTS("ndb_mgm"), NDB_STD_OPTS("ndb_mgm"),
{ "execute", 'e', { "execute", 'e',
"execute command and exit", "execute command and exit",
(uchar**) &opt_execute_str, (uchar**) &opt_execute_str, 0, &opt_execute_str, &opt_execute_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "try-reconnect", 't', { "try-reconnect", 't',
"Specify number of tries for connecting to ndb_mgmd (0 = infinite)", "Specify number of tries for connecting to ndb_mgmd (0 = infinite)",
(uchar**) &_try_reconnect, (uchar**) &_try_reconnect, 0, &_try_reconnect, &_try_reconnect, 0,
GET_UINT, REQUIRED_ARG, 3, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 3, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, 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}
}; };
......
...@@ -142,29 +142,29 @@ static struct my_option my_long_options[] = ...@@ -142,29 +142,29 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_mgmd"), NDB_STD_OPTS("ndb_mgmd"),
{ "config-file", 'f', "Specify cluster configuration file", { "config-file", 'f', "Specify cluster configuration file",
(uchar**) &opt_config_filename, (uchar**) &opt_config_filename, 0, &opt_config_filename, &opt_config_filename, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "print-full-config", 'P', "Print full config and exit", { "print-full-config", 'P', "Print full config and exit",
(uchar**) &g_print_full_config, (uchar**) &g_print_full_config, 0, &g_print_full_config, &g_print_full_config, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "daemon", 'd', "Run ndb_mgmd in daemon mode (default)", { "daemon", 'd', "Run ndb_mgmd in daemon mode (default)",
(uchar**) &opt_daemon, (uchar**) &opt_daemon, 0, &opt_daemon, &opt_daemon, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 },
{ "interactive", OPT_INTERACTIVE, { "interactive", OPT_INTERACTIVE,
"Run interactive. Not supported but provided for testing purposes", "Run interactive. Not supported but provided for testing purposes",
(uchar**) &opt_interactive, (uchar**) &opt_interactive, 0, &opt_interactive, &opt_interactive, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-nodeid-checks", OPT_NO_NODEID_CHECKS, { "no-nodeid-checks", OPT_NO_NODEID_CHECKS,
"Do not provide any node id checks", "Do not provide any node id checks",
(uchar**) &g_no_nodeid_checks, (uchar**) &g_no_nodeid_checks, 0, &g_no_nodeid_checks, &g_no_nodeid_checks, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "nodaemon", OPT_NO_DAEMON, { "nodaemon", OPT_NO_DAEMON,
"Don't run as daemon, but don't read from stdin", "Don't run as daemon, but don't read from stdin",
(uchar**) &opt_non_interactive, (uchar**) &opt_non_interactive, 0, &opt_non_interactive, &opt_non_interactive, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "mycnf", 256, { "mycnf", 256,
"Read cluster config from my.cnf", "Read cluster config from my.cnf",
(uchar**) &opt_mycnf, (uchar**) &opt_mycnf, 0, &opt_mycnf, &opt_mycnf, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -1297,43 +1297,43 @@ my_long_options[] = ...@@ -1297,43 +1297,43 @@ my_long_options[] =
{ {
NDB_STD_OPTS("testIndexStat"), NDB_STD_OPTS("testIndexStat"),
{ "loglevel", 1001, "Logging level in this program 0-3 (default 0)", { "loglevel", 1001, "Logging level in this program 0-3 (default 0)",
(uchar **)&g_opts.loglevel, (uchar **)&g_opts.loglevel, 0, &g_opts.loglevel, &g_opts.loglevel, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "seed", 1002, "Random seed (0=loop number, default -1=random)", { "seed", 1002, "Random seed (0=loop number, default -1=random)",
(uchar **)&g_opts.seed, (uchar **)&g_opts.seed, 0, &g_opts.seed, &g_opts.seed, 0,
GET_INT, REQUIRED_ARG, -1, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, -1, 0, 0, 0, 0, 0 },
{ "loop", 1003, "Number of test loops (default 1, 0=forever)", { "loop", 1003, "Number of test loops (default 1, 0=forever)",
(uchar **)&g_opts.loop, (uchar **)&g_opts.loop, 0, &g_opts.loop, &g_opts.loop, 0,
GET_INT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0 },
{ "rows", 1004, "Number of rows (default 100000)", { "rows", 1004, "Number of rows (default 100000)",
(uchar **)&g_opts.rows, (uchar **)&g_opts.rows, 0, &g_opts.rows, &g_opts.rows, 0,
GET_UINT, REQUIRED_ARG, 100000, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 100000, 0, 0, 0, 0, 0 },
{ "ops", 1005, "Number of index scans per loop (default 1000)", { "ops", 1005, "Number of index scans per loop (default 1000)",
(uchar **)&g_opts.ops, (uchar **)&g_opts.ops, 0, &g_opts.ops, &g_opts.ops, 0,
GET_UINT, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0 },
{ "dupkeys", 1006, "Pct records per key (min 100, default 1000)", { "dupkeys", 1006, "Pct records per key (min 100, default 1000)",
(uchar **)&g_opts.dupkeys, (uchar **)&g_opts.dupkeys, 0, &g_opts.dupkeys, &g_opts.dupkeys, 0,
GET_UINT, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0 },
{ "scanpct", 1007, "Preferred max pct of total rows per scan (default 5)", { "scanpct", 1007, "Preferred max pct of total rows per scan (default 5)",
(uchar **)&g_opts.scanpct, (uchar **)&g_opts.scanpct, 0, &g_opts.scanpct, &g_opts.scanpct, 0,
GET_UINT, REQUIRED_ARG, 5, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 5, 0, 0, 0, 0, 0 },
{ "nullkeys", 1008, "Pct nulls in each key attribute (default 10)", { "nullkeys", 1008, "Pct nulls in each key attribute (default 10)",
(uchar **)&g_opts.nullkeys, (uchar **)&g_opts.nullkeys, 0, &g_opts.nullkeys, &g_opts.nullkeys, 0,
GET_UINT, REQUIRED_ARG, 10, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 10, 0, 0, 0, 0, 0 },
{ "eqscans", 1009, "Pct scans for partial/full equality (default 50)", { "eqscans", 1009, "Pct scans for partial/full equality (default 50)",
(uchar **)&g_opts.eqscans, (uchar **)&g_opts.eqscans, 0, &g_opts.eqscans, &g_opts.eqscans, 0,
GET_UINT, REQUIRED_ARG, 50, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 50, 0, 0, 0, 0, 0 },
{ "dupscans", 1010, "Pct scans using same bounds (default 10)", { "dupscans", 1010, "Pct scans using same bounds (default 10)",
(uchar **)&g_opts.dupscans, (uchar **)&g_opts.dupscans, 0, &g_opts.dupscans, &g_opts.dupscans, 0,
GET_UINT, REQUIRED_ARG, 10, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 10, 0, 0, 0, 0, 0 },
{ "keeptable", 1011, "Use existing table and data if any and do not drop", { "keeptable", 1011, "Use existing table and data if any and do not drop",
(uchar **)&g_opts.keeptable, (uchar **)&g_opts.keeptable, 0, &g_opts.keeptable, &g_opts.keeptable, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-extra-checks", 1012, "Omit expensive consistency checks", { "no-extra-checks", 1012, "Omit expensive consistency checks",
(uchar **)&g_opts.nochecks, (uchar **)&g_opts.nochecks, 0, &g_opts.nochecks, &g_opts.nochecks, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "abort-on-error", 1013, "Dump core on any error", { "abort-on-error", 1013, "Dump core on any error",
(uchar **)&g_opts.abort, (uchar **)&g_opts.abort, 0, &g_opts.abort, &g_opts.abort, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, { 0, 0, 0,
0, 0, 0, 0, 0, 0,
......
...@@ -2184,57 +2184,57 @@ my_long_options[] = ...@@ -2184,57 +2184,57 @@ my_long_options[] =
{ {
NDB_STD_OPTS("test_event_merge"), NDB_STD_OPTS("test_event_merge"),
{ "abort-on-error", 1001, "Do abort() on any error", { "abort-on-error", 1001, "Do abort() on any error",
(uchar **)&g_opts.abort_on_error, (uchar **)&g_opts.abort_on_error, 0, &g_opts.abort_on_error, &g_opts.abort_on_error, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "loglevel", 1002, "Logging level in this program 0-3 (default 0)", { "loglevel", 1002, "Logging level in this program 0-3 (default 0)",
(uchar **)&g_opts.loglevel, (uchar **)&g_opts.loglevel, 0, &g_opts.loglevel, &g_opts.loglevel, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "loop", 1003, "Number of test loops (default 5, 0=forever)", { "loop", 1003, "Number of test loops (default 5, 0=forever)",
(uchar **)&g_opts.loop, (uchar **)&g_opts.loop, 0, &g_opts.loop, &g_opts.loop, 0,
GET_INT, REQUIRED_ARG, 5, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 5, 0, 0, 0, 0, 0 },
{ "maxops", 1004, "Approx number of PK operations per table (default 1000)", { "maxops", 1004, "Approx number of PK operations per table (default 1000)",
(uchar **)&g_opts.maxops, (uchar **)&g_opts.maxops, 0, &g_opts.maxops, &g_opts.maxops, 0,
GET_UINT, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0 },
{ "maxpk", 1005, "Number of different PK values (default 10, max 1000)", { "maxpk", 1005, "Number of different PK values (default 10, max 1000)",
(uchar **)&g_opts.maxpk, (uchar **)&g_opts.maxpk, 0, &g_opts.maxpk, &g_opts.maxpk, 0,
GET_UINT, REQUIRED_ARG, 10, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 10, 0, 0, 0, 0, 0 },
{ "maxtab", 1006, "Number of tables (default 10, max 100)", { "maxtab", 1006, "Number of tables (default 10, max 100)",
(uchar **)&g_opts.maxtab, (uchar **)&g_opts.maxtab, 0, &g_opts.maxtab, &g_opts.maxtab, 0,
GET_INT, REQUIRED_ARG, 10, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 10, 0, 0, 0, 0, 0 },
{ "no-blobs", 1007, "Omit blob attributes (5.0: true)", { "no-blobs", 1007, "Omit blob attributes (5.0: true)",
(uchar **)&g_opts.no_blobs, (uchar **)&g_opts.no_blobs, 0, &g_opts.no_blobs, &g_opts.no_blobs, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-implicit-nulls", 1008, "Insert must include all attrs" { "no-implicit-nulls", 1008, "Insert must include all attrs"
" i.e. no implicit NULLs", " i.e. no implicit NULLs",
(uchar **)&g_opts.no_implicit_nulls, (uchar **)&g_opts.no_implicit_nulls, 0, &g_opts.no_implicit_nulls, &g_opts.no_implicit_nulls, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-missing-update", 1009, "Update must include all non-PK attrs", { "no-missing-update", 1009, "Update must include all non-PK attrs",
(uchar **)&g_opts.no_missing_update, (uchar **)&g_opts.no_missing_update, 0, &g_opts.no_missing_update, &g_opts.no_missing_update, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-multiops", 1010, "Allow only 1 operation per commit", { "no-multiops", 1010, "Allow only 1 operation per commit",
(uchar **)&g_opts.no_multiops, (uchar **)&g_opts.no_multiops, 0, &g_opts.no_multiops, &g_opts.no_multiops, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-nulls", 1011, "Create no NULL values", { "no-nulls", 1011, "Create no NULL values",
(uchar **)&g_opts.no_nulls, (uchar **)&g_opts.no_nulls, 0, &g_opts.no_nulls, &g_opts.no_nulls, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "one-blob", 1012, "Only one blob attribute (default 2)", { "one-blob", 1012, "Only one blob attribute (default 2)",
(uchar **)&g_opts.one_blob, (uchar **)&g_opts.one_blob, 0, &g_opts.one_blob, &g_opts.one_blob, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "opstring", 1013, "Operations to run e.g. idiucdc (c is commit) or" { "opstring", 1013, "Operations to run e.g. idiucdc (c is commit) or"
" iuuc:uudc (the : separates loops)", " iuuc:uudc (the : separates loops)",
(uchar **)&g_opts.opstring, (uchar **)&g_opts.opstring, 0, &g_opts.opstring, &g_opts.opstring, 0,
GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "seed", 1014, "Random seed (0=loop number, default -1=random)", { "seed", 1014, "Random seed (0=loop number, default -1=random)",
(uchar **)&g_opts.seed, (uchar **)&g_opts.seed, 0, &g_opts.seed, &g_opts.seed, 0,
GET_INT, REQUIRED_ARG, -1, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, -1, 0, 0, 0, 0, 0 },
{ "separate-events", 1015, "Do not combine events per GCI (5.0: true)", { "separate-events", 1015, "Do not combine events per GCI (5.0: true)",
(uchar **)&g_opts.separate_events, (uchar **)&g_opts.separate_events, 0, &g_opts.separate_events, &g_opts.separate_events, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "tweak", 1016, "Whatever the source says", { "tweak", 1016, "Whatever the source says",
(uchar **)&g_opts.tweak, (uchar **)&g_opts.tweak, 0, &g_opts.tweak, &g_opts.tweak, 0,
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "use-table", 1017, "Use existing tables", { "use-table", 1017, "Use existing tables",
(uchar **)&g_opts.use_table, (uchar **)&g_opts.use_table, 0, &g_opts.use_table, &g_opts.use_table, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, { 0, 0, 0,
0, 0, 0, 0, 0, 0,
......
...@@ -258,7 +258,7 @@ static struct my_option my_long_options[] = ...@@ -258,7 +258,7 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS(""), NDB_STD_OPTS(""),
{ "database", 'd', "Name of database table is in", { "database", 'd', "Name of database table is in",
(gptr*) &_dbname, (gptr*) &_dbname, 0, &_dbname, &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -77,60 +77,60 @@ my_bool opt_core; ...@@ -77,60 +77,60 @@ my_bool opt_core;
static struct my_option g_options[] = static struct my_option g_options[] =
{ {
{ "help", '?', "Display this help and exit.", { "help", '?', "Display this help and exit.",
(uchar **) &g_help, (uchar **) &g_help, &g_help, &g_help,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "version", 'V', "Output version information and exit.", 0, 0, 0, { "version", 'V', "Output version information and exit.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "clusters", 256, "Cluster", { "clusters", 256, "Cluster",
(uchar **) &g_clusters, (uchar **) &g_clusters, &g_clusters, &g_clusters,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "replicate", 1024, "replicate", { "replicate", 1024, "replicate",
(uchar **) &g_dummy, (uchar **) &g_dummy, &g_dummy, &g_dummy,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "log-file", 256, "log-file", { "log-file", 256, "log-file",
(uchar **) &g_log_filename, (uchar **) &g_log_filename, &g_log_filename, &g_log_filename,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "testcase-file", 'f', "testcase-file", { "testcase-file", 'f', "testcase-file",
(uchar **) &g_test_case_filename, (uchar **) &g_test_case_filename, &g_test_case_filename, &g_test_case_filename,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "report-file", 'r', "report-file", { "report-file", 'r', "report-file",
(uchar **) &g_report_filename, (uchar **) &g_report_filename, &g_report_filename, &g_report_filename,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "basedir", 256, "Base path", { "basedir", 256, "Base path",
(uchar **) &g_basedir, (uchar **) &g_basedir, &g_basedir, &g_basedir,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "baseport", 256, "Base port", { "baseport", 256, "Base port",
(uchar **) &g_baseport, (uchar **) &g_baseport, &g_baseport, &g_baseport,
0, GET_INT, REQUIRED_ARG, g_baseport, 0, 0, 0, 0, 0}, 0, GET_INT, REQUIRED_ARG, g_baseport, 0, 0, 0, 0, 0},
{ "prefix", 256, "mysql install dir", { "prefix", 256, "mysql install dir",
(uchar **) &g_prefix, (uchar **) &g_prefix, &g_prefix, &g_prefix,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "verbose", 'v', "Verbosity", { "verbose", 'v', "Verbosity",
(uchar **) &g_verbosity, (uchar **) &g_verbosity, &g_verbosity, &g_verbosity,
0, GET_INT, REQUIRED_ARG, g_verbosity, 0, 0, 0, 0, 0}, 0, GET_INT, REQUIRED_ARG, g_verbosity, 0, 0, 0, 0, 0},
{ "configure", 256, "configure", { "configure", 256, "configure",
(uchar **) &g_do_setup, (uchar **) &g_do_setup, &g_do_setup, &g_do_setup,
0, GET_INT, REQUIRED_ARG, g_do_setup, 0, 0, 0, 0, 0 }, 0, GET_INT, REQUIRED_ARG, g_do_setup, 0, 0, 0, 0, 0 },
{ "deploy", 256, "deploy", { "deploy", 256, "deploy",
(uchar **) &g_do_deploy, (uchar **) &g_do_deploy, &g_do_deploy, &g_do_deploy,
0, GET_INT, REQUIRED_ARG, g_do_deploy, 0, 0, 0, 0, 0 }, 0, GET_INT, REQUIRED_ARG, g_do_deploy, 0, 0, 0, 0, 0 },
{ "sshx", 256, "sshx", { "sshx", 256, "sshx",
(uchar **) &g_do_sshx, (uchar **) &g_do_sshx, &g_do_sshx, &g_do_sshx,
0, GET_INT, REQUIRED_ARG, g_do_sshx, 0, 0, 0, 0, 0 }, 0, GET_INT, REQUIRED_ARG, g_do_sshx, 0, 0, 0, 0, 0 },
{ "start", 256, "start", { "start", 256, "start",
(uchar **) &g_do_start, (uchar **) &g_do_start, &g_do_start, &g_do_start,
0, GET_INT, REQUIRED_ARG, g_do_start, 0, 0, 0, 0, 0 }, 0, GET_INT, REQUIRED_ARG, g_do_start, 0, 0, 0, 0, 0 },
{ "fqpn", 256, "Fully qualified path-names ", { "fqpn", 256, "Fully qualified path-names ",
(uchar **) &g_fqpn, (uchar **) &g_fqpn, &g_fqpn, &g_fqpn,
0, GET_INT, REQUIRED_ARG, g_fqpn, 0, 0, 0, 0, 0 }, 0, GET_INT, REQUIRED_ARG, g_fqpn, 0, 0, 0, 0, 0 },
{ "default-ports", 256, "Use default ports when possible", { "default-ports", 256, "Use default ports when possible",
(uchar **) &g_default_ports, (uchar **) &g_default_ports, &g_default_ports, &g_default_ports,
0, GET_INT, REQUIRED_ARG, g_default_ports, 0, 0, 0, 0, 0 }, 0, GET_INT, REQUIRED_ARG, g_default_ports, 0, 0, 0, 0, 0 },
{ "mode", 256, "Mode 0=interactive 1=regression 2=bench", { "mode", 256, "Mode 0=interactive 1=regression 2=bench",
(uchar **) &g_mode, (uchar **) &g_mode, &g_mode, &g_mode,
0, GET_INT, REQUIRED_ARG, g_mode, 0, 0, 0, 0, 0 }, 0, GET_INT, REQUIRED_ARG, g_mode, 0, 0, 0, 0, 0 },
{ "quit", 256, "Quit before starting tests", { "quit", 256, "Quit before starting tests",
(uchar **) &g_mode, (uchar **) &g_do_quit, &g_mode, &g_do_quit,
0, GET_BOOL, NO_ARG, g_do_quit, 0, 0, 0, 0, 0 }, 0, GET_BOOL, NO_ARG, g_do_quit, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, 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}
}; };
......
...@@ -1195,35 +1195,35 @@ static struct my_option my_long_options[] = ...@@ -1195,35 +1195,35 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS(""), NDB_STD_OPTS(""),
{ "print", OPT_PRINT, "Print execution tree", { "print", OPT_PRINT, "Print execution tree",
(uchar **) &opt_print, (uchar **) &opt_print, 0, &opt_print, &opt_print, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "print_html", OPT_PRINT_HTML, "Print execution tree in html table format", { "print_html", OPT_PRINT_HTML, "Print execution tree in html table format",
(uchar **) &opt_print_html, (uchar **) &opt_print_html, 0, &opt_print_html, &opt_print_html, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "print_cases", OPT_PRINT_CASES, "Print list of test cases", { "print_cases", OPT_PRINT_CASES, "Print list of test cases",
(uchar **) &opt_print_cases, (uchar **) &opt_print_cases, 0, &opt_print_cases, &opt_print_cases, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "records", 'r', "Number of records", { "records", 'r', "Number of records",
(uchar **) &opt_records, (uchar **) &opt_records, 0, &opt_records, &opt_records, 0,
GET_INT, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0 },
{ "loops", 'l', "Number of loops", { "loops", 'l', "Number of loops",
(uchar **) &opt_loops, (uchar **) &opt_loops, 0, &opt_loops, &opt_loops, 0,
GET_INT, REQUIRED_ARG, 5, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 5, 0, 0, 0, 0, 0 },
{ "seed", 1024, "Random seed", { "seed", 1024, "Random seed",
(uchar **) &opt_seed, (uchar **) &opt_seed, 0, &opt_seed, &opt_seed, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "testname", 'n', "Name of test to run", { "testname", 'n', "Name of test to run",
(uchar **) &opt_testname, (uchar **) &opt_testname, 0, &opt_testname, &opt_testname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "remote_mgm", 'm', { "remote_mgm", 'm',
"host:port to mgmsrv of remote cluster", "host:port to mgmsrv of remote cluster",
(uchar **) &opt_remote_mgm, (uchar **) &opt_remote_mgm, 0, &opt_remote_mgm, &opt_remote_mgm, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "timer", 't', "Print execution time", { "timer", 't', "Print execution time",
(uchar **) &opt_timer, (uchar **) &opt_timer, 0, &opt_timer, &opt_timer, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "verbose", 'v', "Print verbose status", { "verbose", 'v', "Print verbose status",
(uchar **) &opt_verbose, (uchar **) &opt_verbose, 0, &opt_verbose, &opt_verbose, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -31,14 +31,14 @@ static struct my_option my_long_options[] = ...@@ -31,14 +31,14 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_desc"), NDB_STD_OPTS("ndb_desc"),
{ "loop", 'l', "loops", { "loop", 'l', "loops",
(gptr*) &_loop, (gptr*) &_loop, 0, &_loop, &_loop, 0,
GET_INT, REQUIRED_ARG, _loop, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, _loop, 0, 0, 0, 0, 0 },
{ "sleep", 's', "Sleep (ms) between connection attempt", { "sleep", 's', "Sleep (ms) between connection attempt",
(gptr*) &_sleep, (gptr*) &_sleep, 0, &_sleep, &_sleep, 0,
GET_INT, REQUIRED_ARG, _sleep, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, _sleep, 0, 0, 0, 0, 0 },
{ "drop", 'd', { "drop", 'd',
"Drop event operations before disconnect (0 = no, 1 = yes, else rand", "Drop event operations before disconnect (0 = no, 1 = yes, else rand",
(gptr*) &_drop, (gptr*) &_drop, 0, &_drop, &_drop, 0,
GET_INT, REQUIRED_ARG, _drop, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, _drop, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, 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}
}; };
......
...@@ -36,16 +36,16 @@ static struct my_option my_long_options[] = ...@@ -36,16 +36,16 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_desc"), NDB_STD_OPTS("ndb_desc"),
{ "database", 'd', "Name of database table is in", { "database", 'd', "Name of database table is in",
(uchar**) &_dbname, (uchar**) &_dbname, 0, &_dbname, &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "transactional", 't', "Single transaction (may run out of operations)", { "transactional", 't', "Single transaction (may run out of operations)",
(uchar**) &_transactional, (uchar**) &_transactional, 0, &_transactional, &_transactional, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "tupscan", 999, "Run tupscan", { "tupscan", 999, "Run tupscan",
(uchar**) &_tupscan, (uchar**) &_tupscan, 0, &_tupscan, &_tupscan, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "diskscan", 999, "Run diskcan", { "diskscan", 999, "Run diskcan",
(uchar**) &_diskscan, (uchar**) &_diskscan, 0, &_diskscan, &_diskscan, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -39,16 +39,16 @@ static struct my_option my_long_options[] = ...@@ -39,16 +39,16 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_desc"), NDB_STD_OPTS("ndb_desc"),
{ "database", 'd', "Name of database table is in", { "database", 'd', "Name of database table is in",
(uchar**) &_dbname, (uchar**) &_dbname, 0, &_dbname, &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "unqualified", 'u', "Use unqualified table names", { "unqualified", 'u', "Use unqualified table names",
(uchar**) &_unqualified, (uchar**) &_unqualified, 0, &_unqualified, &_unqualified, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "extra-partition-info", 'p', "Print more info per partition", { "extra-partition-info", 'p', "Print more info per partition",
(uchar**) &_partinfo, (uchar**) &_partinfo, 0, &_partinfo, &_partinfo, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "retries", 'r', "Retry every second for # retries", { "retries", 'r', "Retry every second for # retries",
(uchar**) &_retries, (uchar**) &_retries, 0, &_retries, &_retries, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -30,7 +30,7 @@ static struct my_option my_long_options[] = ...@@ -30,7 +30,7 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_desc"), NDB_STD_OPTS("ndb_desc"),
{ "database", 'd', "Name of database table is in", { "database", 'd', "Name of database table is in",
(uchar**) &_dbname, (uchar**) &_dbname, 0, &_dbname, &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -30,7 +30,7 @@ static struct my_option my_long_options[] = ...@@ -30,7 +30,7 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_desc"), NDB_STD_OPTS("ndb_desc"),
{ "database", 'd', "Name of database table is in", { "database", 'd', "Name of database table is in",
(uchar**) &_dbname, (uchar**) &_dbname, 0, &_dbname, &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -256,22 +256,22 @@ static struct my_option my_long_options[] = ...@@ -256,22 +256,22 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_show_tables"), NDB_STD_OPTS("ndb_show_tables"),
{ "database", 'd', "Name of database table is in", { "database", 'd', "Name of database table is in",
(uchar**) &_dbname, (uchar**) &_dbname, 0, &_dbname, &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "loops", 'l', "loops", { "loops", 'l', "loops",
(uchar**) &_loops, (uchar**) &_loops, 0, &_loops, &_loops, 0,
GET_INT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0 },
{ "type", 't', "type", { "type", 't', "type",
(uchar**) &_type, (uchar**) &_type, 0, &_type, &_type, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "unqualified", 'u', "Use unqualified table names", { "unqualified", 'u', "Use unqualified table names",
(uchar**) &_unqualified, (uchar**) &_unqualified, 0, &_unqualified, &_unqualified, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "parsable", 'p', "Return output suitable for mysql LOAD DATA INFILE", { "parsable", 'p', "Return output suitable for mysql LOAD DATA INFILE",
(uchar**) &_parsable, (uchar**) &_parsable, 0, &_parsable, &_parsable, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "show-temp-status", OPT_SHOW_TMP_STATUS, "Show table temporary flag", { "show-temp-status", OPT_SHOW_TMP_STATUS, "Show table temporary flag",
(uchar**) &show_temp_status, (uchar**) &show_temp_status, 0, &show_temp_status, &show_temp_status, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -58,37 +58,37 @@ static struct my_option my_long_options[] = ...@@ -58,37 +58,37 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_config"), NDB_STD_OPTS("ndb_config"),
{ "nodes", 256, "Print nodes", { "nodes", 256, "Print nodes",
(uchar**) &g_nodes, (uchar**) &g_nodes, &g_nodes, &g_nodes,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ "connections", 256, "Print connections", { "connections", 256, "Print connections",
(uchar**) &g_connections, (uchar**) &g_connections, &g_connections, &g_connections,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ "query", 'q', "Query option(s)", { "query", 'q', "Query option(s)",
(uchar**) &g_query, (uchar**) &g_query, &g_query, &g_query,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "host", 256, "Host", { "host", 256, "Host",
(uchar**) &g_host, (uchar**) &g_host, &g_host, &g_host,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "type", 258, "Type of node/connection", { "type", 258, "Type of node/connection",
(uchar**) &g_type, (uchar**) &g_type, &g_type, &g_type,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "id", 258, "Nodeid", { "id", 258, "Nodeid",
(uchar**) &g_nodeid, (uchar**) &g_nodeid, &g_nodeid, &g_nodeid,
0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "nodeid", 258, "Nodeid", { "nodeid", 258, "Nodeid",
(uchar**) &g_nodeid, (uchar**) &g_nodeid, &g_nodeid, &g_nodeid,
0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "fields", 'f', "Field separator", { "fields", 'f', "Field separator",
(uchar**) &g_field_delimiter, (uchar**) &g_field_delimiter, &g_field_delimiter, &g_field_delimiter,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "rows", 'r', "Row separator", { "rows", 'r', "Row separator",
(uchar**) &g_row_delimiter, (uchar**) &g_row_delimiter, &g_row_delimiter, &g_row_delimiter,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "config-file", 256, "Path to config.ini", { "config-file", 256, "Path to config.ini",
(uchar**) &g_config_file, (uchar**) &g_config_file, &g_config_file, &g_config_file,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "mycnf", 256, "Read config from my.cnf", { "mycnf", 256, "Read config from my.cnf",
(uchar**) &g_mycnf, (uchar**) &g_mycnf, &g_mycnf, &g_mycnf,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -100,99 +100,99 @@ static struct my_option my_long_options[] = ...@@ -100,99 +100,99 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_restore"), NDB_STD_OPTS("ndb_restore"),
{ "connect", 'c', "same as --connect-string", { "connect", 'c', "same as --connect-string",
(uchar**) &opt_connect_str, (uchar**) &opt_connect_str, 0, &opt_connect_str, &opt_connect_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "nodeid", 'n', "Backup files from node with id", { "nodeid", 'n', "Backup files from node with id",
(uchar**) &ga_nodeId, (uchar**) &ga_nodeId, 0, &ga_nodeId, &ga_nodeId, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "backupid", 'b', "Backup id", { "backupid", 'b', "Backup id",
(uchar**) &ga_backupId, (uchar**) &ga_backupId, 0, &ga_backupId, &ga_backupId, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "restore_data", 'r', { "restore_data", 'r',
"Restore table data/logs into NDB Cluster using NDBAPI", "Restore table data/logs into NDB Cluster using NDBAPI",
(uchar**) &_restore_data, (uchar**) &_restore_data, 0, &_restore_data, &_restore_data, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "restore_meta", 'm', { "restore_meta", 'm',
"Restore meta data into NDB Cluster using NDBAPI", "Restore meta data into NDB Cluster using NDBAPI",
(uchar**) &_restore_meta, (uchar**) &_restore_meta, 0, &_restore_meta, &_restore_meta, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-upgrade", 'u', { "no-upgrade", 'u',
"Don't upgrade array type for var attributes, which don't resize VAR data and don't change column attributes", "Don't upgrade array type for var attributes, which don't resize VAR data and don't change column attributes",
(uchar**) &ga_no_upgrade, (uchar**) &ga_no_upgrade, 0, &ga_no_upgrade, &ga_no_upgrade, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-restore-disk-objects", 'd', { "no-restore-disk-objects", 'd',
"Dont restore disk objects (tablespace/logfilegroups etc)", "Dont restore disk objects (tablespace/logfilegroups etc)",
(uchar**) &_no_restore_disk, (uchar**) &_no_restore_disk, 0, &_no_restore_disk, &_no_restore_disk, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "restore_epoch", 'e', { "restore_epoch", 'e',
"Restore epoch info into the status table. Convenient on a MySQL Cluster " "Restore epoch info into the status table. Convenient on a MySQL Cluster "
"replication slave, for starting replication. The row in " "replication slave, for starting replication. The row in "
NDB_REP_DB "." NDB_APPLY_TABLE " with id 0 will be updated/inserted.", NDB_REP_DB "." NDB_APPLY_TABLE " with id 0 will be updated/inserted.",
(uchar**) &ga_restore_epoch, (uchar**) &ga_restore_epoch, 0, &ga_restore_epoch, &ga_restore_epoch, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "skip-table-check", 's', "Skip table structure check during restore of data", { "skip-table-check", 's', "Skip table structure check during restore of data",
(uchar**) &ga_skip_table_check, (uchar**) &ga_skip_table_check, 0, &ga_skip_table_check, &ga_skip_table_check, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "parallelism", 'p', { "parallelism", 'p',
"No of parallel transactions during restore of data." "No of parallel transactions during restore of data."
"(parallelism can be 1 to 1024)", "(parallelism can be 1 to 1024)",
(uchar**) &ga_nParallelism, (uchar**) &ga_nParallelism, 0, &ga_nParallelism, &ga_nParallelism, 0,
GET_INT, REQUIRED_ARG, 128, 1, 1024, 0, 1, 0 }, GET_INT, REQUIRED_ARG, 128, 1, 1024, 0, 1, 0 },
{ "print", OPT_PRINT, "Print metadata, data and log to stdout", { "print", OPT_PRINT, "Print metadata, data and log to stdout",
(uchar**) &_print, (uchar**) &_print, 0, &_print, &_print, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "print_data", OPT_PRINT_DATA, "Print data to stdout", { "print_data", OPT_PRINT_DATA, "Print data to stdout",
(uchar**) &_print_data, (uchar**) &_print_data, 0, &_print_data, &_print_data, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "print_meta", OPT_PRINT_META, "Print meta data to stdout", { "print_meta", OPT_PRINT_META, "Print meta data to stdout",
(uchar**) &_print_meta, (uchar**) &_print_meta, 0, &_print_meta, &_print_meta, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "print_log", OPT_PRINT_LOG, "Print log to stdout", { "print_log", OPT_PRINT_LOG, "Print log to stdout",
(uchar**) &_print_log, (uchar**) &_print_log, 0, &_print_log, &_print_log, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "backup_path", OPT_BACKUP_PATH, "Path to backup files", { "backup_path", OPT_BACKUP_PATH, "Path to backup files",
(uchar**) &ga_backupPath, (uchar**) &ga_backupPath, 0, &ga_backupPath, &ga_backupPath, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "dont_ignore_systab_0", 'f', { "dont_ignore_systab_0", 'f',
"Experimental. Do not ignore system table during restore.", "Experimental. Do not ignore system table during restore.",
(uchar**) &ga_dont_ignore_systab_0, (uchar**) &ga_dont_ignore_systab_0, 0, &ga_dont_ignore_systab_0, &ga_dont_ignore_systab_0, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "ndb-nodegroup-map", OPT_NDB_NODEGROUP_MAP, { "ndb-nodegroup-map", OPT_NDB_NODEGROUP_MAP,
"Nodegroup map for ndbcluster. Syntax: list of (source_ng, dest_ng)", "Nodegroup map for ndbcluster. Syntax: list of (source_ng, dest_ng)",
(uchar**) &opt_nodegroup_map_str, &opt_nodegroup_map_str,
(uchar**) &opt_nodegroup_map_str, &opt_nodegroup_map_str,
0, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "fields-enclosed-by", OPT_FIELDS_ENCLOSED_BY, { "fields-enclosed-by", OPT_FIELDS_ENCLOSED_BY,
"Fields are enclosed by ...", "Fields are enclosed by ...",
(uchar**) &opt_fields_enclosed_by, (uchar**) &opt_fields_enclosed_by, 0, &opt_fields_enclosed_by, &opt_fields_enclosed_by, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "fields-terminated-by", OPT_FIELDS_TERMINATED_BY, { "fields-terminated-by", OPT_FIELDS_TERMINATED_BY,
"Fields are terminated by ...", "Fields are terminated by ...",
(uchar**) &opt_fields_terminated_by, &opt_fields_terminated_by,
(uchar**) &opt_fields_terminated_by, 0, &opt_fields_terminated_by, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "fields-optionally-enclosed-by", OPT_FIELDS_OPTIONALLY_ENCLOSED_BY, { "fields-optionally-enclosed-by", OPT_FIELDS_OPTIONALLY_ENCLOSED_BY,
"Fields are optionally enclosed by ...", "Fields are optionally enclosed by ...",
(uchar**) &opt_fields_optionally_enclosed_by, &opt_fields_optionally_enclosed_by,
(uchar**) &opt_fields_optionally_enclosed_by, 0, &opt_fields_optionally_enclosed_by, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "hex", OPT_HEX_FORMAT, "print binary types in hex format", { "hex", OPT_HEX_FORMAT, "print binary types in hex format",
(uchar**) &opt_hex_format, (uchar**) &opt_hex_format, 0, &opt_hex_format, &opt_hex_format, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "tab", 'T', "Creates tab separated textfile for each table to " { "tab", 'T', "Creates tab separated textfile for each table to "
"given path. (creates .txt files)", "given path. (creates .txt files)",
(uchar**) &tab_path, (uchar**) &tab_path, 0, &tab_path, &tab_path, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "append", OPT_APPEND, "for --tab append data to file", { "append", OPT_APPEND, "for --tab append data to file",
(uchar**) &opt_append, (uchar**) &opt_append, 0, &opt_append, &opt_append, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "lines-terminated-by", OPT_LINES_TERMINATED_BY, "", { "lines-terminated-by", OPT_LINES_TERMINATED_BY, "",
(uchar**) &opt_lines_terminated_by, (uchar**) &opt_lines_terminated_by, 0, &opt_lines_terminated_by, &opt_lines_terminated_by, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "verbose", OPT_VERBOSE, { "verbose", OPT_VERBOSE,
"verbosity", "verbosity",
(uchar**) &opt_verbose, (uchar**) &opt_verbose, 0, &opt_verbose, &opt_verbose, 0,
GET_INT, REQUIRED_ARG, 1, 0, 255, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 1, 0, 255, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, 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}
}; };
......
...@@ -54,43 +54,43 @@ static struct my_option my_long_options[] = ...@@ -54,43 +54,43 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_desc"), NDB_STD_OPTS("ndb_desc"),
{ "database", 'd', "Name of database table is in", { "database", 'd', "Name of database table is in",
(uchar**) &_dbname, (uchar**) &_dbname, 0, &_dbname, &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "parallelism", 'p', "parallelism", { "parallelism", 'p', "parallelism",
(uchar**) &_parallelism, (uchar**) &_parallelism, 0, &_parallelism, &_parallelism, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "lock", 'l', "Read(0), Read-hold(1), Exclusive(2)", { "lock", 'l', "Read(0), Read-hold(1), Exclusive(2)",
(uchar**) &_lock, (uchar**) &_lock, 0, &_lock, &_lock, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "order", 'o', "Sort resultset according to index", { "order", 'o', "Sort resultset according to index",
(uchar**) &_order, (uchar**) &_order, 0, &_order, &_order, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "descending", 'z', "Sort descending (requires order flag)", { "descending", 'z', "Sort descending (requires order flag)",
(uchar**) &_descending, (uchar**) &_descending, 0, &_descending, &_descending, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "header", 'h', "Print header", { "header", 'h', "Print header",
(uchar**) &_header, (uchar**) &_header, 0, &_header, &_header, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 },
{ "useHexFormat", 'x', "Output numbers in hexadecimal format", { "useHexFormat", 'x', "Output numbers in hexadecimal format",
(uchar**) &_useHexFormat, (uchar**) &_useHexFormat, 0, &_useHexFormat, &_useHexFormat, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "delimiter", 'D', "Column delimiter", { "delimiter", 'D', "Column delimiter",
(uchar**) &_delimiter, (uchar**) &_delimiter, 0, &_delimiter, &_delimiter, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "disk", 256, "Dump disk ref", { "disk", 256, "Dump disk ref",
(uchar**) &_dumpDisk, (uchar**) &_dumpDisk, 0, &_dumpDisk, &_dumpDisk, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "rowid", 256, "Dump rowid", { "rowid", 256, "Dump rowid",
(uchar**) &use_rowid, (uchar**) &use_rowid, 0, &use_rowid, &use_rowid, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "gci", 256, "Dump gci", { "gci", 256, "Dump gci",
(uchar**) &use_gci, (uchar**) &use_gci, 0, &use_gci, &use_gci, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "tupscan", 't', "Scan in tup order", { "tupscan", 't', "Scan in tup order",
(uchar**) &_tup, (uchar**) &_tup, 0, &_tup, &_tup, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "nodata", 256, "Dont print data", { "nodata", 256, "Dont print data",
(uchar**) &nodata, (uchar**) &nodata, 0, &nodata, &nodata, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -43,13 +43,13 @@ static struct my_option my_long_options[] = ...@@ -43,13 +43,13 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_desc"), NDB_STD_OPTS("ndb_desc"),
{ "database", 'd', "Name of database table is in", { "database", 'd', "Name of database table is in",
(uchar**) &_dbname, (uchar**) &_dbname, 0, &_dbname, &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "parallelism", 'p', "parallelism", { "parallelism", 'p', "parallelism",
(uchar**) &_parallelism, (uchar**) &_parallelism, 0, &_parallelism, &_parallelism, 0,
GET_INT, REQUIRED_ARG, 240, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 240, 0, 0, 0, 0, 0 },
{ "lock", 'l', "Read(0), Read-hold(1), Exclusive(2)", { "lock", 'l', "Read(0), Read-hold(1), Exclusive(2)",
(uchar**) &_lock, (uchar**) &_lock, 0, &_lock, &_lock, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, GET_INT, 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} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -44,17 +44,17 @@ static struct my_option my_long_options[] = ...@@ -44,17 +44,17 @@ static struct my_option my_long_options[] =
{ {
NDB_STD_OPTS("ndb_desc"), NDB_STD_OPTS("ndb_desc"),
{ "no-contact", 'n', "Wait for cluster no contact", { "no-contact", 'n', "Wait for cluster no contact",
(uchar**) &_no_contact, (uchar**) &_no_contact, 0, &_no_contact, &_no_contact, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "not-started", OPT_WAIT_STATUS_NOT_STARTED, "Wait for cluster not started", { "not-started", OPT_WAIT_STATUS_NOT_STARTED, "Wait for cluster not started",
(uchar**) &_not_started, (uchar**) &_not_started, 0, &_not_started, &_not_started, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "single-user", OPT_WAIT_STATUS_SINGLE_USER, { "single-user", OPT_WAIT_STATUS_SINGLE_USER,
"Wait for cluster to enter single user mode", "Wait for cluster to enter single user mode",
(uchar**) &_single_user, (uchar**) &_single_user, 0, &_single_user, &_single_user, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "timeout", 't', "Timeout to wait in seconds", { "timeout", 't', "Timeout to wait in seconds",
(uchar**) &_timeout, (uchar**) &_timeout, 0, &_timeout, &_timeout, 0,
GET_INT, REQUIRED_ARG, 120, 0, 0, 0, 0, 0 }, GET_INT, REQUIRED_ARG, 120, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, 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}
}; };
......
...@@ -88,36 +88,36 @@ static struct my_option my_long_options[] = ...@@ -88,36 +88,36 @@ static struct my_option my_long_options[] =
{ {
{"help", '?', "Display this help and exit", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, {"help", '?', "Display this help and exit", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"database", 'D', "Database to use", (uchar**) &database, (uchar**) &database, {"database", 'D', "Database to use", &database, &database,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host", (uchar**) &host, (uchar**) &host, 0, GET_STR, {"host", 'h', "Connect to host", &host, &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', {"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.", "Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"user", 'u', "User for login if not current user", (uchar**) &user, {"user", 'u', "User for login if not current user", &user,
(uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit", {"version", 'V', "Output version information and exit",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"verbose", 'v', "Write some progress indicators", (uchar**) &verbose, {"verbose", 'v', "Write some progress indicators", &verbose,
(uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"query", 'Q', "Query to execute in each threads", (uchar**) &query, {"query", 'Q', "Query to execute in each threads", &query,
(uchar**) &query, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &query, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection or 0 for default to, in " {"port", 'P', "Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, " "order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0 #if MYSQL_PORT_DEFAULT == 0
"/etc/services, " "/etc/services, "
#endif #endif
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
(uchar**) &tcp_port, &tcp_port,
(uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0}, &tcp_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection", (uchar**) &unix_socket, {"socket", 'S', "Socket file to use for connection", &unix_socket,
(uchar**) &unix_socket, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &unix_socket, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"test-count", 'c', "Run test count times (default %d)", {"test-count", 'c', "Run test count times (default %d)",
(uchar**) &number_of_tests, (uchar**) &number_of_tests, 0, GET_UINT, &number_of_tests, &number_of_tests, 0, GET_UINT,
REQUIRED_ARG, 1000, 0, 0, 0, 0, 0}, REQUIRED_ARG, 1000, 0, 0, 0, 0, 0},
{"thread-count", 't', "Number of threads to start", {"thread-count", 't', "Number of threads to start",
(uchar**) &number_of_threads, (uchar**) &number_of_threads, 0, GET_UINT, &number_of_threads, &number_of_threads, 0, GET_UINT,
REQUIRED_ARG, 2, 0, 0, 0, 0, 0}, REQUIRED_ARG, 2, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, 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}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment