Commit 994a0de9 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: reorder mysql help output

parent 98b157fd
...@@ -283,11 +283,12 @@ typedef struct { ...@@ -283,11 +283,12 @@ typedef struct {
static COMMANDS commands[] = { static COMMANDS commands[] = {
{ "?", '?', com_help, 1, "Synonym for `help'." }, { "?", '?', com_help, 1, "Synonym for `help'." },
{ "charset", 'C', com_charset, 1,
"Switch to another charset. Might be needed for processing binlog with multi-byte charsets." },
{ "clear", 'c', com_clear, 0, "Clear the current input statement."}, { "clear", 'c', com_clear, 0, "Clear the current input statement."},
{ "connect",'r', com_connect,1, { "connect",'r', com_connect,1,
"Reconnect to the server. Optional arguments are db and host." }, "Reconnect to the server. Optional arguments are db and host." },
{ "delimiter", 'd', com_delimiter, 1, { "delimiter", 'd', com_delimiter, 1, "Set statement delimiter." },
"Set statement delimiter." },
#ifdef USE_POPEN #ifdef USE_POPEN
{ "edit", 'e', com_edit, 0, "Edit command with $EDITOR."}, { "edit", 'e', com_edit, 0, "Edit command with $EDITOR."},
#endif #endif
...@@ -300,6 +301,8 @@ static COMMANDS commands[] = { ...@@ -300,6 +301,8 @@ static COMMANDS commands[] = {
{ "nopager",'n', com_nopager,0, "Disable pager, print to stdout." }, { "nopager",'n', com_nopager,0, "Disable pager, print to stdout." },
#endif #endif
{ "notee", 't', com_notee, 0, "Don't write into outfile." }, { "notee", 't', com_notee, 0, "Don't write into outfile." },
{ "nowarning", 'w', com_nowarnings, 0,
"Don't show warnings after every statement." },
#ifdef USE_POPEN #ifdef USE_POPEN
{ "pager", 'P', com_pager, 1, { "pager", 'P', com_pager, 1,
"Set PAGER [to_pager]. Print the query results via PAGER." }, "Set PAGER [to_pager]. Print the query results via PAGER." },
...@@ -318,12 +321,8 @@ static COMMANDS commands[] = { ...@@ -318,12 +321,8 @@ static COMMANDS commands[] = {
"Set outfile [to_outfile]. Append everything into given outfile." }, "Set outfile [to_outfile]. Append everything into given outfile." },
{ "use", 'u', com_use, 1, { "use", 'u', com_use, 1,
"Use another database. Takes database name as argument." }, "Use another database. Takes database name as argument." },
{ "charset", 'C', com_charset, 1,
"Switch to another charset. Might be needed for processing binlog with multi-byte charsets." },
{ "warnings", 'W', com_warnings, 0, { "warnings", 'W', com_warnings, 0,
"Show warnings after every statement." }, "Show warnings after every statement." },
{ "nowarning", 'w', com_nowarnings, 0,
"Don't show warnings after every statement." },
/* Get bash-like expansion for some commands */ /* Get bash-like expansion for some commands */
{ "create table", 0, 0, 0, ""}, { "create table", 0, 0, 0, ""},
{ "create database", 0, 0, 0, ""}, { "create database", 0, 0, 0, ""},
...@@ -1506,10 +1505,8 @@ static struct my_option my_long_options[] = ...@@ -1506,10 +1505,8 @@ 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},
{"auto-rehash", 0, {"auto-rehash", 0,
"Enable automatic rehashing. One doesn't need to use 'rehash' to get table " "Enable automatic rehashing. One doesn't need to use 'rehash' to get table "
"and field completion, but startup and reconnecting may take a longer time. " "and field completion, but startup and reconnecting may take a longer time.",
"Disable with --disable-auto-rehash.", &opt_rehash, &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
&opt_rehash, &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
0, 0},
{"no-auto-rehash", 'A', {"no-auto-rehash", 'A',
"No automatic rehashing. One has to use 'rehash' to get table and field " "No automatic rehashing. One has to use 'rehash' to get table and field "
"completion. This gives a quicker start of mysql and disables rehashing " "completion. This gives a quicker start of mysql and disables rehashing "
...@@ -1517,17 +1514,31 @@ static struct my_option my_long_options[] = ...@@ -1517,17 +1514,31 @@ static struct my_option my_long_options[] =
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},
{"auto-vertical-output", 0, {"auto-vertical-output", 0,
"Automatically switch to vertical output mode if the result is wider " "Automatically switch to vertical output mode if the result is wider "
"than the terminal width.", "than the terminal width.", &auto_vertical_output, &auto_vertical_output,
&auto_vertical_output, &auto_vertical_output, 0, GET_BOOL, NO_ARG, 0, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
0, 0, 0, 0, 0},
{"batch", 'B', {"batch", 'B',
"Don't use history file. Disable interactive behavior. (Enables --silent.)", "Don't use history file. Disable interactive behavior. (Enables --silent.)",
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},
{"binary-as-hex", 0, "Print binary data as hex", &opt_binhex, &opt_binhex, {"binary-as-hex", 0, "Print binary data as hex", &opt_binhex, &opt_binhex,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"binary-mode", 0,
"Binary mode allows certain character sequences to be processed as data "
"that would otherwise be treated with a special meaning by the parser. "
"Specifically, this switch turns off parsing of all client commands except "
"\\C and DELIMITER in non-interactive mode (i.e., when binary mode is "
"combined with either 1) piped input, 2) the --batch mysql option, or 3) "
"the 'source' command). Also, in binary mode, occurrences of '\\r\\n' and "
"ASCII '\\0' are preserved within strings, whereas by default, '\\r\\n' is "
"translated to '\\n' and '\\0' is disallowed in user input.",
&opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir, "Directory for character set files.", &charsets_dir,
&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},
{"column-names", 0, "Write column names in results.",
&column_names, &column_names, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-column-names", 'N', "Don't write column names in results.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"column-type-info", 0, "Display column type information.", {"column-type-info", 0, "Display column type information.",
&column_types_flag, &column_types_flag, &column_types_flag, &column_types_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
...@@ -1538,6 +1549,16 @@ static struct my_option my_long_options[] = ...@@ -1538,6 +1549,16 @@ static struct my_option my_long_options[] =
{"compress", 'C', "Use compression in server/client protocol.", {"compress", 'C', "Use compression in server/client protocol.",
&opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, &opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"connect-expired-password", 0,
"Notify the server that this client is prepared to handle expired "
"password sandbox mode even if --batch was specified.",
&opt_connect_expired_password, &opt_connect_expired_password, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"connect_timeout", 0, "Number of seconds before connection timeout.",
&opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG,
0, 0, 3600*12, 0, 0, 0},
{"database", 'D', "Database to use.", &current_db,
&current_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef DBUG_OFF #ifdef DBUG_OFF
{"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},
...@@ -1550,65 +1571,59 @@ static struct my_option my_long_options[] = ...@@ -1550,65 +1571,59 @@ 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},
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag, {"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"database", 'D', "Database to use.", &current_db, {"default-auth", 0, "Default authentication client-side plugin to use.",
&current_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", 0, {"default-character-set", 0,
"Set the default character set.", &default_charset, "Set the default character set.", &default_charset,
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", &delimiter_str, {"delimiter", OPT_DELIMITER, "Delimiter to be used.", &delimiter_str,
&delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"enable-cleartext-plugin", OPT_COMPATIBILTY_CLEARTEXT_PLUGIN,
"Obsolete option. Exists only for MySQL compatibility.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0, {"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"enable-cleartext-plugin", OPT_COMPATIBILTY_CLEARTEXT_PLUGIN, "Obsolete option. Exists only for MySQL compatibility.", {"force", 'f',
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, "Continue even if we get an SQL error. Sets abort-source-on-error to 0",
{"vertical", 'E', "Print the output of a query (rows) vertically.", &ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
&vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, {"host", 'h', "Connect to host.", &current_host,
0}, &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"force", 'f', "Continue even if we get an SQL error. Sets abort-source-on-error to 0", {"html", 'H', "Produce HTML output.", &opt_html, &opt_html,
&ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
0, 0, 0, 0}, {"ignore-spaces", 'i', "Ignore space after function names.",
&ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"init-command", 0,
"SQL Command to execute when connecting to MariaDB server. Will "
"automatically be re-executed when reconnecting.", &opt_init_command,
&opt_init_command, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"line-numbers", 0, "Write line numbers for errors.",
&line_numbers, &line_numbers, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"local-infile", OPT_LOCAL_INFILE, "Enable LOAD DATA LOCAL INFILE.",
&opt_local_infile, &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"max-allowed-packet", 0,
"The maximum packet length to send to or receive from server.",
&opt_max_allowed_packet, &opt_max_allowed_packet, 0, GET_ULONG,
REQUIRED_ARG, 16*1024LL*1024LL, 4096, 2*1024LL*1024LL*1024LL, 0, 1024, 0},
{"max-join-size", 0,
"Automatic limit for rows in a join when using --safe-updates.",
&max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L,
1, ULONG_MAX, 0, 1, 0},
{"named-commands", 'G', {"named-commands", 'G',
"Enable named commands. Named commands mean this program's internal " "Enable named commands. Named commands mean this program's internal "
"commands; see mysql> help . When enabled, the named commands can be " "commands; see mysql> help . When enabled, the named commands can be "
"used from any line of the query, otherwise only from the first line, " "used from any line of the query, otherwise only from the first line, "
"before an enter. Disable with --disable-named-commands. This option " "before an enter. Disable with --disable-named-commands. This option "
"is disabled by default.", "is disabled by default.",
&named_cmds, &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, &named_cmds, &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
0, 0}, {"net-buffer-length", 0,
{"ignore-spaces", 'i', "Ignore space after function names.", "The buffer size for TCP/IP and socket communication.",
&ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0, &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG,
0, 0, 0, 0}, REQUIRED_ARG, 16384, 1024, 512*1024ULL*1024ULL, MALLOC_OVERHEAD, 1024, 0},
{"init-command", 0,
"SQL Command to execute when connecting to MariaDB server. Will "
"automatically be re-executed when reconnecting.",
&opt_init_command, &opt_init_command, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
&opt_local_infile, &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep, {"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", &current_host,
&current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"html", 'H', "Produce HTML output.", &opt_html, &opt_html,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"line-numbers", 0, "Write line numbers for errors.",
&line_numbers, &line_numbers, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"unbuffered", 'n', "Flush buffer after each query.", &unbuffered,
&unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"column-names", 0, "Write column names in results.",
&column_names, &column_names, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-column-names", 'N',
"Don't write column names in results.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"sigint-ignore", 0, "Ignore SIGINT (CTRL-C).",
&opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"one-database", 'o', {"one-database", 'o',
"Ignore statements except those that occur while the default " "Ignore statements except those that occur while the default "
"database is the one named at the command line.", "database is the one named at the command line.",
...@@ -1629,14 +1644,15 @@ static struct my_option my_long_options[] = ...@@ -1629,14 +1644,15 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"plugin-dir", 0, "Directory for client-side plugins.", &opt_plugin_dir,
&opt_plugin_dir, 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) ").", &opt_mysql_port,
&opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"progress-reports", 0, {"progress-reports", 0,
"Get progress reports for long running commands (like ALTER TABLE)", "Get progress reports for long running commands (like ALTER TABLE)",
&opt_progress_reports, &opt_progress_reports, 0, GET_BOOL, NO_ARG, 1, 0, &opt_progress_reports, &opt_progress_reports, 0, GET_BOOL, NO_ARG, 1, 0,
...@@ -1652,11 +1668,25 @@ static struct my_option my_long_options[] = ...@@ -1652,11 +1668,25 @@ static struct my_option my_long_options[] =
"if the output is suspended. Doesn't use history file.", "if the output is suspended. Doesn't use history file.",
&quick, &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, &quick, &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"raw", 'r', "Write fields without conversion. Used with --batch.", {"raw", 'r', "Write fields without conversion. Used with --batch.",
&opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, &opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
0, 0, 0}, {"reconnect", 0, "Reconnect if the connection is lost.",
{"reconnect", 0, "Reconnect if the connection is lost. Disable "
"with --disable-reconnect. This option is enabled by default.",
&opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, &opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
&safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
&safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"secure-auth", 0, "Refuse client connecting to server if it"
" uses old (pre-4.1.1) protocol.", &opt_secure_auth,
&opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"select-limit", 0,
"Automatic limit for SELECT when using --safe-updates.", &select_limit,
&select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX, 0, 1, 0},
{"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"show-warnings", 0, "Show warnings after every statement.",
&show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"sigint-ignore", 0, "Ignore SIGINT (CTRL-C).", &opt_sigint_ignore,
&opt_sigint_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"silent", 's', "Be more silent. Print results with a tab as separator, " {"silent", 's', "Be more silent. Print results with a tab as separator, "
"each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, "each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "The socket file to use for connection.", {"socket", 'S', "The socket file to use for connection.",
...@@ -1670,72 +1700,22 @@ static struct my_option my_long_options[] = ...@@ -1670,72 +1700,22 @@ static struct my_option my_long_options[] =
"Does not work in batch mode. Disable with --disable-tee. " "Does not work in batch mode. Disable with --disable-tee. "
"This option is disabled by default.", "This option is disabled by default.",
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},
{"unbuffered", 'n', "Flush buffer after each query.", &unbuffered,
&unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", &current_user, {"user", 'u', "User for login if not current user.", &current_user,
&current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
&safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0},
{"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
&safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0},
{"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0, {"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, GET_NO_ARG, 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},
{"vertical", 'E', "Print the output of a query (rows) vertically.",
&vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_NO_ARG, {"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"connect_timeout", 0, "Number of seconds before connection timeout.", {"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 0,
&opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
0, 0, 3600*12, 0, 0, 0},
{"max_allowed_packet", 0,
"The maximum packet length to send to or receive from server.",
&opt_max_allowed_packet, &opt_max_allowed_packet, 0,
GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096,
(longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
{"net_buffer_length", 0,
"The buffer size for TCP/IP and socket communication.",
&opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG,
REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
{"select_limit", 0,
"Automatic limit for SELECT when using --safe-updates.",
&select_limit, &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L,
1, ULONG_MAX, 0, 1, 0},
{"max_join_size", 0,
"Automatic limit for rows in a join when using --safe-updates.",
&max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L,
1, ULONG_MAX, 0, 1, 0},
{"secure-auth", 0, "Refuse client connecting to server if it"
" uses old (pre-4.1.1) protocol.", &opt_secure_auth,
&opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"show-warnings", 0, "Show warnings after every statement.",
&show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
{"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default_auth", 0,
"Default authentication client-side plugin to use.",
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"binary-mode", 0,
"Binary mode allows certain character sequences to be processed as data "
"that would otherwise be treated with a special meaning by the parser. "
"Specifically, this switch turns off parsing of all client commands except "
"\\C and DELIMITER in non-interactive mode (i.e., when binary mode is "
"combined with either 1) piped input, 2) the --batch mysql option, or 3) "
"the 'source' command). Also, in binary mode, occurrences of '\\r\\n' and "
"ASCII '\\0' are preserved within strings, whereas by default, '\\r\\n' is "
"translated to '\\n' and '\\0' is disallowed in user input.",
&opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"connect-expired-password", 0,
"Notify the server that this client is prepared to handle expired "
"password sandbox mode even if --batch was specified.",
&opt_connect_expired_password, &opt_connect_expired_password, 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}
}; };
......
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