mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
This commit is contained in:
commit
847ea21e82
341 changed files with 5924 additions and 11217 deletions
176
client/mysql.cc
176
client/mysql.cc
|
@ -1370,102 +1370,117 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"auto-rehash", OPT_AUTO_REHASH,
|
||||
"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. Disable with --disable-auto-rehash.",
|
||||
(uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
|
||||
"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. "
|
||||
"Disable with --disable-auto-rehash.",
|
||||
&opt_rehash, &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
|
||||
0, 0},
|
||||
{"no-auto-rehash", 'A',
|
||||
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect.",
|
||||
"No automatic rehashing. One has to use 'rehash' to get table and field "
|
||||
"completion. This gives a quicker start of mysql and disables rehashing "
|
||||
"on reconnect.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-vertical-output", OPT_AUTO_VERTICAL_OUTPUT,
|
||||
"Automatically switch to vertical output mode if the result is wider than the terminal width.",
|
||||
(uchar**) &auto_vertical_output, (uchar**) &auto_vertical_output, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Automatically switch to vertical output mode if the result is wider "
|
||||
"than the terminal width.",
|
||||
&auto_vertical_output, &auto_vertical_output, 0, GET_BOOL, NO_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"batch", 'B',
|
||||
"Don't use history file. Disable interactive behavior. (Enables --silent.)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Don't use history file. Disable interactive behavior. (Enables --silent.)",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
|
||||
(uchar**) &column_types_flag, (uchar**) &column_types_flag,
|
||||
&column_types_flag, &column_types_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"comments", 'c', "Preserve comments. Send comments to the server."
|
||||
" The default is --skip-comments (discard comments), enable with --comments.",
|
||||
(uchar**) &preserve_comments, (uchar**) &preserve_comments,
|
||||
&preserve_comments, &preserve_comments,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &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},
|
||||
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log.", &default_dbug_option,
|
||||
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
|
||||
(uchar**) &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"database", 'D', "Database to use.", (uchar**) ¤t_db,
|
||||
(uchar**) ¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"database", 'D', "Database to use.", ¤t_db,
|
||||
¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", (uchar**) &delimiter_str,
|
||||
(uchar**) &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", &default_charset,
|
||||
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", &delimiter_str,
|
||||
&delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 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},
|
||||
{"vertical", 'E', "Print the output of a query (rows) vertically.",
|
||||
(uchar**) &vertical, (uchar**) &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
&vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"force", 'f', "Continue even if we get an SQL error.",
|
||||
(uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
&ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"named-commands", 'G',
|
||||
"Enable named commands. Named commands mean this program's internal commands; see mysql> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter. Disable with --disable-named-commands. This option is disabled by default.",
|
||||
(uchar**) &named_cmds, (uchar**) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
"Enable named commands. Named commands mean this program's internal "
|
||||
"commands; see mysql> help . When enabled, the named commands can be "
|
||||
"used from any line of the query, otherwise only from the first line, "
|
||||
"before an enter. Disable with --disable-named-commands. This option "
|
||||
"is disabled by default.",
|
||||
&named_cmds, &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"ignore-spaces", 'i', "Ignore space after function names.",
|
||||
(uchar**) &ignore_spaces, (uchar**) &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
&ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"init-command", OPT_INIT_COMMAND,
|
||||
"SQL Command to execute when connecting to MySQL server. Will automatically be re-executed when reconnecting.",
|
||||
(uchar**) &opt_init_command, (uchar**) &opt_init_command, 0,
|
||||
"SQL Command to execute when connecting to MySQL 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.",
|
||||
(uchar**) &opt_local_infile,
|
||||
(uchar**) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-beep", 'b', "Turn off beep on error.", (uchar**) &opt_nobeep,
|
||||
(uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (uchar**) ¤t_host,
|
||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"html", 'H', "Produce HTML output.", (uchar**) &opt_html, (uchar**) &opt_html,
|
||||
&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,
|
||||
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", ¤t_host,
|
||||
¤t_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.", (uchar**) &opt_xml, (uchar**) &opt_xml, 0,
|
||||
{"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
|
||||
(uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
&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.", (uchar**) &unbuffered,
|
||||
(uchar**) &unbuffered, 0, GET_BOOL, 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", OPT_COLUMN_NAMES, "Write column names in results.",
|
||||
(uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL,
|
||||
&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", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C).",
|
||||
(uchar**) &opt_sigint_ignore, (uchar**) &opt_sigint_ignore, 0, GET_BOOL,
|
||||
&opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"one-database", 'o',
|
||||
"Only update the default database. This is useful for skipping updates to other database in the update log.",
|
||||
"Only update the default database. This is useful for skipping updates "
|
||||
"to other database in the update log.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef USE_POPEN
|
||||
{"pager", OPT_PAGER,
|
||||
"Pager to use to display results. If you don't supply an option, the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default.",
|
||||
"Pager to use to display results. If you don't supply an option, the "
|
||||
"default pager is taken from your ENV variable PAGER. Valid pagers are "
|
||||
"less, more, cat [> filename], etc. See interactive help (\\h) also. "
|
||||
"This option does not work in batch mode. Disable with --disable-pager. "
|
||||
"This option is disabled by default.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"password", 'p',
|
||||
|
@ -1481,46 +1496,50 @@ static struct my_option my_long_options[] =
|
|||
"/etc/services, "
|
||||
#endif
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&opt_mysql_port,
|
||||
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
|
||||
(uchar**) ¤t_prompt, (uchar**) ¤t_prompt, 0, GET_STR_ALLOC,
|
||||
¤t_prompt, ¤t_prompt, 0, GET_STR_ALLOC,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quick", 'q',
|
||||
"Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file.",
|
||||
(uchar**) &quick, (uchar**) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Don't cache result, print it row by row. This may slow down the server "
|
||||
"if the output is suspended. Doesn't use history file.",
|
||||
&quick, &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"raw", 'r', "Write fields without conversion. Used with --batch.",
|
||||
(uchar**) &opt_raw_data, (uchar**) &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},
|
||||
{"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default.",
|
||||
(uchar**) &opt_reconnect, (uchar**) &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"reconnect", OPT_RECONNECT, "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},
|
||||
{"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},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Base name of shared memory.", &shared_memory_base_name,
|
||||
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR_ALLOC,
|
||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR_ALLOC,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include "sslopt-longopts.h"
|
||||
{"table", 't', "Output in table format.", (uchar**) &output_tables,
|
||||
(uchar**) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"table", 't', "Output in table format.", &output_tables,
|
||||
&output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"tee", OPT_TEE,
|
||||
"Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.",
|
||||
"Append everything into outfile. See interactive help (\\h) also. "
|
||||
"Does not work in batch mode. Disable with --disable-tee. "
|
||||
"This option is disabled by default.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
||||
(uchar**) ¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", ¤t_user,
|
||||
¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
|
||||
(uchar**) &safe_updates, (uchar**) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
&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.",
|
||||
(uchar**) &safe_updates, (uchar**) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
&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,
|
||||
0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -1530,35 +1549,32 @@ static struct my_option my_long_options[] =
|
|||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"connect_timeout", OPT_CONNECT_TIMEOUT,
|
||||
"Number of seconds before connection timeout.",
|
||||
(uchar**) &opt_connect_timeout,
|
||||
(uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0,
|
||||
0, 0},
|
||||
&opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||
0, 0, 3600*12, 0, 0, 0},
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
||||
"The maximum packet length to send to or receive from server.",
|
||||
(uchar**) &opt_max_allowed_packet, (uchar**) &opt_max_allowed_packet, 0,
|
||||
&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", OPT_NET_BUFFER_LENGTH,
|
||||
"The buffer size for TCP/IP and socket communication.",
|
||||
(uchar**) &opt_net_buffer_length, (uchar**) &opt_net_buffer_length, 0, GET_ULONG,
|
||||
&opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||
{"select_limit", OPT_SELECT_LIMIT,
|
||||
"Automatic limit for SELECT when using --safe-updates.",
|
||||
(uchar**) &select_limit,
|
||||
(uchar**) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX,
|
||||
0, 1, 0},
|
||||
&select_limit, &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L,
|
||||
1, ULONG_MAX, 0, 1, 0},
|
||||
{"max_join_size", OPT_MAX_JOIN_SIZE,
|
||||
"Automatic limit for rows in a join when using --safe-updates.",
|
||||
(uchar**) &max_join_size,
|
||||
(uchar**) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ULONG_MAX,
|
||||
0, 1, 0},
|
||||
&max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L,
|
||||
1, ULONG_MAX, 0, 1, 0},
|
||||
{"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
|
||||
" uses old (pre-4.1.1) protocol.", (uchar**) &opt_secure_auth,
|
||||
(uchar**) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
" 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", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
|
||||
(uchar**) &show_warnings, (uchar**) &show_warnings, 0, GET_BOOL, NO_ARG,
|
||||
&show_warnings, &show_warnings, 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}
|
||||
};
|
||||
|
|
|
@ -69,7 +69,7 @@ static struct my_option my_long_options[]=
|
|||
"Directory for character set files.", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
|
||||
(uchar**)¬_used, (uchar**)¬_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
¬_used, ¬_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"datadir", 'd',
|
||||
"Not used by mysql_upgrade. Only for backward compatibility.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -77,26 +77,26 @@ static struct my_option my_long_options[]=
|
|||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log.", (uchar* *) & default_dbug_option,
|
||||
(uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log.", &default_dbug_option,
|
||||
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
|
||||
(uchar**) &debug_info_flag, 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_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
|
||||
"has already been executed for the current version of MySQL.",
|
||||
(uchar**)&opt_force, (uchar**)&opt_force, 0,
|
||||
&opt_force, &opt_force, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host",'h', "Connect to host.", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"Password to use when connecting to server. If password is not given,"
|
||||
" it's solicited on the tty.", (uchar**) &opt_password,(uchar**) &opt_password,
|
||||
" it's solicited on the tty.", &opt_password,&opt_password,
|
||||
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef __WIN__
|
||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0,
|
||||
|
@ -124,17 +124,17 @@ static struct my_option my_long_options[]=
|
|||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"upgrade-system-tables", 's', "Only upgrade the system tables "
|
||||
"do not try to upgrade the data.",
|
||||
(uchar**)&opt_systables_only, (uchar**)&opt_systables_only, 0,
|
||||
&opt_systables_only, &opt_systables_only, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &opt_user,
|
||||
(uchar**) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", &opt_user,
|
||||
&opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Display more output about the process.",
|
||||
(uchar**) &opt_verbose, (uchar**) &opt_verbose, 0,
|
||||
&opt_verbose, &opt_verbose, 0,
|
||||
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"write-binlog", OPT_WRITE_BINLOG,
|
||||
"All commands including mysqlcheck are binlogged. Enabled by default;"
|
||||
"use --skip-write-binlog when commands should not be sent to replication slaves.",
|
||||
(uchar**) &opt_write_binlog, (uchar**) &opt_write_binlog, 0, GET_BOOL, NO_ARG,
|
||||
&opt_write_binlog, &opt_write_binlog, 0, GET_BOOL, NO_ARG,
|
||||
1, 0, 0, 0, 0, 0},
|
||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
|
|
@ -122,37 +122,38 @@ static struct my_option my_long_options[] =
|
|||
#endif
|
||||
{"count", 'c',
|
||||
"Number of iterations to make. This works with -i (--sleep) only.",
|
||||
(uchar**) &nr_iterations, (uchar**) &nr_iterations, 0, GET_UINT,
|
||||
&nr_iterations, &nr_iterations, 0, GET_UINT,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifndef DBUG_OFF
|
||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
|
||||
&debug_info_flag, &debug_info_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"force", 'f',
|
||||
"Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs.",
|
||||
(uchar**) &option_force, (uchar**) &option_force, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
"Don't ask for confirmation on drop database; with multiple commands, "
|
||||
"continue even if an error occurs.",
|
||||
&option_force, &option_force, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &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},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", &default_charset,
|
||||
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_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},
|
||||
{"no-beep", 'b', "Turn off beep on error.", (uchar**) &opt_nobeep,
|
||||
(uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
|
||||
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"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},
|
||||
|
@ -166,47 +167,47 @@ static struct my_option my_long_options[] =
|
|||
"/etc/services, "
|
||||
#endif
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &tcp_port,
|
||||
(uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&tcp_port, &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"relative", 'r',
|
||||
"Show difference between current and previous values when used with -i. Currently only works with extended-status.",
|
||||
(uchar**) &opt_relative, (uchar**) &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
"Show difference between current and previous values when used with -i. "
|
||||
"Currently only works with extended-status.",
|
||||
&opt_relative, &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
|
||||
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"silent", 's', "Silently exit if one can't connect to server.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &unix_port, (uchar**) &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
&unix_port, &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"sleep", 'i', "Execute commands repeatedly with a sleep between.",
|
||||
(uchar**) &interval, (uchar**) &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
&interval, &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
||||
(uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", &user,
|
||||
&user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v', "Write more information.", (uchar**) &opt_verbose,
|
||||
(uchar**) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Write more information.", &opt_verbose,
|
||||
&opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"vertical", 'E',
|
||||
"Print output vertically. Is similar to --relative, but prints output vertically.",
|
||||
(uchar**) &opt_vertical, (uchar**) &opt_vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
&opt_vertical, &opt_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_UINT,
|
||||
OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", (uchar**) &opt_connect_timeout,
|
||||
(uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
|
||||
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", &opt_connect_timeout,
|
||||
&opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
|
||||
3600*12, 0, 1, 0},
|
||||
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (uchar**) &opt_shutdown_timeout,
|
||||
(uchar**) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout,
|
||||
&opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
|
||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
|
|
@ -1016,9 +1016,8 @@ static struct my_option my_long_options[] =
|
|||
"events); 'always' prints base64 whenever possible. 'always' is for "
|
||||
"debugging only and should not be used in a production system. If this "
|
||||
"argument is not given, the default is 'auto'; if it is given with no "
|
||||
"argument, 'always' is used."
|
||||
,(uchar**) &opt_base64_output_mode_str,
|
||||
(uchar**) &opt_base64_output_mode_str,
|
||||
"argument, 'always' is used.",
|
||||
&opt_base64_output_mode_str, &opt_base64_output_mode_str,
|
||||
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
/*
|
||||
mysqlbinlog needs charsets knowledge, to be able to convert a charset
|
||||
|
@ -1027,43 +1026,43 @@ static struct my_option my_long_options[] =
|
|||
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
|
||||
*/
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"database", 'd', "List entries for just this database (local log only).",
|
||||
(uchar**) &database, (uchar**) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||
&database, &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifndef DBUG_OFF
|
||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log.", &default_dbug_option,
|
||||
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
|
||||
&debug_info_flag, &debug_info_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
|
||||
"enabled --to-last-log and are sending the output to the same MySQL server. "
|
||||
"This way you could avoid an endless loop. You would also like to use it "
|
||||
"when restoring after a crash to avoid duplication of the statements you "
|
||||
"already have. NOTE: you will need a SUPER privilege to use this option.",
|
||||
(uchar**) &disable_log_bin, (uchar**) &disable_log_bin, 0, GET_BOOL,
|
||||
&disable_log_bin, &disable_log_bin, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"force-if-open", 'F', "Force if binlog was not closed properly.",
|
||||
(uchar**) &force_if_open_opt, (uchar**) &force_if_open_opt, 0, GET_BOOL, NO_ARG,
|
||||
&force_if_open_opt, &force_if_open_opt, 0, GET_BOOL, NO_ARG,
|
||||
1, 0, 0, 0, 0, 0},
|
||||
{"force-read", 'f', "Force reading unknown binlog events.",
|
||||
(uchar**) &force_opt, (uchar**) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&force_opt, &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"hexdump", 'H', "Augment output with hexadecimal and ASCII event dump.",
|
||||
(uchar**) &opt_hexdump, (uchar**) &opt_hexdump, 0, GET_BOOL, NO_ARG,
|
||||
&opt_hexdump, &opt_hexdump, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Get the binlog from server.", (uchar**) &host, (uchar**) &host,
|
||||
{"host", 'h', "Get the binlog from server.", &host, &host,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"local-load", 'l', "Prepare local temporary files for LOAD DATA INFILE in the specified directory.",
|
||||
(uchar**) &dirname_for_local_load, (uchar**) &dirname_for_local_load, 0,
|
||||
&dirname_for_local_load, &dirname_for_local_load, 0,
|
||||
GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"offset", 'o', "Skip the first N entries.", (uchar**) &offset, (uchar**) &offset,
|
||||
{"offset", 'o', "Skip the first N entries.", &offset, &offset,
|
||||
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p', "Password to connect to remote server.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -1073,37 +1072,37 @@ static struct my_option my_long_options[] =
|
|||
"/etc/services, "
|
||||
#endif
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG,
|
||||
&port, &port, 0, GET_INT, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"read-from-remote-server", 'R', "Read binary logs from a MySQL server.",
|
||||
(uchar**) &remote_opt, (uchar**) &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&remote_opt, &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"server-id", OPT_SERVER_ID,
|
||||
"Extract only binlog entries created by the server having the given id.",
|
||||
(uchar**) &server_id, (uchar**) &server_id, 0, GET_ULONG,
|
||||
&server_id, &server_id, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"set-charset", OPT_SET_CHARSET,
|
||||
"Add 'SET NAMES character_set' to the output.", (uchar**) &charset,
|
||||
(uchar**) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Add 'SET NAMES character_set' to the output.", &charset,
|
||||
&charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name,
|
||||
(uchar**) &shared_memory_base_name,
|
||||
"Base name of shared memory.", &shared_memory_base_name,
|
||||
&shared_memory_base_name,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"short-form", 's', "Just show regular queries: no extra info and no "
|
||||
"row-based events. This is for testing only, and should not be used in "
|
||||
"production systems. If you want to suppress base64-output, consider "
|
||||
"using --base64-output=never instead.",
|
||||
(uchar**) &short_form, (uchar**) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&short_form, &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &sock, (uchar**) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
&sock, &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"start-datetime", OPT_START_DATETIME,
|
||||
"Start reading the binlog at first event having a datetime equal or "
|
||||
|
@ -1111,12 +1110,12 @@ static struct my_option my_long_options[] =
|
|||
"in the local time zone, in any format accepted by the MySQL server "
|
||||
"for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
|
||||
"(you should probably use quotes for your shell to set it properly).",
|
||||
(uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
|
||||
&start_datetime_str, &start_datetime_str,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"start-position", 'j',
|
||||
"Start reading the binlog at position N. Applies to the first binlog "
|
||||
"passed on the command line.",
|
||||
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
|
||||
&start_position, &start_position, 0, GET_ULL,
|
||||
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
|
||||
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
||||
(ulonglong)(~(uint32)0), 0, 0, 0},
|
||||
|
@ -1126,22 +1125,22 @@ static struct my_option my_long_options[] =
|
|||
"in the local time zone, in any format accepted by the MySQL server "
|
||||
"for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
|
||||
"(you should probably use quotes for your shell to set it properly).",
|
||||
(uchar**) &stop_datetime_str, (uchar**) &stop_datetime_str,
|
||||
&stop_datetime_str, &stop_datetime_str,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"stop-position", OPT_STOP_POSITION,
|
||||
"Stop reading the binlog at position N. Applies to the last binlog "
|
||||
"passed on the command line.",
|
||||
(uchar**) &stop_position, (uchar**) &stop_position, 0, GET_ULL,
|
||||
&stop_position, &stop_position, 0, GET_ULL,
|
||||
REQUIRED_ARG, (ulonglong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE,
|
||||
(ulonglong)(~(my_off_t)0), 0, 0, 0},
|
||||
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \
|
||||
requested binlog but rather continue printing until the end of the last \
|
||||
binlog of the MySQL server. If you send the output to the same MySQL server, \
|
||||
that may lead to an endless loop.",
|
||||
(uchar**) &to_last_remote_log, (uchar**) &to_last_remote_log, 0, GET_BOOL,
|
||||
&to_last_remote_log, &to_last_remote_log, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "Connect to the remote server as username.",
|
||||
(uchar**) &user, (uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
&user, &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"verbose", 'v', "Reconstruct SQL statements out of row events. "
|
||||
"-v -v adds comments on column data types.",
|
||||
|
@ -1150,7 +1149,7 @@ that may lead to an endless loop.",
|
|||
0, 0, 0, 0, 0},
|
||||
{"open_files_limit", OPT_OPEN_FILES_LIMIT,
|
||||
"Used to reserve file descriptors for use by this program.",
|
||||
(uchar**) &open_files_limit, (uchar**) &open_files_limit, 0, GET_ULONG,
|
||||
&open_files_limit, &open_files_limit, 0, GET_ULONG,
|
||||
REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0},
|
||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
|
|
@ -54,13 +54,13 @@ static struct my_option my_long_options[] =
|
|||
{
|
||||
{"all-databases", 'A',
|
||||
"Check all the databases. This is the same as --databases with all databases selected.",
|
||||
(uchar**) &opt_alldbs, (uchar**) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&opt_alldbs, &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"analyze", 'a', "Analyze given tables.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"all-in-1", '1',
|
||||
"Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.",
|
||||
(uchar**) &opt_all_in_1, (uchar**) &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
&opt_all_in_1, &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
|
@ -68,11 +68,11 @@ static struct my_option my_long_options[] =
|
|||
#endif
|
||||
{"auto-repair", OPT_AUTO_REPAIR,
|
||||
"If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.",
|
||||
(uchar**) &opt_auto_repair, (uchar**) &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
|
||||
&opt_auto_repair, &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"check-only-changed", 'C',
|
||||
|
@ -82,11 +82,11 @@ static struct my_option my_long_options[] =
|
|||
"Check tables for version-dependent changes. May be used with --auto-repair to correct tables requiring version-dependent updates.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &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},
|
||||
{"databases", 'B',
|
||||
"Check several databases. Note the difference in usage; in this case no tables are given. All name arguments are regarded as database names.",
|
||||
(uchar**) &opt_databases, (uchar**) &opt_databases, 0, GET_BOOL, NO_ARG,
|
||||
&opt_databases, &opt_databases, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||
|
@ -96,40 +96,41 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
|
||||
&debug_info_flag, &debug_info_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", &default_charset,
|
||||
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fast",'F', "Check only tables that haven't been closed properly.",
|
||||
(uchar**) &opt_fast, (uchar**) &opt_fast, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
&opt_fast, &opt_fast, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"fix-db-names", OPT_FIX_DB_NAMES, "Fix database names.",
|
||||
(uchar**) &opt_fix_db_names, (uchar**) &opt_fix_db_names,
|
||||
&opt_fix_db_names, &opt_fix_db_names,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fix-table-names", OPT_FIX_TABLE_NAMES, "Fix table names.",
|
||||
(uchar**) &opt_fix_table_names, (uchar**) &opt_fix_table_names,
|
||||
&opt_fix_table_names, &opt_fix_table_names,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"force", 'f', "Continue even if we get an SQL error.",
|
||||
(uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
&ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"extended", 'e',
|
||||
"If you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time. If you are using this option with REPAIR TABLE, it will force using old slow repair with keycache method, instead of much faster repair by sorting.",
|
||||
(uchar**) &opt_extended, (uchar**) &opt_extended, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
&opt_extended, &opt_extended, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host",'h', "Connect to host.", (uchar**) ¤t_host,
|
||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host",'h', "Connect to host.", ¤t_host,
|
||||
¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"medium-check", 'm',
|
||||
"Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"write-binlog", OPT_WRITE_BINLOG,
|
||||
"Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Use --skip-write-binlog when commands should not be sent to replication slaves.",
|
||||
(uchar**) &opt_write_binlog, (uchar**) &opt_write_binlog, 0, GET_BOOL, NO_ARG,
|
||||
"Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Use --skip-write-binlog "
|
||||
"when commands should not be sent to replication slaves.",
|
||||
&opt_write_binlog, &opt_write_binlog, 0, GET_BOOL, NO_ARG,
|
||||
1, 0, 0, 0, 0, 0},
|
||||
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
|
@ -146,38 +147,37 @@ static struct my_option my_long_options[] =
|
|||
"/etc/services, "
|
||||
#endif
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
&opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quick", 'q',
|
||||
"If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.",
|
||||
(uchar**) &opt_quick, (uchar**) &opt_quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
&opt_quick, &opt_quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"repair", 'r',
|
||||
"Can fix almost anything except unique keys that aren't unique.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
|
||||
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"silent", 's', "Print only error messages.", (uchar**) &opt_silent,
|
||||
(uchar**) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"silent", 's', "Print only error messages.", &opt_silent,
|
||||
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
|
||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"use-frm", OPT_FRM,
|
||||
"When used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted.",
|
||||
(uchar**) &opt_frm, (uchar**) &opt_frm, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
&opt_frm, &opt_frm, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
||||
(uchar**) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", ¤t_user,
|
||||
¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
|
|
@ -186,90 +186,98 @@ static struct my_option my_long_options[] =
|
|||
{
|
||||
{"all-databases", 'A',
|
||||
"Dump all the databases. This will be same as --databases with all databases selected.",
|
||||
(uchar**) &opt_alldbs, (uchar**) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&opt_alldbs, &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"all-tablespaces", 'Y',
|
||||
"Dump all the tablespaces.",
|
||||
(uchar**) &opt_alltspcs, (uchar**) &opt_alltspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&opt_alltspcs, &opt_alltspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"no-tablespaces", 'y',
|
||||
"Do not dump any tablespace information.",
|
||||
(uchar**) &opt_notspcs, (uchar**) &opt_notspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&opt_notspcs, &opt_notspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"add-drop-database", OPT_DROP_DATABASE, "Add a DROP DATABASE before each create.",
|
||||
(uchar**) &opt_drop_database, (uchar**) &opt_drop_database, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
&opt_drop_database, &opt_drop_database, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"add-drop-table", OPT_DROP, "Add a DROP TABLE before each create.",
|
||||
(uchar**) &opt_drop, (uchar**) &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
||||
&opt_drop, &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
||||
0},
|
||||
{"add-locks", OPT_LOCKS, "Add locks around INSERT statements.",
|
||||
(uchar**) &opt_lock, (uchar**) &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
||||
&opt_lock, &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
||||
0},
|
||||
{"allow-keywords", OPT_KEYWORDS,
|
||||
"Allow creation of column names that are keywords.", (uchar**) &opt_keywords,
|
||||
(uchar**) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Allow creation of column names that are keywords.", &opt_keywords,
|
||||
&opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"apply-slave-statements", OPT_MYSQLDUMP_SLAVE_APPLY,
|
||||
"Adds 'STOP SLAVE' prior to 'CHANGE MASTER' and 'START SLAVE' to bottom of dump.",
|
||||
(uchar**) &opt_slave_apply, (uchar**) &opt_slave_apply, 0, GET_BOOL, NO_ARG,
|
||||
&opt_slave_apply, &opt_slave_apply, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"comments", 'i', "Write additional information.",
|
||||
(uchar**) &opt_comments, (uchar**) &opt_comments, 0, GET_BOOL, NO_ARG,
|
||||
&opt_comments, &opt_comments, 0, GET_BOOL, NO_ARG,
|
||||
1, 0, 0, 0, 0, 0},
|
||||
{"compatible", OPT_COMPATIBLE,
|
||||
"Change the dump to be compatible with a given mode. By default tables are dumped in a format optimized for MySQL. Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, no_field_options. One can use several modes separated by commas. Note: Requires MySQL server version 4.1.0 or higher. This option is ignored with earlier server versions.",
|
||||
(uchar**) &opt_compatible_mode_str, (uchar**) &opt_compatible_mode_str, 0,
|
||||
"Change the dump to be compatible with a given mode. By default tables "
|
||||
"are dumped in a format optimized for MySQL. Legal modes are: ansi, "
|
||||
"mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, "
|
||||
"no_table_options, no_field_options. One can use several modes separated "
|
||||
"by commas. Note: Requires MySQL server version 4.1.0 or higher. "
|
||||
"This option is ignored with earlier server versions.",
|
||||
&opt_compatible_mode_str, &opt_compatible_mode_str, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compact", OPT_COMPACT,
|
||||
"Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --skip-add-locks --skip-comments --skip-disable-keys --skip-set-charset.",
|
||||
(uchar**) &opt_compact, (uchar**) &opt_compact, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
"Give less verbose output (useful for debugging). Disables structure "
|
||||
"comments and header/footer constructs. Enables options --skip-add-"
|
||||
"drop-table --skip-add-locks --skip-comments --skip-disable-keys "
|
||||
"--skip-set-charset.",
|
||||
&opt_compact, &opt_compact, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"complete-insert", 'c', "Use complete insert statements.",
|
||||
(uchar**) &opt_complete_insert, (uchar**) &opt_complete_insert, 0, GET_BOOL,
|
||||
&opt_complete_insert, &opt_complete_insert, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &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},
|
||||
{"create-options", 'a',
|
||||
"Include all MySQL specific create options.",
|
||||
(uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
|
||||
&create_options, &create_options, 0, GET_BOOL, NO_ARG, 1,
|
||||
0, 0, 0, 0, 0},
|
||||
{"databases", 'B',
|
||||
"Dump several databases. Note the difference in usage; in this case no tables are given. All name arguments are regarded as database names. 'USE db_name;' will be included in the output.",
|
||||
(uchar**) &opt_databases, (uchar**) &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
&opt_databases, &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log.", &default_dbug_option,
|
||||
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
|
||||
&debug_info_flag, &debug_info_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", &default_charset,
|
||||
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED.",
|
||||
(uchar**) &opt_delayed, (uchar**) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&opt_delayed, &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"delete-master-logs", OPT_DELETE_MASTER_LOGS,
|
||||
"Delete logs on master after backup. This automatically enables --master-data.",
|
||||
(uchar**) &opt_delete_master_logs, (uchar**) &opt_delete_master_logs, 0,
|
||||
&opt_delete_master_logs, &opt_delete_master_logs, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"disable-keys", 'K',
|
||||
"'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.", (uchar**) &opt_disable_keys,
|
||||
(uchar**) &opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
"'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER "
|
||||
"TABLE tb_name ENABLE KEYS */; will be put in the output.", &opt_disable_keys,
|
||||
&opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"dump-slave", OPT_MYSQLDUMP_SLAVE_DATA,
|
||||
"This causes the binary log position and filename of the master to be "
|
||||
"appended to the dumped data output. Setting the value to 1, will print"
|
||||
|
@ -281,31 +289,28 @@ static struct my_option my_long_options[] =
|
|||
"- don't forget to read about --single-transaction below). In all cases "
|
||||
"any action on logs will happen at the exact moment of the dump."
|
||||
"Option automatically turns --lock-tables off.",
|
||||
(uchar**) &opt_slave_data, (uchar**) &opt_slave_data, 0,
|
||||
&opt_slave_data, &opt_slave_data, 0,
|
||||
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL, 0, 0, 0},
|
||||
{"events", 'E', "Dump events.",
|
||||
(uchar**) &opt_events, (uchar**) &opt_events, 0, GET_BOOL,
|
||||
&opt_events, &opt_events, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"extended-insert", 'e',
|
||||
"Use multiple-row INSERT syntax that include several VALUES lists.",
|
||||
(uchar**) &extended_insert, (uchar**) &extended_insert, 0, GET_BOOL, NO_ARG,
|
||||
&extended_insert, &extended_insert, 0, GET_BOOL, NO_ARG,
|
||||
1, 0, 0, 0, 0, 0},
|
||||
{"fields-terminated-by", OPT_FTB,
|
||||
"Fields in the output file are terminated by the given string.",
|
||||
(uchar**) &fields_terminated, (uchar**) &fields_terminated, 0,
|
||||
"Fields in the output file are terminated by the given string.",
|
||||
&fields_terminated, &fields_terminated, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-enclosed-by", OPT_ENC,
|
||||
"Fields in the output file are enclosed by the given character.",
|
||||
(uchar**) &enclosed, (uchar**) &enclosed, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
"Fields in the output file are enclosed by the given character.",
|
||||
&enclosed, &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
||||
"Fields in the output file are optionally enclosed by the given character.",
|
||||
(uchar**) &opt_enclosed, (uchar**) &opt_enclosed, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
&opt_enclosed, &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
{"fields-escaped-by", OPT_ESC,
|
||||
"Fields in the output file are escaped by the given character.",
|
||||
(uchar**) &escaped, (uchar**) &escaped, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&escaped, &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
|
||||
"Note that if you dump many databases at once (using the option "
|
||||
"--databases= or --all-databases), the logs will be flushed for "
|
||||
|
@ -315,24 +320,24 @@ static struct my_option my_long_options[] =
|
|||
"to the moment all tables are locked. So if you want your dump and "
|
||||
"the log flush to happen at the same exact moment you should use "
|
||||
"--lock-all-tables or --master-data with --flush-logs.",
|
||||
(uchar**) &flush_logs, (uchar**) &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&flush_logs, &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement "
|
||||
"after dumping the mysql database. This option should be used any "
|
||||
"time the dump contains the mysql database and any other database "
|
||||
"that depends on the data in the mysql database for proper restore. ",
|
||||
(uchar**) &flush_privileges, (uchar**) &flush_privileges, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&flush_privileges, &flush_privileges, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"force", 'f', "Continue even if we get an SQL error.",
|
||||
(uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG,
|
||||
&ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
|
||||
"VARBINARY, BLOB) in hexadecimal format.",
|
||||
(uchar**) &opt_hex_blob, (uchar**) &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (uchar**) ¤t_host,
|
||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&opt_hex_blob, &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", ¤t_host,
|
||||
¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ignore-table", OPT_IGNORE_TABLE,
|
||||
"Do not dump the specified table. To specify more than one table to ignore, "
|
||||
"use the directive multiple times, once for each table. Each table must "
|
||||
|
@ -340,27 +345,26 @@ static struct my_option my_long_options[] =
|
|||
"--ignore-table=database.table.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"include-master-host-port", OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT,
|
||||
"Adds 'MASTER_HOST=<host>, MASTER_PORT=<port>' to 'CHANGE MASTER TO..' in dump produced with --dump-slave.",
|
||||
(uchar**) &opt_include_master_host_port,
|
||||
(uchar**) &opt_include_master_host_port,
|
||||
0, GET_BOOL, NO_ARG,
|
||||
"Adds 'MASTER_HOST=<host>, MASTER_PORT=<port>' to 'CHANGE MASTER TO..' "
|
||||
"in dump produced with --dump-slave.", &opt_include_master_host_port,
|
||||
&opt_include_master_host_port, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"insert-ignore", OPT_INSERT_IGNORE, "Insert rows with INSERT IGNORE.",
|
||||
(uchar**) &opt_ignore, (uchar**) &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&opt_ignore, &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"lines-terminated-by", OPT_LTB,
|
||||
{"lines-terminated-by", OPT_LTB,
|
||||
"Lines in the output file are terminated by the given string.",
|
||||
(uchar**) &lines_terminated, (uchar**) &lines_terminated, 0, GET_STR,
|
||||
&lines_terminated, &lines_terminated, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"lock-all-tables", 'x', "Locks all tables across all databases. This "
|
||||
"is achieved by taking a global read lock for the duration of the whole "
|
||||
"dump. Automatically turns --single-transaction and --lock-tables off.",
|
||||
(uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
|
||||
&opt_lock_all_tables, &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"lock-tables", 'l', "Lock all tables for read.", (uchar**) &lock_tables,
|
||||
(uchar**) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"lock-tables", 'l', "Lock all tables for read.", &lock_tables,
|
||||
&lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"log-error", OPT_ERROR_LOG_FILE, "Append warnings and errors to given file.",
|
||||
(uchar**) &log_error_file, (uchar**) &log_error_file, 0, GET_STR,
|
||||
&log_error_file, &log_error_file, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"master-data", OPT_MASTER_DATA,
|
||||
"This causes the binary log position and filename to be appended to the "
|
||||
|
@ -372,41 +376,41 @@ static struct my_option my_long_options[] =
|
|||
"don't forget to read about --single-transaction below). In all cases, "
|
||||
"any action on logs will happen at the exact moment of the dump. "
|
||||
"Option automatically turns --lock-tables off.",
|
||||
(uchar**) &opt_master_data, (uchar**) &opt_master_data, 0,
|
||||
&opt_master_data, &opt_master_data, 0,
|
||||
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
||||
"The maximum packet length to send to or receive from server.",
|
||||
(uchar**) &opt_max_allowed_packet, (uchar**) &opt_max_allowed_packet, 0,
|
||||
&opt_max_allowed_packet, &opt_max_allowed_packet, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
|
||||
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
|
||||
"The buffer size for TCP/IP and socket communication.",
|
||||
(uchar**) &opt_net_buffer_length, (uchar**) &opt_net_buffer_length, 0,
|
||||
&opt_net_buffer_length, &opt_net_buffer_length, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L,
|
||||
MALLOC_OVERHEAD-1024, 1024, 0},
|
||||
{"no-autocommit", OPT_AUTOCOMMIT,
|
||||
"Wrap tables with autocommit/commit statements.",
|
||||
(uchar**) &opt_autocommit, (uchar**) &opt_autocommit, 0, GET_BOOL, NO_ARG,
|
||||
&opt_autocommit, &opt_autocommit, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"no-create-db", 'n',
|
||||
"Suppress the CREATE DATABASE ... IF EXISTS statement that normally is "
|
||||
"output for each dumped database if --all-databases or --databases is "
|
||||
"given.",
|
||||
(uchar**) &opt_create_db, (uchar**) &opt_create_db, 0,
|
||||
&opt_create_db, &opt_create_db, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-create-info", 't', "Don't write table creation info.",
|
||||
(uchar**) &opt_no_create_info, (uchar**) &opt_no_create_info, 0, GET_BOOL,
|
||||
&opt_no_create_info, &opt_no_create_info, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
|
||||
(uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-set-names", 'N', "Same as--skip-set-charset.",
|
||||
{"no-data", 'd', "No row information.", &opt_no_data,
|
||||
&opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-set-names", 'N', "Same as --skip-set-charset.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"opt", OPT_OPTIMIZE,
|
||||
"Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"order-by-primary", OPT_ORDER_BY_PRIMARY,
|
||||
"Sorts each table's rows by primary key, or first unique key, if such a key exists. Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.",
|
||||
(uchar**) &opt_order_by_primary, (uchar**) &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&opt_order_by_primary, &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"Password to use when connecting to server. If password is not given it's solicited on the tty.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -414,33 +418,35 @@ static struct my_option my_long_options[] =
|
|||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
{"port", 'P', "Port number to use for connection.", &opt_mysql_port,
|
||||
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quick", 'q', "Don't buffer query, dump directly to stdout.",
|
||||
(uchar**) &quick, (uchar**) &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
&quick, &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"quote-names",'Q', "Quote table and column names with backticks (`).",
|
||||
(uchar**) &opt_quoted, (uchar**) &opt_quoted, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
|
||||
&opt_quoted, &opt_quoted, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
|
||||
0, 0},
|
||||
{"replace", OPT_MYSQL_REPLACE_INTO, "Use REPLACE INTO instead of INSERT INTO.",
|
||||
(uchar**) &opt_replace_into, (uchar**) &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&opt_replace_into, &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"result-file", 'r',
|
||||
"Direct output to a given file. This option should be used in MSDOS, because it prevents new line '\\n' from being converted to '\\r\\n' (carriage return + line feed).",
|
||||
"Direct output to a given file. This option should be used in MSDOS, "
|
||||
"because it prevents new line '\\n' from being converted to '\\r\\n' "
|
||||
"(carriage return + line feed).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"routines", 'R', "Dump stored routines (functions and procedures).",
|
||||
(uchar**) &opt_routines, (uchar**) &opt_routines, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&opt_routines, &opt_routines, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"set-charset", OPT_SET_CHARSET,
|
||||
"Add 'SET NAMES default_character_set' to the output.",
|
||||
(uchar**) &opt_set_charset, (uchar**) &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
|
||||
&opt_set_charset, &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
|
||||
0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
|
||||
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
/*
|
||||
|
@ -458,42 +464,42 @@ static struct my_option my_long_options[] =
|
|||
"connection should use the following statements: ALTER TABLE, DROP "
|
||||
"TABLE, RENAME TABLE, TRUNCATE TABLE, as consistent snapshot is not "
|
||||
"isolated from them. Option automatically turns off --lock-tables.",
|
||||
(uchar**) &opt_single_transaction, (uchar**) &opt_single_transaction, 0,
|
||||
&opt_single_transaction, &opt_single_transaction, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"dump-date", OPT_DUMP_DATE, "Put a dump date to the end of the output.",
|
||||
(uchar**) &opt_dump_date, (uchar**) &opt_dump_date, 0,
|
||||
&opt_dump_date, &opt_dump_date, 0,
|
||||
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"skip-opt", OPT_SKIP_OPTIMIZATION,
|
||||
"Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0,
|
||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"tab",'T',
|
||||
"Create tab-separated textfile for each table to given path. (Create .sql "
|
||||
"and .txt files.) NOTE: This only works if mysqldump is run on the same "
|
||||
"machine as the mysqld server.",
|
||||
(uchar**) &path, (uchar**) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&path, &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"tables", OPT_TABLES, "Overrides option --databases (-B).",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table.",
|
||||
(uchar**) &opt_dump_triggers, (uchar**) &opt_dump_triggers, 0, GET_BOOL,
|
||||
&opt_dump_triggers, &opt_dump_triggers, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"tz-utc", OPT_TZ_UTC,
|
||||
"SET TIME_ZONE='+00:00' at top of dump to allow dumping of TIMESTAMP data when a server has data in different time zones or data is being moved between servers with different time zones.",
|
||||
(uchar**) &opt_tz_utc, (uchar**) &opt_tz_utc, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
&opt_tz_utc, &opt_tz_utc, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.",
|
||||
(uchar**) ¤t_user, (uchar**) ¤t_user, 0, GET_STR, REQUIRED_ARG,
|
||||
¤t_user, ¤t_user, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v', "Print info about the various stages.",
|
||||
(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},
|
||||
{"version",'V', "Output version information and exit.", 0, 0, 0,
|
||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"where", 'w', "Dump only selected records. Quotes are mandatory.",
|
||||
(uchar**) &where, (uchar**) &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&where, &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"xml", 'X', "Dump a database as well formed XML.", 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}
|
||||
|
|
|
@ -72,68 +72,68 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", &default_charset,
|
||||
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"columns", 'c',
|
||||
"Use only these columns to import the data to. Give the column names in a comma separated list. This is same as giving columns to LOAD DATA INFILE.",
|
||||
(uchar**) &opt_columns, (uchar**) &opt_columns, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
&opt_columns, &opt_columns, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &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},
|
||||
{"debug",'#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0,
|
||||
GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
|
||||
&debug_info_flag, &debug_info_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delete", 'd', "First delete all rows from table.", (uchar**) &opt_delete,
|
||||
(uchar**) &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delete", 'd', "First delete all rows from table.", &opt_delete,
|
||||
&opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-terminated-by", OPT_FTB,
|
||||
"Fields in the input file are terminated by the given string.",
|
||||
(uchar**) &fields_terminated, (uchar**) &fields_terminated, 0,
|
||||
&fields_terminated, &fields_terminated, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-enclosed-by", OPT_ENC,
|
||||
"Fields in the import file are enclosed by the given character.",
|
||||
(uchar**) &enclosed, (uchar**) &enclosed, 0,
|
||||
&enclosed, &enclosed, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
||||
"Fields in the input file are optionally enclosed by the given character.",
|
||||
(uchar**) &opt_enclosed, (uchar**) &opt_enclosed, 0,
|
||||
&opt_enclosed, &opt_enclosed, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-escaped-by", OPT_ESC,
|
||||
"Fields in the input file are escaped by the given character.",
|
||||
(uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
&escaped, &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"force", 'f', "Continue even if we get an SQL error.",
|
||||
(uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
&ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (uchar**) ¤t_host,
|
||||
(uchar**) ¤t_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", ¤t_host,
|
||||
¤t_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ignore", 'i', "If duplicate unique key was found, keep old row.",
|
||||
(uchar**) &ignore, (uchar**) &ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&ignore, &ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ignore-lines", OPT_IGN_LINES, "Ignore first n lines of data infile.",
|
||||
(uchar**) &opt_ignore_lines, (uchar**) &opt_ignore_lines, 0, GET_LL,
|
||||
&opt_ignore_lines, &opt_ignore_lines, 0, GET_LL,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"lines-terminated-by", OPT_LTB,
|
||||
"Lines in the input file are terminated by the given string.",
|
||||
(uchar**) &lines_terminated, (uchar**) &lines_terminated, 0, GET_STR,
|
||||
&lines_terminated, &lines_terminated, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"local", 'L', "Read all files through the client.", (uchar**) &opt_local_file,
|
||||
(uchar**) &opt_local_file, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"local", 'L', "Read all files through the client.", &opt_local_file,
|
||||
&opt_local_file, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"lock-tables", 'l', "Lock all tables for write (this disables threads).",
|
||||
(uchar**) &lock_tables, (uchar**) &lock_tables, 0, GET_BOOL, NO_ARG,
|
||||
&lock_tables, &lock_tables, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"low-priority", OPT_LOW_PRIORITY,
|
||||
"Use LOW_PRIORITY when updating the table.", (uchar**) &opt_low_priority,
|
||||
(uchar**) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Use LOW_PRIORITY when updating the table.", &opt_low_priority,
|
||||
&opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"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},
|
||||
|
@ -147,35 +147,35 @@ static struct my_option my_long_options[] =
|
|||
"/etc/services, "
|
||||
#endif
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
&opt_mysql_port,
|
||||
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"replace", 'r', "If duplicate unique key was found, replace old row.",
|
||||
(uchar**) &replace, (uchar**) &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&replace, &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
|
||||
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"silent", 's', "Be more silent.", (uchar**) &silent, (uchar**) &silent, 0,
|
||||
{"silent", 's', "Be more silent.", &silent, &silent, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"use-threads", OPT_USE_THREADS,
|
||||
"Load files in parallel. The argument is the number "
|
||||
"of threads to use for loading data.",
|
||||
(uchar**) &opt_use_threads, (uchar**) &opt_use_threads, 0,
|
||||
&opt_use_threads, &opt_use_threads, 0,
|
||||
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
||||
(uchar**) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", ¤t_user,
|
||||
¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v', "Print info about the various stages.", (uchar**) &verbose,
|
||||
(uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Print info about the various stages.", &verbose,
|
||||
&verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit.", 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}
|
||||
|
|
|
@ -166,35 +166,35 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", 'c', "Directory for character set files.",
|
||||
(uchar**) &charsets_dir, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
|
||||
&charsets_dir, &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", &default_charset,
|
||||
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"count", OPT_COUNT,
|
||||
"Show number of rows per table (may be slow for non-MyISAM tables).",
|
||||
(uchar**) &opt_count, (uchar**) &opt_count, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
&opt_count, &opt_count, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &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},
|
||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
|
||||
&debug_info_flag, &debug_info_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_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},
|
||||
{"status", 'i', "Shows a lot of extra information about each table.",
|
||||
(uchar**) &opt_status, (uchar**) &opt_status, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
&opt_status, &opt_status, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"keys", 'k', "Show keys for table.", (uchar**) &opt_show_keys,
|
||||
(uchar**) &opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"keys", 'k', "Show keys for table.", &opt_show_keys,
|
||||
&opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"Password to use when connecting to server. If password is not given, it's "
|
||||
"solicited on the tty.",
|
||||
|
@ -205,8 +205,8 @@ static struct my_option my_long_options[] =
|
|||
"/etc/services, "
|
||||
#endif
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
&opt_mysql_port,
|
||||
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
#ifdef __WIN__
|
||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||
|
@ -217,19 +217,20 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Base name of shared memory.", &shared_memory_base_name,
|
||||
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"show-table-type", 't', "Show table type column.",
|
||||
(uchar**) &opt_table_type, (uchar**) &opt_table_type, 0, GET_BOOL,
|
||||
&opt_table_type, &opt_table_type, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
||||
(uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", &user,
|
||||
&user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v',
|
||||
"More verbose output; you can use this multiple times to get even more "
|
||||
|
|
|
@ -515,62 +515,62 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql", 'a',
|
||||
"Generate SQL where not supplied by file or command line.",
|
||||
(uchar**) &auto_generate_sql, (uchar**) &auto_generate_sql,
|
||||
&auto_generate_sql, &auto_generate_sql,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
|
||||
"Add an AUTO_INCREMENT column to auto-generated tables.",
|
||||
(uchar**) &auto_generate_sql_autoincrement,
|
||||
(uchar**) &auto_generate_sql_autoincrement,
|
||||
&auto_generate_sql_autoincrement,
|
||||
&auto_generate_sql_autoincrement,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
|
||||
"Set this number to generate a set number of queries to run.",
|
||||
(uchar**) &auto_actual_queries, (uchar**) &auto_actual_queries,
|
||||
&auto_actual_queries, &auto_actual_queries,
|
||||
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
|
||||
"Add GUID based primary keys to auto-generated tables.",
|
||||
(uchar**) &auto_generate_sql_guid_primary,
|
||||
(uchar**) &auto_generate_sql_guid_primary,
|
||||
&auto_generate_sql_guid_primary,
|
||||
&auto_generate_sql_guid_primary,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE,
|
||||
"Specify test load type: mixed, update, write, key, or read; default is mixed.",
|
||||
(uchar**) &auto_generate_sql_type, (uchar**) &auto_generate_sql_type,
|
||||
&auto_generate_sql_type, &auto_generate_sql_type,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-secondary-indexes",
|
||||
OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
|
||||
"Number of secondary indexes to add to auto-generated tables.",
|
||||
(uchar**) &auto_generate_sql_secondary_indexes,
|
||||
(uchar**) &auto_generate_sql_secondary_indexes, 0,
|
||||
&auto_generate_sql_secondary_indexes,
|
||||
&auto_generate_sql_secondary_indexes, 0,
|
||||
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-unique-query-number",
|
||||
OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
|
||||
"Number of unique queries to generate for automatic tests.",
|
||||
(uchar**) &auto_generate_sql_unique_query_number,
|
||||
(uchar**) &auto_generate_sql_unique_query_number,
|
||||
&auto_generate_sql_unique_query_number,
|
||||
&auto_generate_sql_unique_query_number,
|
||||
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-unique-write-number",
|
||||
OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
|
||||
"Number of unique queries to generate for auto-generate-sql-write-number.",
|
||||
(uchar**) &auto_generate_sql_unique_write_number,
|
||||
(uchar**) &auto_generate_sql_unique_write_number,
|
||||
&auto_generate_sql_unique_write_number,
|
||||
&auto_generate_sql_unique_write_number,
|
||||
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
|
||||
"Number of row inserts to perform for each thread (default is 100).",
|
||||
(uchar**) &auto_generate_sql_number, (uchar**) &auto_generate_sql_number,
|
||||
&auto_generate_sql_number, &auto_generate_sql_number,
|
||||
0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0},
|
||||
{"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.",
|
||||
(uchar**) &commit_rate, (uchar**) &commit_rate, 0, GET_UINT, REQUIRED_ARG,
|
||||
&commit_rate, &commit_rate, 0, GET_UINT, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &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},
|
||||
{"concurrency", 'c', "Number of clients to simulate for query to run.",
|
||||
(uchar**) &concurrency_str, (uchar**) &concurrency_str, 0, GET_STR,
|
||||
&concurrency_str, &concurrency_str, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"create", OPT_SLAP_CREATE_STRING, "File or string to use create tables.",
|
||||
(uchar**) &create_string, (uchar**) &create_string, 0, GET_STR, REQUIRED_ARG,
|
||||
&create_string, &create_string, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.",
|
||||
(uchar**) &create_schema_string, (uchar**) &create_schema_string, 0, GET_STR,
|
||||
&create_schema_string, &create_schema_string, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"csv", OPT_SLAP_CSV,
|
||||
"Generate CSV output to named file or to stdout if no file is named.",
|
||||
|
@ -580,45 +580,45 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||
(uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR,
|
||||
&default_dbug_option, &default_dbug_option, 0, GET_STR,
|
||||
OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
|
||||
(uchar**) &debug_info_flag, 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_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delimiter", 'F',
|
||||
"Delimiter to use in SQL statements supplied in file or command line.",
|
||||
(uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG,
|
||||
&delimiter, &delimiter, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"detach", OPT_SLAP_DETACH,
|
||||
"Detach (close and reopen) connections after X number of requests.",
|
||||
(uchar**) &detach_rate, (uchar**) &detach_rate, 0, GET_UINT, REQUIRED_ARG,
|
||||
&detach_rate, &detach_rate, 0, GET_UINT, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"engine", 'e', "Storage engine to use for creating the table.",
|
||||
(uchar**) &default_engine, (uchar**) &default_engine, 0,
|
||||
&default_engine, &default_engine, 0,
|
||||
GET_STR, 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},
|
||||
{"iterations", 'i', "Number of times to run the tests.", (uchar**) &iterations,
|
||||
(uchar**) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"iterations", 'i', "Number of times to run the tests.", &iterations,
|
||||
&iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"number-char-cols", 'x',
|
||||
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql.",
|
||||
(uchar**) &num_char_cols_opt, (uchar**) &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG,
|
||||
&num_char_cols_opt, &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"number-int-cols", 'y',
|
||||
"Number of INT columns to create in table if specifying --auto-generate-sql.",
|
||||
(uchar**) &num_int_cols_opt, (uchar**) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG,
|
||||
&num_int_cols_opt, &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY,
|
||||
"Limit each client to this number of queries (this is not exact).",
|
||||
(uchar**) &num_of_query, (uchar**) &num_of_query, 0,
|
||||
&num_of_query, &num_of_query, 0,
|
||||
GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"only-print", OPT_MYSQL_ONLY_PRINT,
|
||||
"Do not connect to the databases, but instead print out what would have "
|
||||
"been done.",
|
||||
(uchar**) &opt_only_print, (uchar**) &opt_only_print, 0, GET_BOOL, NO_ARG,
|
||||
&opt_only_print, &opt_only_print, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"Password to use when connecting to server. If password is not given it's "
|
||||
|
@ -627,58 +627,54 @@ static struct my_option my_long_options[] =
|
|||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
|
||||
{"port", 'P', "Port number to use for connection.", &opt_mysql_port,
|
||||
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
|
||||
0},
|
||||
{"post-query", OPT_SLAP_POST_QUERY,
|
||||
"Query to run or file containing query to execute after tests have completed.",
|
||||
(uchar**) &user_supplied_post_statements,
|
||||
(uchar**) &user_supplied_post_statements,
|
||||
&user_supplied_post_statements, &user_supplied_post_statements,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"post-system", OPT_SLAP_POST_SYSTEM,
|
||||
"system() string to execute after tests have completed.",
|
||||
(uchar**) &post_system,
|
||||
(uchar**) &post_system,
|
||||
&post_system, &post_system,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"pre-query", OPT_SLAP_PRE_QUERY,
|
||||
"Query to run or file containing query to execute before running tests.",
|
||||
(uchar**) &user_supplied_pre_statements,
|
||||
(uchar**) &user_supplied_pre_statements,
|
||||
&user_supplied_pre_statements, &user_supplied_pre_statements,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"pre-system", OPT_SLAP_PRE_SYSTEM,
|
||||
"system() string to execute before running tests.",
|
||||
(uchar**) &pre_system,
|
||||
(uchar**) &pre_system,
|
||||
&pre_system, &pre_system,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"query", 'q', "Query to run or file containing query to run.",
|
||||
(uchar**) &user_supplied_query, (uchar**) &user_supplied_query,
|
||||
&user_supplied_query, &user_supplied_query,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name,
|
||||
(uchar**) &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||
"Base name of shared memory.", &shared_memory_base_name,
|
||||
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"silent", 's', "Run program in silent mode - no output.",
|
||||
(uchar**) &opt_silent, (uchar**) &opt_silent, 0, GET_BOOL, NO_ARG,
|
||||
&opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
||||
(uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", &user,
|
||||
&user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v',
|
||||
"More verbose output; you can use this multiple times to get even more "
|
||||
"verbose output.", (uchar**) &verbose, (uchar**) &verbose, 0,
|
||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"More verbose output; you can use this multiple times to get even more "
|
||||
"verbose output.", &verbose, &verbose, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit.", 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}
|
||||
};
|
||||
|
||||
|
|
|
@ -5888,18 +5888,18 @@ static struct my_option my_long_options[] =
|
|||
{
|
||||
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"basedir", 'b', "Basedir for tests.", (uchar**) &opt_basedir,
|
||||
(uchar**) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"basedir", 'b', "Basedir for tests.", &opt_basedir,
|
||||
&opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", (uchar**) &opt_charsets_dir,
|
||||
(uchar**) &opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory for character set files.", &opt_charsets_dir,
|
||||
&opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", 'C', "Use the compressed server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &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},
|
||||
{"cursor-protocol", OPT_CURSOR_PROTOCOL, "Use cursors for prepared statements.",
|
||||
(uchar**) &cursor_protocol, (uchar**) &cursor_protocol, 0,
|
||||
&cursor_protocol, &cursor_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"database", 'D', "Database to use.", (uchar**) &opt_db, (uchar**) &opt_db, 0,
|
||||
{"database", 'D', "Database to use.", &opt_db, &opt_db, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
|
@ -5909,28 +5909,28 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
&debug_check_flag, &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
|
||||
&debug_info_flag, &debug_info_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (uchar**) &opt_host, (uchar**) &opt_host, 0,
|
||||
{"host", 'h', "Connect to host.", &opt_host, &opt_host, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"include", 'i', "Include SQL before each test case.", (uchar**) &opt_include,
|
||||
(uchar**) &opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"logdir", OPT_LOG_DIR, "Directory for log files", (uchar**) &opt_logdir,
|
||||
(uchar**) &opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"include", 'i', "Include SQL before each test case.", &opt_include,
|
||||
&opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"logdir", OPT_LOG_DIR, "Directory for log files", &opt_logdir,
|
||||
&opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"mark-progress", OPT_MARK_PROGRESS,
|
||||
"Write line number and elapsed time to <testname>.progress.",
|
||||
(uchar**) &opt_mark_progress, (uchar**) &opt_mark_progress, 0,
|
||||
&opt_mark_progress, &opt_mark_progress, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"max-connect-retries", OPT_MAX_CONNECT_RETRIES,
|
||||
"Maximum number of attempts to connect to server.",
|
||||
(uchar**) &opt_max_connect_retries, (uchar**) &opt_max_connect_retries, 0,
|
||||
&opt_max_connect_retries, &opt_max_connect_retries, 0,
|
||||
GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0},
|
||||
{"max-connections", OPT_MAX_CONNECTIONS,
|
||||
"Max number of open connections to server",
|
||||
(uchar**) &opt_max_connections, (uchar**) &opt_max_connections, 0,
|
||||
&opt_max_connections, &opt_max_connections, 0,
|
||||
GET_INT, REQUIRED_ARG, 128, 8, 5120, 0, 0, 0},
|
||||
{"password", 'p', "Password to use when connecting to server.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -5940,18 +5940,17 @@ static struct my_option my_long_options[] =
|
|||
"/etc/services, "
|
||||
#endif
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &opt_port,
|
||||
(uchar**) &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&opt_port, &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ps-protocol", OPT_PS_PROTOCOL,
|
||||
"Use prepared-statement protocol for communication.",
|
||||
(uchar**) &ps_protocol, (uchar**) &ps_protocol, 0,
|
||||
&ps_protocol, &ps_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quiet", 's', "Suppress all normal output.", (uchar**) &silent,
|
||||
(uchar**) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quiet", 's', "Suppress all normal output.", &silent,
|
||||
&silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"record", 'r', "Record output of test_file into result file.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"result-file", 'R', "Read/store result from/in this file.",
|
||||
(uchar**) &result_file_name, (uchar**) &result_file_name, 0,
|
||||
&result_file_name, &result_file_name, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"result-format-version", OPT_RESULT_FORMAT_VERSION,
|
||||
"Version of the result file format to use",
|
||||
|
@ -5963,27 +5962,27 @@ static struct my_option my_long_options[] =
|
|||
{"server-file", 'F', "Read embedded server arguments from file.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name,
|
||||
(uchar**) &shared_memory_base_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
"Base name of shared memory.", &shared_memory_base_name,
|
||||
&shared_memory_base_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"silent", 's', "Suppress all normal output. Synonym for --quiet.",
|
||||
(uchar**) &silent, (uchar**) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
&silent, &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"skip-safemalloc", OPT_SKIP_SAFEMALLOC,
|
||||
"Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"sleep", 'T', "Always sleep this many seconds on sleep commands.",
|
||||
(uchar**) &opt_sleep, (uchar**) &opt_sleep, 0, GET_INT, REQUIRED_ARG, -1, -1, 0,
|
||||
&opt_sleep, &opt_sleep, 0, GET_INT, REQUIRED_ARG, -1, -1, 0,
|
||||
0, 0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &unix_sock, (uchar**) &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
&unix_sock, &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"sp-protocol", OPT_SP_PROTOCOL, "Use stored procedures for select.",
|
||||
(uchar**) &sp_protocol, (uchar**) &sp_protocol, 0,
|
||||
&sp_protocol, &sp_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include "sslopt-longopts.h"
|
||||
{"tail-lines", OPT_TAIL_LINES,
|
||||
"Number of lines of the result to include in a failure report.",
|
||||
(uchar**) &opt_tail_lines, (uchar**) &opt_tail_lines, 0,
|
||||
&opt_tail_lines, &opt_tail_lines, 0,
|
||||
GET_INT, REQUIRED_ARG, 0, 0, 10000, 0, 0, 0},
|
||||
{"test-file", 'x', "Read test from/in this file (default stdin).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -5991,14 +5990,14 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"tmpdir", 't', "Temporary directory where sockets are put.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login.", (uchar**) &opt_user, (uchar**) &opt_user, 0,
|
||||
{"user", 'u', "User for login.", &opt_user, &opt_user, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Write more.", (uchar**) &verbose, (uchar**) &verbose, 0,
|
||||
{"verbose", 'v', "Write more.", &verbose, &verbose, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"view-protocol", OPT_VIEW_PROTOCOL, "Use views for select.",
|
||||
(uchar**) &view_protocol, (uchar**) &view_protocol, 0,
|
||||
&view_protocol, &view_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"connect_timeout", OPT_CONNECT_TIMEOUT,
|
||||
"Number of seconds before connection timeout.",
|
||||
|
|
|
@ -25,7 +25,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
|
|||
SET(SSL_LIBRARIES yassl taocrypt)
|
||||
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
|
||||
SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
|
||||
SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL")
|
||||
SET(SSL_DEFINES"-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
|
||||
CHANGE_SSL_SETTINGS("bundled")
|
||||
#Remove -fno-implicit-templates
|
||||
#(yassl sources cannot be compiled with it)
|
||||
|
|
|
@ -38,11 +38,20 @@ AC_DEFUN([MYSQL_USE_BUNDLED_YASSL], [
|
|||
esac
|
||||
AC_SUBST([yassl_taocrypt_extra_cxxflags])
|
||||
|
||||
# Thread safe check
|
||||
yassl_thread_cxxflags=""
|
||||
yassl_thread_safe=""
|
||||
if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"; then
|
||||
yassl_thread_cxxflags="-DYASSL_THREAD_SAFE"
|
||||
yassl_thread_safe="(thread-safe)"
|
||||
fi
|
||||
AC_SUBST([yassl_thread_cxxflags])
|
||||
|
||||
# Link extra/yassl/include/openssl subdir to include/
|
||||
yassl_h_ln_cmd="\$(LN) -s \$(top_srcdir)/extra/yassl/include/openssl openssl"
|
||||
AC_SUBST(yassl_h_ln_cmd)
|
||||
|
||||
AC_MSG_RESULT([using bundled yaSSL])
|
||||
AC_MSG_RESULT([using bundled yaSSL $yassl_thread_safe])
|
||||
])
|
||||
|
||||
|
||||
|
|
|
@ -844,8 +844,8 @@ AC_TYPE_SIZE_T
|
|||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h ieeefp.h limits.h \
|
||||
memory.h pwd.h select.h poll.h \
|
||||
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h fpu_control.h \
|
||||
ieeefp.h limits.h memory.h pwd.h select.h poll.h \
|
||||
stdlib.h stddef.h \
|
||||
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
|
||||
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
|
||||
|
|
|
@ -99,31 +99,29 @@ static struct my_option my_long_options[]=
|
|||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (uchar**) & default_dbug_option,
|
||||
(uchar**) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log", &default_dbug_option,
|
||||
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) & info_flag,
|
||||
(uchar**) & info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", 'T', "Print some debug info at exit.", &info_flag,
|
||||
&info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Prints version", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"charset", 'C', "Charset dir", (uchar**) & charsets_dir,
|
||||
(uchar**) & charsets_dir,
|
||||
{"charset", 'C', "Charset dir", &charsets_dir, &charsets_dir,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"in_file", 'F', "Input file", (uchar**) & TXTFILE, (uchar**) & TXTFILE,
|
||||
{"in_file", 'F', "Input file", &TXTFILE, &TXTFILE,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"out_dir", 'D', "Output base directory", (uchar**) & DATADIRECTORY,
|
||||
(uchar**) & DATADIRECTORY,
|
||||
{"out_dir", 'D', "Output base directory", &DATADIRECTORY, &DATADIRECTORY,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"out_file", 'O', "Output filename (errmsg.sys)", (uchar**) & OUTFILE,
|
||||
(uchar**) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"header_file", 'H', "mysqld_error.h file ", (uchar**) & HEADERFILE,
|
||||
(uchar**) & HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"name_file", 'N', "mysqld_ername.h file ", (uchar**) & NAMEFILE,
|
||||
(uchar**) & NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"state_file", 'S', "sql_state.h file", (uchar**) & STATEFILE,
|
||||
(uchar**) & STATEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"out_file", 'O', "Output filename (errmsg.sys)", &OUTFILE,
|
||||
&OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"header_file", 'H', "mysqld_error.h file ", &HEADERFILE,
|
||||
&HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"name_file", 'N', "mysqld_ername.h file ", &NAMEFILE,
|
||||
&NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"state_file", 'S', "sql_state.h file", &STATEFILE,
|
||||
&STATEFILE, 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}
|
||||
};
|
||||
|
||||
|
|
|
@ -46,31 +46,36 @@ static struct my_option my_long_options[] =
|
|||
searched for a file of this name (and standard filename extensions are
|
||||
added if the file has no extension)
|
||||
*/
|
||||
{"config-file", 'c', "Deprecated, please use --defaults-file instead. Name of config file to read; if no extension is given, default extension (e.g., .ini or .cnf) will be added",
|
||||
(uchar**) &config_file, (uchar**) &config_file, 0, GET_STR, REQUIRED_ARG,
|
||||
{"config-file", 'c', "Deprecated, please use --defaults-file instead. "
|
||||
"Name of config file to read; if no extension is given, default "
|
||||
"extension (e.g., .ini or .cnf) will be added",
|
||||
&config_file, &config_file, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log", &default_dbug_option,
|
||||
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"defaults-file", 'c', "Like --config-file, except: if first option, then read this file only, do not read global or per-user config files; should be the first option",
|
||||
(uchar**) &config_file, (uchar**) &config_file, 0, GET_STR, REQUIRED_ARG,
|
||||
{"defaults-file", 'c', "Like --config-file, except: if first option, "
|
||||
"then read this file only, do not read global or per-user config "
|
||||
"files; should be the first option",
|
||||
&config_file, &config_file, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"defaults-extra-file", 'e',
|
||||
"Read this file after the global config file and before the config file in the users home directory; should be the first option",
|
||||
(uchar**) &my_defaults_extra_file, (uchar**) &my_defaults_extra_file, 0,
|
||||
"Read this file after the global config file and before the config "
|
||||
"file in the users home directory; should be the first option",
|
||||
&my_defaults_extra_file, &my_defaults_extra_file, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"defaults-group-suffix", 'g',
|
||||
"In addition to the given groups, read also groups with this suffix",
|
||||
(uchar**) &my_defaults_group_suffix, (uchar**) &my_defaults_group_suffix,
|
||||
&my_defaults_group_suffix, &my_defaults_group_suffix,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"extra-file", 'e',
|
||||
"Deprecated. Synonym for --defaults-extra-file.",
|
||||
(uchar**) &my_defaults_extra_file,
|
||||
(uchar**) &my_defaults_extra_file, 0, GET_STR,
|
||||
&my_defaults_extra_file,
|
||||
&my_defaults_extra_file, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
|
|
@ -38,7 +38,7 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, 0, 0},
|
||||
{"verbose", 'v',
|
||||
"Be more verbose. Give a warning, if kill can't handle signal 0.",
|
||||
(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},
|
||||
{"version", 'V', "Print version information and exit.", 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}
|
||||
|
|
|
@ -60,18 +60,18 @@ static struct my_option my_long_options[] =
|
|||
{"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||
{"ndb", 257, "Ndbcluster storage engine specific error codes.", (uchar**) &ndb_code,
|
||||
(uchar**) &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ndb", 257, "Ndbcluster storage engine specific error codes.", &ndb_code,
|
||||
&ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ERRLIST
|
||||
{"all", 'a', "Print all the error messages and the number.",
|
||||
(uchar**) &print_all_codes, (uchar**) &print_all_codes, 0, GET_BOOL, NO_ARG,
|
||||
&print_all_codes, &print_all_codes, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"silent", 's', "Only print the error message.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Print error code and message (default).", (uchar**) &verbose,
|
||||
(uchar**) &verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Print error code and message (default).", &verbose,
|
||||
&verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Displays version information and exits.",
|
||||
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}
|
||||
|
|
|
@ -53,10 +53,10 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"symbols-file", 's', "Use specified symbols file.", (uchar**) &sym_fname,
|
||||
(uchar**) &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"symbols-file", 's', "Use specified symbols file.", &sym_fname,
|
||||
&sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"numeric-dump-file", 'n', "Read the dump from specified file.",
|
||||
(uchar**) &dump_fname, (uchar**) &dump_fname, 0, GET_STR, REQUIRED_ARG,
|
||||
&dump_fname, &dump_fname, 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}
|
||||
};
|
||||
|
|
|
@ -45,7 +45,7 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"info", 'I', "Synonym for --help.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"silent", 's', "Be more silent.", (uchar**) &silent, (uchar**) &silent,
|
||||
{"silent", 's', "Be more silent.", &silent, &silent,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Displays version information and exits.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
|
|
@ -5,49 +5,49 @@ Certificate:
|
|||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||
Validity
|
||||
Not Before: Jan 18 20:12:32 2005 GMT
|
||||
Not After : Oct 15 20:12:32 2007 GMT
|
||||
Not Before: Mar 7 03:10:11 2005 GMT
|
||||
Not After : Apr 1 03:10:11 2046 GMT
|
||||
Subject: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (512 bit)
|
||||
Modulus (512 bit):
|
||||
00:cf:2b:14:00:b0:3c:df:6f:9e:91:40:ec:c8:f6:
|
||||
90:b2:5b:b4:70:80:a5:a4:0a:73:c7:44:f3:2a:26:
|
||||
c4:2f:f1:3a:f1:c3:c4:ac:fc:c3:d2:c3:bf:f5:d7:
|
||||
6a:38:42:ad:22:ab:c8:c4:4b:4c:1d:16:af:05:34:
|
||||
7d:79:97:5e:e1
|
||||
00:ef:c1:e3:9a:3c:6e:6e:cb:26:6f:05:be:e0:cb:
|
||||
57:a0:4b:68:e6:1b:f9:95:db:01:92:aa:6e:a6:b5:
|
||||
2d:b1:2b:50:fd:db:13:f2:c5:d8:b8:4f:75:28:53:
|
||||
72:e8:e5:11:9d:bb:c3:4f:4f:09:fd:4c:e7:46:d5:
|
||||
1d:bb:35:02:af
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
CB:0F:1F:E9:A2:76:71:C9:E6:E8:23:A6:C1:18:B7:CC:44:CF:B9:84
|
||||
1D:EF:A1:B8:81:78:12:47:E8:57:06:08:74:18:F7:D3:AA:D8:F7:BD
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:CB:0F:1F:E9:A2:76:71:C9:E6:E8:23:A6:C1:18:B7:CC:44:CF:B9:84
|
||||
keyid:1D:EF:A1:B8:81:78:12:47:E8:57:06:08:74:18:F7:D3:AA:D8:F7:BD
|
||||
DirName:/C=US/ST=Oregon/L=Portland/O=sawtooth/CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||
serial:00
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
27:f7:3d:fb:39:6f:73:a4:86:f3:a0:48:22:60:84:e9:5c:3d:
|
||||
28:36:05:16:44:98:07:87:e1:5d:b5:f3:a7:bc:33:5f:f4:29:
|
||||
a9:5f:87:33:df:e6:8e:bd:e2:f3:0a:c8:00:69:ae:3d:41:47:
|
||||
03:ea:0b:4c:67:45:4b:ab:f3:39
|
||||
d9:77:e3:07:d9:2e:ec:2f:9b:8e:9e:ca:b4:00:0b:ef:c7:74:
|
||||
cb:f4:f6:44:2f:02:75:17:a5:74:3e:26:b2:26:fd:1f:ab:3a:
|
||||
df:d5:e3:05:14:08:d0:8c:1d:c9:3e:e1:59:6f:b3:38:5d:af:
|
||||
78:60:e3:c5:6a:69:96:80:7d:00
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC7zCCApmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBiTELMAkGA1UEBhMCVVMx
|
||||
DzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxETAPBgNVBAoTCHNh
|
||||
d3Rvb3RoMSQwIgYDVQQDExt3d3cuc2F3dG9vdGgtY29uc3VsdGluZy5jb20xHTAb
|
||||
BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDExODIwMTIzMloXDTA3
|
||||
MTAxNTIwMTIzMlowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP
|
||||
BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDMwNzAzMTAxMVoXDTQ2
|
||||
MDQwMTAzMTAxMVowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP
|
||||
BgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290aDEkMCIGA1UEAxMbd3d3
|
||||
LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlh
|
||||
c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDPKxQAsDzfb56RQOzI9pCy
|
||||
W7RwgKWkCnPHRPMqJsQv8Trxw8Ss/MPSw7/112o4Qq0iq8jES0wdFq8FNH15l17h
|
||||
AgMBAAGjgekwgeYwHQYDVR0OBBYEFMsPH+midnHJ5ugjpsEYt8xEz7mEMIG2BgNV
|
||||
HSMEga4wgauAFMsPH+midnHJ5ugjpsEYt8xEz7mEoYGPpIGMMIGJMQswCQYDVQQG
|
||||
c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDvweOaPG5uyyZvBb7gy1eg
|
||||
S2jmG/mV2wGSqm6mtS2xK1D92xPyxdi4T3UoU3Lo5RGdu8NPTwn9TOdG1R27NQKv
|
||||
AgMBAAGjgekwgeYwHQYDVR0OBBYEFB3vobiBeBJH6FcGCHQY99Oq2Pe9MIG2BgNV
|
||||
HSMEga4wgauAFB3vobiBeBJH6FcGCHQY99Oq2Pe9oYGPpIGMMIGJMQswCQYDVQQG
|
||||
EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDERMA8GA1UE
|
||||
ChMIc2F3dG9vdGgxJDAiBgNVBAMTG3d3dy5zYXd0b290aC1jb25zdWx0aW5nLmNv
|
||||
bTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb22CAQAwDAYDVR0TBAUwAwEB
|
||||
/zANBgkqhkiG9w0BAQQFAANBACf3Pfs5b3OkhvOgSCJghOlcPSg2BRZEmAeH4V21
|
||||
86e8M1/0KalfhzPf5o694vMKyABprj1BRwPqC0xnRUur8zk=
|
||||
/zANBgkqhkiG9w0BAQQFAANBANl34wfZLuwvm46eyrQAC+/HdMv09kQvAnUXpXQ+
|
||||
JrIm/R+rOt/V4wUUCNCMHck+4Vlvszhdr3hg48VqaZaAfQA=
|
||||
-----END CERTIFICATE-----
|
||||
|
|
Binary file not shown.
|
@ -5,8 +5,8 @@ Certificate:
|
|||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Validity
|
||||
Not Before: Jan 18 19:33:15 2005 GMT
|
||||
Not After : Oct 15 19:33:15 2007 GMT
|
||||
Not Before: Mar 7 03:00:31 2005 GMT
|
||||
Not After : Apr 1 03:00:31 2046 GMT
|
||||
Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
|
@ -29,15 +29,15 @@ Certificate:
|
|||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
c5:82:26:0c:1f:61:01:14:b0:ce:18:99:64:91:0e:f1:f8:90:
|
||||
3e:a3:0e:be:38:7c:97:ba:05:c9:2a:dc:dd:62:2d:12:61:79:
|
||||
7a:86:b1:97:5d:1e:e8:f7:e8:32:34:f7:8f:b1:08:3d:13:71:
|
||||
a6:3c:15:91:85:12:35:6e:78:87
|
||||
59:19:ae:1b:4e:65:9e:ca:f1:b8:3d:ff:c7:5e:15:86:10:97:
|
||||
8c:3e:22:32:ab:4e:75:a7:70:83:f2:fb:2f:af:fe:26:28:e9:
|
||||
4f:d4:c9:49:7c:6f:51:7e:2a:ff:a0:5b:25:45:2e:66:d9:0d:
|
||||
92:94:e5:b8:60:c6:67:1a:f3:03
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICtzCCAmGgAwIBAgIBADANBgkqhkiG9w0BAQQFADB4MQswCQYDVQQGEwJVUzEP
|
||||
MA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwGA1UEChMFeWFT
|
||||
U0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9A
|
||||
eWFzc2wuY29tMB4XDTA1MDExODE5MzMxNVoXDTA3MTAxNTE5MzMxNVoweDELMAkG
|
||||
eWFzc2wuY29tMB4XDTA1MDMwNzAzMDAzMVoXDTQ2MDQwMTAzMDAzMVoweDELMAkG
|
||||
A1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxDjAM
|
||||
BgNVBAoTBXlhU1NMMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcN
|
||||
AQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDNH3hH
|
||||
|
@ -47,6 +47,6 @@ wP/OtbStMIGiBgNVHSMEgZowgZeAFK4lXvpNo1srh97xKvVCwP/OtbStoXykejB4
|
|||
MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFu
|
||||
ZDEOMAwGA1UEChMFeWFTU0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkq
|
||||
hkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZI
|
||||
hvcNAQEEBQADQQDFgiYMH2EBFLDOGJlkkQ7x+JA+ow6+OHyXugXJKtzdYi0SYXl6
|
||||
hrGXXR7o9+gyNPePsQg9E3GmPBWRhRI1bniH
|
||||
hvcNAQEEBQADQQBZGa4bTmWeyvG4Pf/HXhWGEJeMPiIyq051p3CD8vsvr/4mKOlP
|
||||
1MlJfG9Rfir/oFslRS5m2Q2SlOW4YMZnGvMD
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
@ -5,8 +5,8 @@ Certificate:
|
|||
Signature Algorithm: dsaWithSHA1
|
||||
Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@yassl.com
|
||||
Validity
|
||||
Not Before: Jan 23 22:54:51 2005 GMT
|
||||
Not After : Oct 20 22:54:51 2007 GMT
|
||||
Not Before: Mar 7 03:22:00 2005 GMT
|
||||
Not After : Apr 1 03:22:00 2046 GMT
|
||||
Subject: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@yassl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: dsaEncryption
|
||||
|
@ -43,14 +43,14 @@ Certificate:
|
|||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: dsaWithSHA1
|
||||
30:2b:02:14:74:46:9f:91:7b:24:17:3b:ee:0f:10:e3:76:62:
|
||||
f4:dc:81:e6:fd:fe:02:13:08:f4:87:0a:ab:ba:9c:de:3a:69:
|
||||
72:59:b8:ec:e9:57:f4:bf:37
|
||||
30:2c:02:14:7e:5e:94:fc:7f:ca:81:ab:b3:32:f7:21:83:48:
|
||||
48:5f:0a:f1:13:ca:02:14:73:54:32:14:51:22:bf:0b:ec:d7:
|
||||
6a:6a:fa:a7:1d:46:b4:c2:a3:b5
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDMTCCAvKgAwIBAgIBADAJBgcqhkjOOAQDMHgxCzAJBgNVBAYTAlVTMQ8wDQYD
|
||||
MIIDMjCCAvKgAwIBAgIBADAJBgcqhkjOOAQDMHgxCzAJBgNVBAYTAlVTMQ8wDQYD
|
||||
VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMRIwEAYDVQQKEwl5YVNTTCBE
|
||||
U0ExEjAQBgNVBAMTCXlhU1NMIERTQTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNz
|
||||
bC5jb20wHhcNMDUwMTIzMjI1NDUxWhcNMDcxMDIwMjI1NDUxWjB4MQswCQYDVQQG
|
||||
bC5jb20wHhcNMDUwMzA3MDMyMjAwWhcNNDYwNDAxMDMyMjAwWjB4MQswCQYDVQQG
|
||||
EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDESMBAGA1UE
|
||||
ChMJeWFTU0wgRFNBMRIwEAYDVQQDEwl5YVNTTCBEU0ExHTAbBgkqhkiG9w0BCQEW
|
||||
DmluZm9AeWFzc2wuY29tMIHwMIGoBgcqhkjOOAQBMIGcAkEAmSlpgMk8mGhFqYL+
|
||||
|
@ -63,6 +63,6 @@ IeRhRHPp4jCBogYDVR0jBIGaMIGXgBS++Yxd1hy07oHdNlYKIeRhRHPp4qF8pHow
|
|||
eDELMAkGA1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxh
|
||||
bmQxEjAQBgNVBAoTCXlhU1NMIERTQTESMBAGA1UEAxMJeWFTU0wgRFNBMR0wGwYJ
|
||||
KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbYIBADAMBgNVHRMEBTADAQH/MAkGByqG
|
||||
SM44BAMDLgAwKwIUdEafkXskFzvuDxDjdmL03IHm/f4CEwj0hwqrupzeOmlyWbjs
|
||||
6Vf0vzc=
|
||||
SM44BAMDLwAwLAIUfl6U/H/KgauzMvchg0hIXwrxE8oCFHNUMhRRIr8L7Ndqavqn
|
||||
HUa0wqO1
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
@ -5,8 +5,8 @@ Certificate:
|
|||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||
Validity
|
||||
Not Before: Jan 18 20:50:59 2005 GMT
|
||||
Not After : Oct 15 20:50:59 2007 GMT
|
||||
Not Before: Mar 8 03:00:47 2005 GMT
|
||||
Not After : Apr 2 03:00:47 2046 GMT
|
||||
Subject: C=US, ST=Oregon, L=Portland, O=taoSoftDev, CN=www.taosoftdev.com/emailAddress=info@yassl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
|
@ -19,20 +19,20 @@ Certificate:
|
|||
f2:25:93:22:e7
|
||||
Exponent: 65537 (0x10001)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
08:36:07:8c:3a:7f:f9:91:0a:82:d1:6a:c1:34:be:bc:2d:b2:
|
||||
20:98:dc:45:50:53:9c:66:e6:26:71:bd:fa:d2:b4:91:d3:53:
|
||||
c0:20:05:c0:b6:84:9a:5f:3f:61:75:f5:fd:c6:ec:e2:f6:9f:
|
||||
a2:13:17:a9:b7:83:60:cc:cb:eb
|
||||
36:72:12:3b:ac:e4:58:83:09:86:4f:71:2a:3a:0d:8a:05:27:
|
||||
75:f3:3e:62:4f:ab:b8:70:20:cd:ad:70:ab:91:11:68:f8:82:
|
||||
33:e2:78:85:a8:16:f5:66:bd:68:2c:5a:26:15:12:1e:6e:83:
|
||||
c7:6d:62:b9:c3:ff:e1:86:e4:e6
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB9zCCAaECAQEwDQYJKoZIhvcNAQEEBQAwgYkxCzAJBgNVBAYTAlVTMQ8wDQYD
|
||||
VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290
|
||||
aDEkMCIGA1UEAxMbd3d3LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZI
|
||||
hvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0wNTAxMTgyMDUwNTlaFw0wNzEwMTUy
|
||||
MDUwNTlaMIGCMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQH
|
||||
hvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0wNTAzMDgwMzAwNDdaFw00NjA0MDIw
|
||||
MzAwNDdaMIGCMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQH
|
||||
EwhQb3J0bGFuZDETMBEGA1UEChMKdGFvU29mdERldjEbMBkGA1UEAxMSd3d3LnRh
|
||||
b3NvZnRkZXYuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0G
|
||||
CSqGSIb3DQEBAQUAA0sAMEgCQQCkaLu8tydfPPV4xhqvuZX8fmEfqIEKykOImgPg
|
||||
0KZ5cBY0uXx1VMpwGWY4vm4ofqX/azyDLzlCwxXzvfIlkyLnAgMBAAEwDQYJKoZI
|
||||
hvcNAQEEBQADQQAINgeMOn/5kQqC0WrBNL68LbIgmNxFUFOcZuYmcb360rSR01PA
|
||||
IAXAtoSaXz9hdfX9xuzi9p+iExept4NgzMvr
|
||||
hvcNAQEEBQADQQA2chI7rORYgwmGT3EqOg2KBSd18z5iT6u4cCDNrXCrkRFo+IIz
|
||||
4niFqBb1Zr1oLFomFRIeboPHbWK5w//hhuTm
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
@ -23,13 +23,21 @@
|
|||
#ifndef yaSSL_LOCK_HPP
|
||||
#define yaSSL_LOCK_HPP
|
||||
|
||||
/*
|
||||
Visual Studio Source Annotations header (sourceannotations.h) fails
|
||||
to compile if outside of the global namespace.
|
||||
*/
|
||||
#ifdef YASSL_THREAD_SAFE
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace yaSSL {
|
||||
|
||||
|
||||
#ifdef MULTI_THREADED
|
||||
#ifdef YASSL_THREAD_SAFE
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
class Mutex {
|
||||
CRITICAL_SECTION cs_;
|
||||
|
@ -69,7 +77,7 @@ namespace yaSSL {
|
|||
};
|
||||
|
||||
#endif // _WIN32
|
||||
#else // MULTI_THREADED (WE'RE SINGLE)
|
||||
#else // YASSL_THREAD_SAFE (WE'RE SINGLE)
|
||||
|
||||
class Mutex {
|
||||
public:
|
||||
|
@ -79,7 +87,7 @@ namespace yaSSL {
|
|||
};
|
||||
};
|
||||
|
||||
#endif // MULTI_THREADED
|
||||
#endif // YASSL_THREAD_SAFE
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,4 +5,4 @@ libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
|
|||
handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \
|
||||
template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
|
||||
EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
|
||||
AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX
|
||||
AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
namespace yaSSL {
|
||||
|
||||
|
||||
#ifdef MULTI_THREADED
|
||||
#ifdef YASSL_THREAD_SAFE
|
||||
#ifdef _WIN32
|
||||
|
||||
Mutex::Mutex()
|
||||
|
@ -79,7 +79,7 @@ namespace yaSSL {
|
|||
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // MULTI_THREADED
|
||||
#endif // YASSL_THREAD_SAFE
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,5 +2,5 @@ INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
|
|||
noinst_PROGRAMS = benchmark
|
||||
benchmark_SOURCES = benchmark.cpp
|
||||
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
benchmark_CXXFLAGS = -DYASSL_PURE_C
|
||||
benchmark_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
|
||||
EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
|
||||
|
|
|
@ -8,6 +8,7 @@ libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \
|
|||
random.cpp ripemd.cpp rsa.cpp sha.cpp template_instnt.cpp \
|
||||
tftables.cpp twofish.cpp
|
||||
|
||||
libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C
|
||||
libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C \
|
||||
@yassl_thread_cxxflags@
|
||||
|
||||
EXTRA_DIST = $(wildcard ../include/*.hpp)
|
||||
|
|
|
@ -2,5 +2,5 @@ INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
|
|||
noinst_PROGRAMS = test
|
||||
test_SOURCES = test.cpp
|
||||
test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
test_CXXFLAGS = -DYASSL_PURE_C
|
||||
test_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
|
||||
EXTRA_DIST = make.bat
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
To use MemoryTracker merely add this file to your project
|
||||
No need to instantiate anything
|
||||
|
||||
If your app is multi threaded define MULTI_THREADED
|
||||
If your app is multi threaded define YASSL_THREAD_SAFE
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ testsuite_SOURCES = testsuite.cpp ../taocrypt/test/test.cpp \
|
|||
../examples/client/client.cpp ../examples/server/server.cpp \
|
||||
../examples/echoclient/echoclient.cpp \
|
||||
../examples/echoserver/echoserver.cpp
|
||||
testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER
|
||||
testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER @yassl_thread_cxxflags@
|
||||
testsuite_LDADD = $(top_builddir)/extra/yassl/src/libyassl.la \
|
||||
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat
|
||||
|
|
|
@ -64,8 +64,8 @@ struct my_option
|
|||
if it's NULL the option is not
|
||||
visible in --help.
|
||||
*/
|
||||
uchar **value; /**< A pointer to the variable value */
|
||||
uchar **u_max_value; /**< The user def. max variable value */
|
||||
void *value; /**< A pointer to the variable value */
|
||||
void *u_max_value; /**< The user def. max variable value */
|
||||
struct st_typelib *typelib; /**< Pointer to possible values */
|
||||
ulong var_type; /**< GET_BOOL, GET_ULL, etc */
|
||||
enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG */
|
||||
|
@ -77,8 +77,18 @@ struct my_option
|
|||
void *app_type; /**< To be used by an application */
|
||||
};
|
||||
|
||||
typedef my_bool (*my_get_one_option) (int, const struct my_option *, char * );
|
||||
typedef void (*my_error_reporter) (enum loglevel level, const char *format, ... );
|
||||
|
||||
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
|
||||
typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...);
|
||||
/**
|
||||
Used to retrieve a reference to the object (variable) that holds the value
|
||||
for the given option. For example, if var_type is GET_UINT, the function
|
||||
must return a pointer to a variable of type uint. A argument is stored in
|
||||
the location pointed to by the returned pointer.
|
||||
*/
|
||||
typedef void *(*my_getopt_value)(const char *, uint, const struct my_option *,
|
||||
int *);
|
||||
|
||||
|
||||
extern char *disabled_my_option;
|
||||
extern my_bool my_getopt_print_errors;
|
||||
|
@ -90,8 +100,7 @@ extern int handle_options (int *argc, char ***argv,
|
|||
extern void my_cleanup_options(const struct my_option *options);
|
||||
extern void my_print_help(const struct my_option *options);
|
||||
extern void my_print_variables(const struct my_option *options);
|
||||
extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint,
|
||||
const struct my_option *, int *));
|
||||
extern void my_getopt_register_get_addr(my_getopt_value);
|
||||
|
||||
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
|
||||
my_bool *fix);
|
||||
|
|
|
@ -60,6 +60,10 @@
|
|||
#define USE_PRAGMA_INTERFACE
|
||||
#endif
|
||||
|
||||
#if defined(__OpenBSD__) && (OpenBSD >= 200411)
|
||||
#define HAVE_ERRNO_AS_DEFINE
|
||||
#endif
|
||||
|
||||
#if defined(i386) && !defined(__i386__)
|
||||
#define __i386__
|
||||
#endif
|
||||
|
|
|
@ -54,7 +54,7 @@ extern int NEAR my_errno; /* Last error in mysys */
|
|||
#include <malloc.h> /*for alloca*/
|
||||
#endif
|
||||
|
||||
#define MY_INIT(name); { my_progname= name; my_init(); }
|
||||
#define MY_INIT(name) { my_progname= name; my_init(); }
|
||||
|
||||
/**
|
||||
Max length of an error message generated by mysys utilities.
|
||||
|
|
|
@ -20,30 +20,30 @@
|
|||
|
||||
{"ssl", OPT_SSL_SSL,
|
||||
"Enable SSL for connection (automatically enabled with other flags).",
|
||||
(uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, OPT_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
&opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ssl-ca", OPT_SSL_CA,
|
||||
"CA file in PEM format (check OpenSSL docs, implies --ssl).",
|
||||
(uchar **) &opt_ssl_ca, (uchar **) &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG,
|
||||
&opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"ssl-capath", OPT_SSL_CAPATH,
|
||||
"CA directory (check OpenSSL docs, implies --ssl).",
|
||||
(uchar **) &opt_ssl_capath, (uchar **) &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG,
|
||||
&opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).",
|
||||
(uchar **) &opt_ssl_cert, (uchar **) &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG,
|
||||
&opt_ssl_cert, &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).",
|
||||
(uchar **) &opt_ssl_cipher, (uchar **) &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG,
|
||||
&opt_ssl_cipher, &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).",
|
||||
(uchar **) &opt_ssl_key, (uchar **) &opt_ssl_key, 0, GET_STR, REQUIRED_ARG,
|
||||
&opt_ssl_key, &opt_ssl_key, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef MYSQL_CLIENT
|
||||
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
|
||||
"Verify server's \"Common Name\" in its cert against hostname used when connecting. This option is disabled by default.",
|
||||
(uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_server_cert,
|
||||
0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Verify server's \"Common Name\" in its cert against hostname used "
|
||||
"when connecting. This option is disabled by default.",
|
||||
&opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert,
|
||||
0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
#endif /* HAVE_OPENSSL */
|
||||
#endif /* SSLOPT_LONGOPTS_INCLUDED */
|
||||
|
|
|
@ -9,7 +9,6 @@ funcs_1.myisam_views @solaris # Bug#50595 2010-03-05 alik funcs_1.myi
|
|||
innodb.innodb_information_schema # Bug#48883 2010-05-11 alik Test "innodb_information_schema" takes fewer locks than expected
|
||||
|
||||
main.func_math @freebsd # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2
|
||||
main.gis @solaris # Bug#52208 2010-04-26 alik gis fails on some platforms (Solaris, HP-UX, Linux)
|
||||
main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||
main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
|
||||
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
||||
|
@ -25,6 +24,8 @@ main.sp @solaris # Bug#47791 2010-01-20 alik Several tes
|
|||
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||
main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeout fails on OpenSolaris
|
||||
|
||||
perfschema.pfs_upgrade # Bug#53102 2010-06-15 alik perfschema.pfs_upgrade fails on sol10 sparc64 max in parallel mode
|
||||
|
||||
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
|
||||
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
|
||||
rpl.rpl_innodb_bug28430* # Bug#46029
|
||||
|
@ -34,7 +35,7 @@ rpl.rpl_plugin_load* @solaris # Bug#47146
|
|||
rpl.rpl_row_sp011* @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.wait_timeout_func @solaris # Bug#41255 2010-04-26 alik wait_timeout_func fails
|
||||
sys_vars.wait_timeout_func # Bug#41255 2010-04-26 alik wait_timeout_func fails
|
||||
|
||||
# Declare all NDB-tests in ndb and rpl_ndb test suites experimental.
|
||||
# Usually the test cases from ndb and rpl_ndb test suites are not run in PB,
|
||||
|
|
|
@ -41,13 +41,10 @@ while ($1)
|
|||
--enable_query_log
|
||||
commit;
|
||||
drop table t1;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||
show binlog events in 'master-bin.000001' from 107;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||
show binlog events in 'master-bin.000002' from 107;
|
||||
|
||||
--source include/show_binlog_events.inc
|
||||
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||
--source include/show_binlog_events.inc
|
||||
--let $binlog_file=
|
||||
|
||||
#
|
||||
# Bug#22540 - Incorrect value in column End_log_pos of
|
||||
|
@ -77,8 +74,7 @@ insert into t1 values (2);
|
|||
insert into t1 values (3);
|
||||
commit;
|
||||
drop table t1;
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
||||
show binlog events from 0;
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
# now show that nothing breaks if we need to read from the cache more
|
||||
# than once, resulting in split event-headers
|
||||
|
@ -100,8 +96,7 @@ while ($1)
|
|||
commit;
|
||||
enable_query_log;
|
||||
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
||||
show binlog events from 0;
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
@ -122,8 +117,7 @@ set @b= 14632475938453979136;
|
|||
execute stmt using @a, @b;
|
||||
deallocate prepare stmt;
|
||||
drop table t1;
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
||||
show binlog events from 0;
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
|
||||
#
|
||||
|
|
|
@ -127,12 +127,7 @@ select * from t1;
|
|||
select * from t2;
|
||||
select * from t3;
|
||||
|
||||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
--replace_regex /file_id=[0-9]+/file_id=#/
|
||||
show binlog events;
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
drop table t1,t2,t3;
|
||||
|
||||
|
@ -170,18 +165,21 @@ set autocommit=0;
|
|||
start transaction;
|
||||
insert into t1 values(1);
|
||||
commit;
|
||||
|
||||
let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
|
||||
start transaction;
|
||||
insert into t1 values(2);
|
||||
rollback;
|
||||
|
||||
let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
if (`SELECT $master_log_pos_2 <> $master_log_pos_1`)
|
||||
{
|
||||
echo $master_log_pos_1 $master_log_pos_2;
|
||||
die Rollbacked transaction has been binlogged;
|
||||
}
|
||||
|
||||
set autocommit=1;
|
||||
|
||||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
--replace_regex /file_id=[0-9]+/file_id=#/
|
||||
show binlog events;
|
||||
|
||||
drop table if exists t1;
|
||||
|
||||
#
|
||||
|
|
|
@ -61,7 +61,7 @@ sync_with_master;
|
|||
SELECT * FROM t1;
|
||||
SELECT * FROM t3;
|
||||
# Check that no error is reported
|
||||
--source include/show_slave_status2.inc
|
||||
source include/check_slave_is_running.inc;
|
||||
--echo
|
||||
|
||||
# 2) Test lock wait timeout
|
||||
|
@ -89,7 +89,7 @@ sync_with_master;
|
|||
SELECT * FROM t1;
|
||||
SELECT * FROM t3;
|
||||
# Check that no error is reported
|
||||
--source include/show_slave_status2.inc
|
||||
source include/check_slave_is_running.inc;
|
||||
--echo
|
||||
|
||||
# 3) Test lock wait timeout and purged relay log
|
||||
|
@ -103,6 +103,7 @@ SET global max_relay_log_size=0;
|
|||
--source include/stop_slave.inc
|
||||
DELETE FROM t2;
|
||||
# Set slave position to the BEGIN log event
|
||||
--replace_result $master_pos_begin MASTER_POS_BEGIN
|
||||
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin;
|
||||
BEGIN;
|
||||
# Hold lock
|
||||
|
@ -119,7 +120,7 @@ sync_with_master;
|
|||
SELECT * FROM t1;
|
||||
SELECT * FROM t3;
|
||||
# Check that no error is reported
|
||||
--source include/show_slave_status2.inc
|
||||
source include/check_slave_is_running.inc;
|
||||
--echo
|
||||
|
||||
# Clean up
|
||||
|
|
|
@ -146,12 +146,7 @@ SELECT COUNT(*) FROM t1;
|
|||
--echo
|
||||
SELECT * FROM t1 ORDER BY f3 LIMIT 20;
|
||||
|
||||
--echo
|
||||
--echo * Show Slave Status *
|
||||
--echo
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical show slave status;
|
||||
--echo
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
### Altering table def scenario
|
||||
--echo
|
||||
|
@ -431,16 +426,14 @@ connection master;
|
|||
delete from t4;
|
||||
delete from t31;
|
||||
|
||||
--echo
|
||||
--echo ** Check slave status **
|
||||
--echo
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
select * from t31;
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical show slave status;
|
||||
--echo
|
||||
--echo ** Check slave status **
|
||||
--echo
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
#### Clean Up ####
|
||||
|
||||
|
@ -493,16 +486,15 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
|||
|
||||
--echo
|
||||
--echo ********************************************
|
||||
--echo *** Expect slave to fail with Error 1523 ***
|
||||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
--echo
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
# 1677 = ER_SLAVE_CONVERSION_FAILED
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_skip_counter= 2
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo
|
||||
--echo *** Drop t10 ***
|
||||
|
@ -550,16 +542,15 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
|||
|
||||
--echo
|
||||
--echo ********************************************
|
||||
--echo *** Expect slave to fail with Error 1523 ***
|
||||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
--echo
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
# 1677 = ER_SLAVE_CONVERSION_FAILED
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_skip_counter= 2
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo
|
||||
--echo *** Drop t11 ***
|
||||
|
@ -697,10 +688,10 @@ SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
|
|||
# Remove below once fixed
|
||||
#***************************
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
# 1091 = ER_CANT_DROP_FIELD_OR_KEY
|
||||
--let $slave_sql_errno= 1091
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
#***************************
|
||||
|
||||
STOP SLAVE;
|
||||
|
@ -763,10 +754,10 @@ SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
|
|||
--echo ********************************************
|
||||
--echo
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
# 1054 = ER_BAD_FIELD_ERROR
|
||||
--let $slave_sql_errno= 1054
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
|
@ -840,10 +831,10 @@ SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
|
|||
--echo *****************
|
||||
--echo
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
# 1072 = ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
--let $slave_sql_errno= 1072
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
|
|
|
@ -101,9 +101,9 @@ SELECT * FROM t2 ORDER BY a;
|
|||
--echo *** Start Slave ***
|
||||
connection slave;
|
||||
START SLAVE;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
@ -153,11 +153,10 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
|||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_skip_counter= 2
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo *** Drop t3 ***
|
||||
connection master;
|
||||
|
@ -197,11 +196,10 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
|||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_skip_counter= 2
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo *** Drop t4 ***
|
||||
connection master;
|
||||
|
@ -241,11 +239,10 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
|||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_skip_counter= 2
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo *** Drop t5 ***
|
||||
connection master;
|
||||
|
@ -286,9 +283,9 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
|||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||
#START SLAVE;
|
||||
|
||||
|
@ -387,12 +384,10 @@ INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||
### Uncomment once bug is fixed
|
||||
|
||||
#connection slave;
|
||||
#wait_for_slave_to_stop;
|
||||
#--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
||||
#--query_vertical SHOW SLAVE STATUS
|
||||
#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
#START SLAVE;
|
||||
#--let $slave_sql_errno= SOMETHING
|
||||
#--let $slave_skip_counter= 2
|
||||
#--let $show_slave_sql_error= 1
|
||||
#--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo *** Drop t8 ***
|
||||
connection master;
|
||||
|
@ -451,12 +446,10 @@ if (`SELECT $engine_type != 'NDB'`)
|
|||
# todo: fix Bug #43992 slave sql thread can't tune own sql_mode ...
|
||||
# and add/restore waiting for stop test
|
||||
|
||||
#--source include/wait_for_slave_sql_to_stop.inc
|
||||
#--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
||||
#--query_vertical SHOW SLAVE STATUS
|
||||
#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
#START SLAVE;
|
||||
#--let $slave_sql_errno= SOMETHING
|
||||
#--let $slave_skip_counter= 2
|
||||
#--let $show_slave_sql_error= 1
|
||||
#--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
}
|
||||
|
||||
#--echo *** Drop t9 ***
|
||||
|
@ -494,11 +487,10 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_skip_counter= 2
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo *** Drop t10 ***
|
||||
connection master;
|
||||
|
@ -537,11 +529,10 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_skip_counter= 2
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo *** Drop t11 ***
|
||||
connection master;
|
||||
|
@ -808,11 +799,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
|
|||
--echo *** Expect slave to fail with Error 1060 ***
|
||||
--echo ********************************************
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
--let $slave_sql_errno= 1060
|
||||
--let $slave_skip_counter= 1
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo *** Try to insert in master ****
|
||||
connection master;
|
||||
|
@ -918,11 +908,10 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
|||
--echo *** Expect slave to fail with Error 1677 ***
|
||||
--echo ********************************************
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
|
||||
--echo Slave failed with Error $errno
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_skip_counter= 2
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--echo ** DROP table t17 ***
|
||||
connection master;
|
||||
|
|
|
@ -27,8 +27,8 @@ select * from t3;
|
|||
# This FLUSH should go into the binlog to not confuse the slave.
|
||||
flush tables;
|
||||
# Check that it's in the binlog.
|
||||
let $binlog_start= $rename_event_pos;
|
||||
source include/show_binlog_events.inc;
|
||||
let $wait_binlog_event= flush tables;
|
||||
source include/wait_for_binlog_event.inc;
|
||||
|
||||
sync_slave_with_master;
|
||||
# Check that the slave is not confused.
|
||||
|
|
|
@ -68,19 +68,15 @@ eval SET DEBUG_SYNC=$debug_sync_action;
|
|||
|
||||
# Show slave last IO errno
|
||||
connection slave;
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
|
||||
--echo Check network error happened here
|
||||
if (`SELECT '$last_io_errno' = '2013' || # CR_SERVER_LOST
|
||||
'$last_io_errno' = '2003' || # CR_CONN_HOST_ERROR
|
||||
'$last_io_errno' = '2002' || # CR_CONNECTION_ERROR
|
||||
'$last_io_errno' = '2006' || # CR_SERVER_GONE_ERROR
|
||||
'$last_io_errno' = '1040' || # ER_CON_COUNT_ERROR
|
||||
'$last_io_errno' = '1053' # ER_SERVER_SHUTDOWN
|
||||
`)
|
||||
{
|
||||
--echo NETWORK ERROR
|
||||
}
|
||||
# '2013' CR_SERVER_LOST
|
||||
# '2003' CR_CONN_HOST_ERROR
|
||||
# '2002' CR_CONNECTION_ERROR
|
||||
# '2006' CR_SERVER_GONE_ERROR
|
||||
# '1040' ER_CON_COUNT_ERROR
|
||||
# '1053' ER_SERVER_SHUTDOWN
|
||||
let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013;
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
|
||||
# deactivate the sync point of get_master_version_and_clock()
|
||||
# now to avoid restarting IO-thread to re-enter it.
|
||||
|
|
|
@ -91,7 +91,7 @@ connection master;
|
|||
# Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but
|
||||
# on the slave
|
||||
#
|
||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
||||
if (`SELECT @@global.binlog_format = 'STATEMENT'`)
|
||||
{
|
||||
#flush the logs before the test
|
||||
connection slave;
|
||||
|
@ -101,27 +101,42 @@ if (`SELECT @@global.binlog_format != 'ROW'`)
|
|||
}
|
||||
|
||||
CREATE TABLE t1(a int, UNIQUE(a));
|
||||
--let $_start= query_get_value(SHOW MASTER STATUS, Position, 1)
|
||||
|
||||
INSERT DELAYED IGNORE INTO t1 VALUES(1);
|
||||
INSERT DELAYED IGNORE INTO t1 VALUES(1);
|
||||
flush table t1; # to wait for INSERT DELAYED to be done
|
||||
|
||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
||||
if (`SELECT @@global.binlog_format = 'STATEMENT'`)
|
||||
{
|
||||
#must show two INSERT DELAYED
|
||||
--replace_column 1 x 2 x 3 x 4 x 5 x
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'master-bin.000002' LIMIT 2,2;
|
||||
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||
|
||||
# The first INSERT DELAYED
|
||||
--let $stmt= query_get_value(SHOW BINLOG EVENTS IN '$binlog_file' FROM $_start, Info, 2)
|
||||
--echo $stmt
|
||||
|
||||
# The second INSERT DELAYED statement is the 3 item if two INSERT DELAYED are
|
||||
# handled together
|
||||
--let $stmt= query_get_value(SHOW BINLOG EVENTS IN '$binlog_file' FROM $_start, Info, 3)
|
||||
|
||||
# The second INSERT DELAYED statement is the 5 item if two INSERT DELAYED are
|
||||
# handled separately
|
||||
if (`SELECT '$stmt' = 'COMMIT'`)
|
||||
{
|
||||
--let $stmt= query_get_value(SHOW BINLOG EVENTS IN '$binlog_file' FROM $_start, Info, 5)
|
||||
}
|
||||
--echo $stmt
|
||||
}
|
||||
select * from t1;
|
||||
|
||||
sync_slave_with_master;
|
||||
echo On slave;
|
||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
||||
if (`SELECT @@global.binlog_format = 'STATEMENT'`)
|
||||
{
|
||||
#must show two INSERT DELAYED
|
||||
--replace_column 1 x 2 x 3 x 4 x 5 x
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'slave-bin.000002' LIMIT 2,2;
|
||||
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||
--let $binlog_limit= 1,6
|
||||
--source include/show_binlog_events.inc
|
||||
}
|
||||
select * from t1;
|
||||
|
||||
|
|
|
@ -31,19 +31,17 @@ eval create table t1 (word char(20) not null)ENGINE=$engine_type;
|
|||
--replace_result $LOAD_FILE LOAD_FILE
|
||||
eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 107 limit 1;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 107 limit 2;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 107 limit 1,4;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
let $binlog_limit= 1;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
let $binlog_limit= 2;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
let $binlog_limit= 1,4;
|
||||
source include/show_binlog_events.inc;
|
||||
let $binlog_limit=;
|
||||
flush logs;
|
||||
|
||||
# We need an extra update before doing save_master_pos.
|
||||
|
@ -84,27 +82,24 @@ connection master;
|
|||
eval create table t2 (n int)ENGINE=$engine_type;
|
||||
insert into t2 values (1);
|
||||
source include/show_binlog_events.inc;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /infile '.+'/infile 'words.dat'/
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'master-bin.000002';
|
||||
|
||||
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
--replace_column 2 #
|
||||
show binary logs;
|
||||
sync_slave_with_master;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
--replace_column 2 #
|
||||
show binary logs;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /INFILE '.+'/INFILE 'words.dat'/
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
source include/show_slave_status2.inc;
|
||||
|
||||
let $binlog_file=;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||
source include/show_binlog_events.inc;
|
||||
let $binlog_file=;
|
||||
|
||||
source include/check_slave_is_running.inc;
|
||||
|
||||
# Need to recode the following
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096
|
|||
select @@global.max_relay_log_size;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
source include/show_slave_status2.inc;
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
--echo #
|
||||
--echo # Test 2
|
||||
|
@ -55,7 +55,7 @@ set global max_relay_log_size=(5*4096);
|
|||
query_vertical select @@global.max_relay_log_size;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
source include/show_slave_status2.inc;
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
--echo #
|
||||
--echo # Test 3: max_relay_log_size = 0
|
||||
|
@ -67,7 +67,7 @@ set global max_relay_log_size=0;
|
|||
query_vertical select @@global.max_relay_log_size;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
source include/show_slave_status2.inc;
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
--echo #
|
||||
--echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
||||
|
@ -78,7 +78,6 @@ reset slave;
|
|||
# test of relay log rotation when the slave is stopped
|
||||
# (to make sure it does not crash).
|
||||
flush logs;
|
||||
source include/show_slave_status2.inc;
|
||||
|
||||
--echo #
|
||||
--echo # Test 5
|
||||
|
@ -93,10 +92,8 @@ flush logs;
|
|||
# log we just closed. But a trick to achieve this is do an update on the master.
|
||||
connection master;
|
||||
create table t1 (a int);
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
source include/show_slave_status2.inc;
|
||||
sync_slave_with_master;
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
--echo #
|
||||
--echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
||||
|
@ -105,10 +102,8 @@ source include/show_slave_status2.inc;
|
|||
flush logs;
|
||||
connection master;
|
||||
drop table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
source include/show_slave_status2.inc;
|
||||
sync_slave_with_master;
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
connection master;
|
||||
# test that the absence of relay logs does not make a master crash
|
||||
|
|
|
@ -56,24 +56,23 @@ connection master;
|
|||
--echo # since insert is done with transactional engine, expect a BEGIN
|
||||
--echo # at <start_pos>
|
||||
--echo
|
||||
--replace_result $start_pos <start_pos>
|
||||
--replace_column 5 #
|
||||
--eval show binlog events from $start_pos limit 1
|
||||
--let $binlog_start= $start_pos
|
||||
--let $binlog_limit= 1
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
--echo
|
||||
--echo # Now the insert, one step after
|
||||
--echo
|
||||
--replace_result $start_pos <start_pos>
|
||||
--replace_column 2 # 5 #
|
||||
--eval show binlog events from $start_pos limit 1,1
|
||||
--let $binlog_start= $start_pos
|
||||
--let $binlog_limit= 1,1
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
--echo
|
||||
--echo # and the COMMIT should be at <end_pos>
|
||||
--echo
|
||||
--replace_result $start_pos <start_pos> $end_pos <end_pos>
|
||||
--replace_column 2 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
--eval show binlog events from $start_pos limit 2,1
|
||||
--let $binlog_start= $start_pos
|
||||
--let $binlog_limit= 2,1
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
--echo
|
||||
|
||||
|
@ -89,18 +88,17 @@ commit;
|
|||
--source include/select_ndb_apply_status.inc
|
||||
|
||||
connection master;
|
||||
--replace_result $start_pos <start_pos>
|
||||
--replace_column 5 #
|
||||
--eval show binlog events from $start_pos limit 1
|
||||
--let $binlog_start= $start_pos
|
||||
--let $binlog_limit= 1
|
||||
--source include/show_binlog_events.inc
|
||||
--echo
|
||||
--replace_result $start_pos <start_pos>
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--eval show binlog events from $start_pos limit 1,2
|
||||
--let $binlog_start= $start_pos
|
||||
--let $binlog_limit= 1,2
|
||||
--source include/show_binlog_events.inc
|
||||
--echo
|
||||
--replace_result $start_pos <start_pos> $end_pos <end_pos>
|
||||
--replace_column 2 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
--eval show binlog events from $start_pos limit 3,1
|
||||
--let $binlog_start= $start_pos
|
||||
--let $binlog_limit= 3,1
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
--echo
|
||||
|
||||
|
|
|
@ -9,37 +9,33 @@
|
|||
# RESET SLAVE.
|
||||
|
||||
-- source include/master-slave.inc
|
||||
connection master;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
source include/show_slave_status2.inc;
|
||||
sync_slave_with_master;
|
||||
let $status_items= Master_User, Master_Host;
|
||||
source include/show_slave_status.inc;
|
||||
|
||||
stop slave;
|
||||
source include/stop_slave.inc;
|
||||
change master to master_user='test';
|
||||
source include/show_slave_status2.inc;
|
||||
source include/show_slave_status.inc;
|
||||
|
||||
reset slave;
|
||||
source include/show_slave_status2.inc;
|
||||
source include/show_slave_status.inc;
|
||||
|
||||
change master to master_user='root';
|
||||
start slave;
|
||||
source include/start_slave.inc;
|
||||
sync_with_master;
|
||||
source include/show_slave_status2.inc;
|
||||
source include/show_slave_status.inc;
|
||||
|
||||
# test of crash with temp tables & RESET SLAVE
|
||||
# (test to see if RESET SLAVE clears temp tables in memory and disk)
|
||||
stop slave;
|
||||
source include/stop_slave.inc;
|
||||
reset slave;
|
||||
start slave;
|
||||
source include/start_slave.inc;
|
||||
connection master;
|
||||
create temporary table t1 (a int);
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
stop slave;
|
||||
sync_slave_with_master;
|
||||
source include/stop_slave.inc;
|
||||
reset slave;
|
||||
start slave;
|
||||
source include/start_slave.inc;
|
||||
sync_with_master;
|
||||
show status like 'slave_open_temp_tables';
|
||||
|
||||
|
@ -48,10 +44,9 @@ show status like 'slave_open_temp_tables';
|
|||
#
|
||||
|
||||
# clearing the status
|
||||
stop slave;
|
||||
source include/stop_slave.inc;
|
||||
reset slave;
|
||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
||||
echo *** errno must be zero: $last_io_errno ***;
|
||||
source include/check_slave_no_error.inc;
|
||||
|
||||
#
|
||||
# verifying start slave resets Last_IO_Error and Last_IO_Errno.
|
||||
|
@ -59,40 +54,24 @@ echo *** errno must be zero: $last_io_errno ***;
|
|||
|
||||
change master to master_user='impossible_user_name';
|
||||
start slave;
|
||||
let $slave_io_errno= 1045;
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
||||
--disable_query_log
|
||||
eval SELECT $last_io_errno > 0 as ONE;
|
||||
--enable_query_log
|
||||
|
||||
source include/stop_slave.inc;
|
||||
stop slave;
|
||||
change master to master_user='root';
|
||||
source include/start_slave.inc;
|
||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
||||
let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
|
||||
--echo *** last errno must be zero: $last_io_errno ***
|
||||
--echo *** last error must be blank: $last_io_error ***
|
||||
source include/check_slave_no_error.inc;
|
||||
|
||||
#
|
||||
# verifying reset slave resets Last_{IO,SQL}_Err{or,no}
|
||||
#
|
||||
|
||||
source include/stop_slave.inc;
|
||||
stop slave;
|
||||
change master to master_user='impossible_user_name';
|
||||
start slave;
|
||||
let $slave_io_errno= 1045;
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
||||
--disable_query_log
|
||||
eval SELECT $last_io_errno > 0 as ONE;
|
||||
--enable_query_log
|
||||
|
||||
source include/stop_slave.inc;
|
||||
stop slave;
|
||||
reset slave;
|
||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
||||
let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
|
||||
let $last_sql_errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||
let $last_sql_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
||||
--echo *** io last errno must be zero: $last_io_errno ***
|
||||
--echo *** io last error must be blank: $last_io_error ***
|
||||
--echo *** sql last errno must be zero: $last_sql_errno ***
|
||||
--echo *** sql last error must be blank: $last_sql_error ***
|
||||
source include/check_slave_no_error.inc;
|
||||
|
|
|
@ -270,10 +270,7 @@ DELETE FROM t1;
|
|||
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||
sync_slave_with_master;
|
||||
set @@global.slave_exec_mode= default;
|
||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
||||
disable_query_log;
|
||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
||||
enable_query_log;
|
||||
source include/check_slave_is_running.inc;
|
||||
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||
|
||||
# BUG#37076: TIMESTAMP/DATETIME values are not replicated correctly
|
||||
|
@ -412,11 +409,10 @@ INSERT INTO t5 VALUES (1, "", 1);
|
|||
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
||||
disable_query_log;
|
||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
||||
enable_query_log;
|
||||
# 1677 = ER_SLAVE_CONVERSION_FAILED
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
connection master;
|
||||
RESET MASTER;
|
||||
connection slave;
|
||||
|
@ -431,11 +427,10 @@ INSERT INTO t6 VALUES (1, "", 1);
|
|||
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
||||
disable_query_log;
|
||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
||||
enable_query_log;
|
||||
# 1677 = ER_SLAVE_CONVERSION_FAILED
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
connection master;
|
||||
RESET MASTER;
|
||||
connection slave;
|
||||
|
|
|
@ -138,9 +138,7 @@ SELECT * FROM t2;
|
|||
sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
SELECT * FROM t2;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
connection master;
|
||||
INSERT INTO t9 VALUES (4);
|
||||
|
@ -149,12 +147,10 @@ sync_slave_with_master;
|
|||
connection master;
|
||||
INSERT INTO t4 VALUES (4);
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_skip_counter= 2
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
connection master;
|
||||
INSERT INTO t9 VALUES (5);
|
||||
|
@ -163,12 +159,10 @@ sync_slave_with_master;
|
|||
connection master;
|
||||
INSERT INTO t5 VALUES (5,10,25);
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_skip_counter= 2
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
connection master;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
|
@ -177,19 +171,15 @@ sync_slave_with_master;
|
|||
connection master;
|
||||
INSERT INTO t6 VALUES (6,12,36);
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
--let $slave_skip_counter= 2
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
connection master;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
sync_slave_with_master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
# Testing some tables extra field that can be null and cannot be null
|
||||
# (but have default values)
|
||||
|
|
|
@ -9,113 +9,96 @@ INSERT INTO t1 VALUES (5);
|
|||
INSERT INTO t1 VALUES (6);
|
||||
|
||||
-- echo [MASTER] ********* SOW BINLOG EVENTS IN ... *********
|
||||
let $binary_log_file= master-bin.000001;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [MASTER] ********* SOW BINLOG EVENTS *********
|
||||
let $binary_log_file= ;
|
||||
let $binlog_file= ;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [MASTER] ********* SOW BINLOG EVENTS ... LIMIT rows *********
|
||||
let $binary_log_file= ;
|
||||
let $binary_log_limit_row= 3;
|
||||
let $binlog_limit= 3;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [MASTER] ********* SOW BINLOG EVENTS ... LIMIT offset,rows *********
|
||||
let $binary_log_file= ;
|
||||
let $binary_log_limit_row= 4;
|
||||
let $binary_log_limit_offset= 1;
|
||||
let $binlog_limit= 1,4;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
# clear show_binlog_event/show_relaylog_events parameters
|
||||
let $binary_log_file= ;
|
||||
let $binary_log_limit_row= ;
|
||||
let $binary_log_limit_offset= ;
|
||||
let $binlog_limit= ;
|
||||
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- echo [SLAVE] ********* SOW BINLOG EVENTS IN ... *********
|
||||
let $binary_log_file= slave-bin.000001;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [SLAVE] ********* SOW BINLOG EVENTS *********
|
||||
let $binary_log_file= ;
|
||||
let $binlog_file= ;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [SLAVE] ********* SOW BINLOG EVENTS ... LIMIT rows *********
|
||||
let $binary_log_file= ;
|
||||
let $binary_log_limit_row= 3;
|
||||
let $binlog_limit= 3;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [SLAVE] ********* SOW BINLOG EVENTS ... LIMIT offset,rows *********
|
||||
let $binary_log_file= ;
|
||||
let $binary_log_limit_row= 4;
|
||||
let $binary_log_limit_offset= 1;
|
||||
let $binlog_limit= 1,4;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
# clear show_binlog_event/show_relaylog_events parameters
|
||||
let $binary_log_file= ;
|
||||
let $binary_log_limit_row= ;
|
||||
let $binary_log_limit_offset= ;
|
||||
let $binlog_limit= ;
|
||||
|
||||
-- echo [SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
|
||||
let $binary_log_file= slave-relay-bin.000003;
|
||||
let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
|
||||
-- source include/show_relaylog_events.inc
|
||||
|
||||
-- echo [SLAVE] ********* SOW RELAYLOG EVENTS *********
|
||||
let $binary_log_file= ;
|
||||
let $binlog_file= ;
|
||||
-- source include/show_relaylog_events.inc
|
||||
|
||||
-- echo [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows *********
|
||||
let $binary_log_file= slave-relay-bin.000003;
|
||||
let $binary_log_limit_row= 3;
|
||||
let $binary_log_limit_offset= ;
|
||||
let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
|
||||
let $binlog_limit= 3;
|
||||
-- source include/show_relaylog_events.inc
|
||||
|
||||
-- echo [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows *********
|
||||
let $binary_log_file= slave-relay-bin.000003;
|
||||
let $binary_log_limit_offset= 1;
|
||||
let $binary_log_limit_row= 3;
|
||||
let $binlog_limit= 1,3;
|
||||
-- source include/show_relaylog_events.inc
|
||||
|
||||
FLUSH LOGS;
|
||||
let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
|
||||
|
||||
-- connection master
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
|
||||
# clear show_binlog_event/show_relaylog_events parameters
|
||||
let $binary_log_file= ;
|
||||
let $binary_log_limit_row= ;
|
||||
let $binary_log_limit_offset= ;
|
||||
let $binlog_file= ;
|
||||
let $binlog_limit= ;
|
||||
|
||||
-- echo [MASTER] ********* SOW BINLOG EVENTS IN ... *********
|
||||
let $binary_log_file= master-bin.000002;
|
||||
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [MASTER] ********* SOW BINLOG EVENTS *********
|
||||
let $binary_log_file= ;
|
||||
let $binlog_file= ;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- echo [SLAVE] ********* SOW BINLOG EVENTS IN ... *********
|
||||
let $binary_log_file= slave-bin.000002;
|
||||
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [SLAVE] ********* SOW BINLOG EVENTS *********
|
||||
let $binary_log_file= ;
|
||||
let $binlog_file= ;
|
||||
-- source include/show_binlog_events.inc
|
||||
|
||||
-- echo [SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
|
||||
let $binary_log_file= slave-relay-bin.000005;
|
||||
-- source include/show_relaylog_events.inc
|
||||
|
||||
-- echo [SLAVE] ********* SOW RELAYLOG EVENTS *********
|
||||
let $binary_log_file= ;
|
||||
let $binlog_file= ;
|
||||
-- source include/show_relaylog_events.inc
|
||||
|
||||
# clear show_binlog_event/show_relaylog_events parameters
|
||||
let $binary_log_name= ;
|
||||
let $binary_log_limit_row= ;
|
||||
let $binary_log_limit_offset= ;
|
||||
let $binlog_file= ;
|
||||
let $binlog_limit= ;
|
||||
|
|
18
mysql-test/include/check_slave_is_running.inc
Normal file
18
mysql-test/include/check_slave_is_running.inc
Normal file
|
@ -0,0 +1,18 @@
|
|||
# ==== Purpose ====
|
||||
#
|
||||
# Assert that the slave threads are running and don't have any errors.
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# --source include/check_slave_running.inc
|
||||
|
||||
--echo Checking that both slave threads are running.
|
||||
|
||||
--let $slave_sql_running = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1)
|
||||
--let $slave_io_running = query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1)
|
||||
|
||||
if (`SELECT '$slave_sql_running' != 'Yes' OR '$slave_io_running' != 'Yes'`) {
|
||||
--echo Slave not running: Slave_SQL_Running = $slave_sql_running Slave_IO_Running = $slave_io_running
|
||||
--source include/show_rpl_debug_info.inc
|
||||
--die Expected slave to be running, but it was not running.
|
||||
}
|
17
mysql-test/include/check_slave_no_error.inc
Normal file
17
mysql-test/include/check_slave_no_error.inc
Normal file
|
@ -0,0 +1,17 @@
|
|||
# ==== Purpose ====
|
||||
#
|
||||
# Assert that Slave_SQL_Error and Slave_IO_Error are empty.
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# --let $slave_param= Exec_Master_Log_Pos
|
||||
# --let $slave_param_value= 4711
|
||||
# --source include/check_slave_running.inc
|
||||
|
||||
--let $slave_param= Last_SQL_Errno
|
||||
--let $slave_param_value= 0
|
||||
--source include/check_slave_param.inc
|
||||
|
||||
--let $slave_param= Last_IO_Errno
|
||||
--let $slave_param_value= 0
|
||||
--source include/check_slave_param.inc
|
16
mysql-test/include/check_slave_param.inc
Normal file
16
mysql-test/include/check_slave_param.inc
Normal file
|
@ -0,0 +1,16 @@
|
|||
# ==== Purpose ====
|
||||
#
|
||||
# Assert that a given column in SHOW SLAVE STATUS has a given value.
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# --let $slave_param= Exec_Master_Log_Pos
|
||||
# --let $slave_param_value= 4711
|
||||
# --source include/check_slave_param.inc
|
||||
|
||||
--let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1)
|
||||
if (`SELECT '$_param_value' != '$slave_param_value'`) {
|
||||
--echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
|
||||
--source include/show_rpl_debug_info.inc
|
||||
--die Wrong value for slave parameter
|
||||
}
|
70
mysql-test/include/get_relay_log_pos.inc
Normal file
70
mysql-test/include/get_relay_log_pos.inc
Normal file
|
@ -0,0 +1,70 @@
|
|||
# For a given event which is at position $master_log_pos in the the master's
|
||||
# binary log, returns its position in the slave's relay log file
|
||||
# $relay_log_file.
|
||||
# The position is stored in the variable $relay_log_pos.
|
||||
|
||||
# Usage:
|
||||
# let $relay_log_file= 'relay-log-bin.000001';
|
||||
# let $master_log_pos= 106;
|
||||
# source include/get_relay_log_pos.inc;
|
||||
# # at this point, get_relay_log_pos.inc sets $relay_log_pos. echo position
|
||||
# # in $relay_log_file: $relay_log_pos.
|
||||
|
||||
if (`SELECT '$relay_log_file' = ''`)
|
||||
{
|
||||
--die 'variable $relay_log_file is null'
|
||||
}
|
||||
|
||||
if (`SELECT '$master_log_pos' = ''`)
|
||||
{
|
||||
--die 'variable $master_log_pos is null'
|
||||
}
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
let $_suffix= `SELECT UUID()`;
|
||||
let $_tmp_file= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.$_suffix;
|
||||
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/$relay_log_file > $_tmp_file
|
||||
|
||||
# All queries in this file should not be logged.
|
||||
--disable_query_log
|
||||
|
||||
--disable_warnings
|
||||
DROP TEMPORARY TABLE IF EXISTS mysqlbinlog_events;
|
||||
DROP TEMPORARY TABLE IF EXISTS events_at;
|
||||
DROP TEMPORARY TABLE IF EXISTS events_pos;
|
||||
CREATE TEMPORARY TABLE mysqlbinlog_events(c1 INT AUTO_INCREMENT KEY, c2 varchar(256));
|
||||
|
||||
# Event position is in the comments output by mysqlbinlog, we load this
|
||||
# comments into the table
|
||||
# '# at 106'
|
||||
# '# .... end_log_pos 46'
|
||||
eval LOAD DATA LOCAL INFILE '$_tmp_file' INTO TABLE mysqlbinlog_events
|
||||
LINES STARTING BY '#' (c2) SET c1 = NULL;
|
||||
--enable_warnings
|
||||
|
||||
# Event pos in relay log file is inserted into table events_at
|
||||
CREATE TEMPORARY TABLE events_at(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
|
||||
SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE ' at%' ORDER BY c1;
|
||||
|
||||
# Event pos in master log file is inserted into table events_pos
|
||||
CREATE TEMPORARY TABLE events_pos(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
|
||||
SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE '% end_log_pos %' ORDER BY c1;
|
||||
|
||||
# events_at events_pos
|
||||
# c1------c2-------------------------- c1------c2------------------------
|
||||
# 1 ev1's begin pos in relay log 1 ev1's end pos in master log
|
||||
# 2 ev2's begin pos in relay log 2 ev2's end pos in master log
|
||||
# 3 ev3's begin pos in relay log 3 ev3's end pos in master log
|
||||
# events always keep the same sequence.
|
||||
# Because event[N]'s end pos is equal to event[N+1]'s begin pos we want to
|
||||
# find event's end pos in relay log, we can find the right relay_log_pos
|
||||
# using the relationship that 'events_pos.c1 = events_at.c1 + 1'
|
||||
#
|
||||
# There is a fault that we can't get the relay log position of the last event,
|
||||
# as it is not output by mysqlbinlog
|
||||
let $relay_log_pos= `SELECT SUBSTRING(a.c2, 5)
|
||||
FROM events_at a, events_pos b
|
||||
WHERE a.c1=b.c1+1 and b.c2 LIKE '% $master_log_pos%'`;
|
||||
DROP TEMPORARY TABLE mysqlbinlog_events, events_at, events_pos;
|
||||
--remove_file $_tmp_file
|
||||
--enable_query_log
|
3
mysql-test/include/not_parallel.inc
Normal file
3
mysql-test/include/not_parallel.inc
Normal file
|
@ -0,0 +1,3 @@
|
|||
if (`SELECT '$MTR_PARALLEL' > 1`) {
|
||||
--skip test requires --parallel=1
|
||||
}
|
|
@ -80,9 +80,8 @@ eval INSERT INTO t1 SET f1= $MAX + 1;
|
|||
SELECT MAX(f1) FROM t1;
|
||||
if ($show_binlog)
|
||||
{
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
||||
--let $binlog_file= master-bin.$_log_num_s
|
||||
--source include/show_binlog_events.inc
|
||||
}
|
||||
sync_slave_with_master;
|
||||
|
||||
|
@ -93,9 +92,8 @@ connection slave;
|
|||
SELECT MAX(f1) FROM t1;
|
||||
if ($show_binlog)
|
||||
{
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
||||
--let $binlog_file= slave-bin.$_log_num_s
|
||||
--source include/show_binlog_events.inc
|
||||
}
|
||||
|
||||
###############################################################
|
||||
|
@ -111,9 +109,8 @@ let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT;
|
|||
SELECT MAX(f1) FROM t1;
|
||||
if ($show_binlog)
|
||||
{
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
||||
--let $binlog_file= master-bin.$_log_num_s
|
||||
--source include/show_binlog_events.inc
|
||||
}
|
||||
sync_slave_with_master;
|
||||
|
||||
|
@ -124,9 +121,8 @@ connection slave;
|
|||
SELECT MAX(f1) FROM t1;
|
||||
if ($show_binlog)
|
||||
{
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
||||
--let $binlog_file= slave-bin.$_log_num_s
|
||||
--source include/show_binlog_events.inc
|
||||
}
|
||||
|
||||
###############################################################
|
||||
|
@ -150,9 +146,8 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ',
|
|||
--enable_query_log
|
||||
if ($show_binlog)
|
||||
{
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
||||
--let $binlog_file= master-bin.$_log_num_s
|
||||
--source include/show_binlog_events.inc
|
||||
}
|
||||
sync_slave_with_master;
|
||||
|
||||
|
@ -171,9 +166,8 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ',
|
|||
--enable_query_log
|
||||
if ($show_binlog)
|
||||
{
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
||||
--let $binlog_file= slave-bin.$_log_num_s
|
||||
--source include/show_binlog_events.inc
|
||||
}
|
||||
|
||||
###############################################################
|
||||
|
|
|
@ -1,35 +1,21 @@
|
|||
# $binlog_start can be set by caller or take a default value
|
||||
# $binary_log_file the name of the log file show
|
||||
# $binary_log_limit_row - sets the number of binlog rows to be returned
|
||||
# $binary_log_limit_offset - sets the offset where to start returning events
|
||||
##############################################################################
|
||||
# Show binary log events
|
||||
#
|
||||
# Useage:
|
||||
# let $binlog_file= master-bin.000002;
|
||||
# let $binlog_start= 106;
|
||||
# let $binlog_limit= 1, 3;
|
||||
# source include/show_binlog_events.inc;
|
||||
#
|
||||
# It shows the first binary log file if $binlog_file is not given.
|
||||
#
|
||||
# It shows events from the end position of the description event if
|
||||
# $binlog_start is not given.
|
||||
#
|
||||
# It shows all of the events if $binlog_limit is not given.
|
||||
# $binlog_format has the same semantic with 'LIMIT' option.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
let $show_binlog_events= show binlog events;
|
||||
|
||||
if (!$binlog_start)
|
||||
{
|
||||
# defaults to chop the first event in the binary log
|
||||
let $binlog_start=107;
|
||||
}
|
||||
|
||||
if (!`SELECT '$binary_log_file' = ''`)
|
||||
{
|
||||
let $show_binlog_events= $show_binlog_events in '$binary_log_file';
|
||||
}
|
||||
let $show_binlog_events= $show_binlog_events from $binlog_start;
|
||||
|
||||
if ($binary_log_limit_row)
|
||||
{
|
||||
let $limit= limit;
|
||||
if ($binary_log_limit_offset)
|
||||
{
|
||||
let $limit= $limit $binary_log_limit_offset, ;
|
||||
}
|
||||
|
||||
let $limit= $limit $binary_log_limit_row;
|
||||
let $show_binlog_events= $show_binlog_events $limit;
|
||||
}
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
|
||||
--eval $show_binlog_events
|
||||
--let $is_relay_log= 0
|
||||
--source include/show_events.inc
|
||||
|
|
36
mysql-test/include/show_events.inc
Normal file
36
mysql-test/include/show_events.inc
Normal file
|
@ -0,0 +1,36 @@
|
|||
##############################################################################
|
||||
# It's an auxiliary file used to show binary log events or relay log events.
|
||||
# It is only called by show_binlog_events.inc and show_relaylog_events.inc.
|
||||
##############################################################################
|
||||
|
||||
if (!$binlog_start)
|
||||
{
|
||||
# If $binlog_start is not set, we will set it as the second event's
|
||||
# position. The first event(Description Event) is always ignored. For
|
||||
# description event's length might be changed because of adding new events,
|
||||
# 'SHOW BINLOG EVENTS LIMIT 1' is used to get the right value.
|
||||
--let $binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
|
||||
}
|
||||
|
||||
--let $_statement=show binlog events
|
||||
if ($is_relay_log)
|
||||
{
|
||||
--let $_statement=show relaylog events
|
||||
}
|
||||
|
||||
if (`SELECT '$binlog_file' <> ''`)
|
||||
{
|
||||
--let $_statement= $_statement in '$binlog_file'
|
||||
}
|
||||
|
||||
--let $_statement= $_statement from $binlog_start
|
||||
|
||||
if (`SELECT '$binlog_limit' <> ''`)
|
||||
{
|
||||
--let $_statement= $_statement limit $binlog_limit
|
||||
}
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /Server ver:.*$/SERVER_VERSION, BINLOG_VERSION/
|
||||
--eval $_statement
|
|
@ -1,35 +1,21 @@
|
|||
# $binlog_start can be set by caller or take a default value
|
||||
# $binary_log_file the name of the log file show
|
||||
# $binary_log_limit_row - sets the number of binlog rows to be returned
|
||||
# $binary_log_limit_offset - sets the offset where to start returning events
|
||||
##############################################################################
|
||||
# Show relay log events
|
||||
#
|
||||
# Useage:
|
||||
# let $binlog_file= slave-relay-bin.000002;
|
||||
# let $binlog_start= 106;
|
||||
# let $binlog_limit= 1, 3;
|
||||
# source include/show_relaylog_events.inc;
|
||||
#
|
||||
# It shows the first relay log file if $binlog_file is not given.
|
||||
#
|
||||
# It shows events from the end position of the description event if
|
||||
# $binlog_start is not given.
|
||||
#
|
||||
# It shows all of the events if $binlog_limit is not given.
|
||||
# $binlog_format has the same semantic with 'LIMIT' option.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
let $show_binlog_events= show relaylog events;
|
||||
|
||||
if (!$binlog_start)
|
||||
{
|
||||
# defaults to chop the first event in the binary log
|
||||
let $binlog_start=106;
|
||||
}
|
||||
|
||||
if (!`SELECT '$binary_log_file' = ''`)
|
||||
{
|
||||
let $show_binlog_events= $show_binlog_events in '$binary_log_file';
|
||||
}
|
||||
let $show_binlog_events= $show_binlog_events from $binlog_start;
|
||||
|
||||
if ($binary_log_limit_row)
|
||||
{
|
||||
let $limit= limit;
|
||||
if ($binary_log_limit_offset)
|
||||
{
|
||||
let $limit= $limit $binary_log_limit_offset, ;
|
||||
}
|
||||
|
||||
let $limit= $limit $binary_log_limit_row;
|
||||
let $show_binlog_events= $show_binlog_events $limit;
|
||||
}
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /Server ver:.*$/SERVER_VERSION, BINLOG_VERSION/
|
||||
--eval $show_binlog_events
|
||||
--let $is_relay_log= 1
|
||||
--source include/show_events.inc
|
||||
|
|
|
@ -36,6 +36,7 @@ let $_con= $CURRENT_CONNECTION;
|
|||
--echo
|
||||
--echo [on $_con]
|
||||
--echo
|
||||
SELECT NOW();
|
||||
--echo **** SHOW SLAVE STATUS on $_con ****
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
--echo
|
||||
|
@ -70,6 +71,7 @@ if (`SELECT '$_master_con' != ''`)
|
|||
--echo [on $_master_con]
|
||||
connection $_master_con;
|
||||
--echo
|
||||
SELECT NOW();
|
||||
--echo **** SHOW MASTER STATUS on $_master_con ****
|
||||
query_vertical SHOW MASTER STATUS;
|
||||
--echo
|
||||
|
|
|
@ -1,6 +1,25 @@
|
|||
# Include file to show the slave status, masking out some information
|
||||
# that varies depending on where the test is executed.
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
--let $_items=$status_items
|
||||
if (`SELECT "XX$status_items" = "XX"`)
|
||||
{
|
||||
--die 'Variable status_items is NULL'
|
||||
}
|
||||
|
||||
--disable_query_log
|
||||
--vertical_results
|
||||
|
||||
while (`SELECT "XX$_items" <> "XX"`)
|
||||
{
|
||||
--let $_name= `SELECT SUBSTRING_INDEX('$_items', ',', 1)`
|
||||
--let $_items= `SELECT LTRIM(SUBSTRING('$_items', LENGTH('$_name') + 2))`
|
||||
|
||||
--let $_value= query_get_value(SHOW SLAVE STATUS, $_name, 1)
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
--eval SELECT "$_value" AS $_name
|
||||
}
|
||||
|
||||
--horizontal_results
|
||||
--enable_query_log
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
# Include file to show the slave status, masking out some information
|
||||
# that varies depending on where the test is executed.
|
||||
|
||||
# masked out log positions
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $DEFAULT_MASTER_PORT 3306
|
||||
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
|
@ -22,10 +22,9 @@ eval $test_insert;
|
|||
|
||||
connection slave;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
|
||||
# The following should be 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
|
|
@ -18,7 +18,7 @@ while (`SELECT INSTR("$_last_event","$wait_binlog_event") = 0`)
|
|||
dec $_loop_count;
|
||||
if (!$_loop_count)
|
||||
{
|
||||
SHOW BINLOG EVENTS;
|
||||
--source include/show_rpl_debug_info.inc
|
||||
--die ERROR: failed while waiting for $wait_binlog_event in binlog
|
||||
}
|
||||
real_sleep 0.1;
|
||||
|
|
|
@ -1,23 +1,59 @@
|
|||
# ==== Purpose ====
|
||||
#
|
||||
# Waits until the IO thread of the current connection has got an
|
||||
# error, or until a timeout is reached.
|
||||
# error, or until a timeout is reached. Also waits until the IO
|
||||
# thread has completely stopped.
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# # Wait several errors.
|
||||
# let $slave_io_errno= 1, 2, 3;
|
||||
# source include/wait_for_slave_io_error.inc;
|
||||
#
|
||||
# Parameters to this macro are $slave_timeout and
|
||||
# $slave_keep_connection. See wait_for_slave_param.inc for
|
||||
# descriptions.
|
||||
# # Print error message
|
||||
# let $slave_io_errno= 1;
|
||||
# let $show_slave_io_error= 1;
|
||||
# source include/wait_for_slave_io_error.inc;
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# $slave_io_errno
|
||||
# The expected IO error numbers. This is required.
|
||||
# (After BUG#41956 has been fixed, this will be required to be a
|
||||
# symbolic name instead of a numbers.)
|
||||
#
|
||||
# $show_slave_io_error
|
||||
# If set, will print the error to the query log.
|
||||
#
|
||||
# $slave_timeout
|
||||
# See wait_for_slave_param.inc for description.
|
||||
#
|
||||
# $master_connection
|
||||
# See wait_for_slave_param.inc for description.
|
||||
|
||||
if (`SELECT '$slave_io_errno' = ''`) {
|
||||
--die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc
|
||||
}
|
||||
|
||||
let $old_slave_param_comparison= $slave_param_comparison;
|
||||
|
||||
let $slave_param= Last_IO_Errno;
|
||||
let $slave_param_comparison= !=;
|
||||
let $slave_param_value= 0;
|
||||
let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
|
||||
source include/wait_for_slave_param.inc;
|
||||
let $slave_error_message= ;
|
||||
|
||||
let $slave_param_comparison= $old_slave_param_comparison;
|
||||
|
||||
let $_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
||||
if (`SELECT $_error NOT IN ($slave_io_errno)`) {
|
||||
--echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) ****
|
||||
source include/show_rpl_debug_info.inc;
|
||||
--echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) ****
|
||||
--die Slave stopped with wrong error code
|
||||
}
|
||||
|
||||
if ($show_slave_io_error)
|
||||
{
|
||||
let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1);
|
||||
echo Last_IO_Error = $error;
|
||||
}
|
||||
|
|
|
@ -80,5 +80,5 @@ if (!$_slave_timeout_counter)
|
|||
--echo Current connection is '$CURRENT_CONNECTION'
|
||||
echo Note: the following output may have changed since the failure was detected;
|
||||
source include/show_rpl_debug_info.inc;
|
||||
exit;
|
||||
die;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
# The expected SQL error number. This is required.
|
||||
# (After BUG#41956 has been fixed, this will be required to be a
|
||||
# symbolic name instead of a number.)
|
||||
#
|
||||
# $show_slave_sql_error
|
||||
# If set, will print the error to the query log.
|
||||
#
|
||||
# $slave_timeout
|
||||
# See wait_for_slave_param.inc for description.
|
||||
|
@ -22,8 +25,7 @@
|
|||
# See wait_for_slave_param.inc for description.
|
||||
|
||||
if (`SELECT '$slave_sql_errno' = ''`) {
|
||||
--echo !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_fro_slave_sql_error.inc
|
||||
exit;
|
||||
--die !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_for_slave_sql_error.inc
|
||||
}
|
||||
|
||||
let $slave_param= Slave_SQL_Running;
|
||||
|
@ -33,7 +35,14 @@ source include/wait_for_slave_param.inc;
|
|||
|
||||
let $_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||
if (`SELECT '$_error' != '$slave_sql_errno'`) {
|
||||
--echo Slave stopped with wrong error code: $_error (expected $slave_sql_errno)
|
||||
--echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) ****
|
||||
source include/show_rpl_debug_info.inc;
|
||||
exit;
|
||||
--echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) ****
|
||||
--die Slave stopped with wrong error code
|
||||
}
|
||||
|
||||
if ($show_slave_sql_error)
|
||||
{
|
||||
let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
||||
echo Last_SQL_Error = $error;
|
||||
}
|
||||
|
|
|
@ -22,17 +22,30 @@
|
|||
#
|
||||
# $master_connection
|
||||
# See wait_for_slave_param.inc for description.
|
||||
#
|
||||
# $slave_skip_counter
|
||||
# If set, skip this number of events. If not set, skip one event.
|
||||
#
|
||||
# $not_switch_connection If set, don't switch to slave and don't switch back
|
||||
# master.
|
||||
#
|
||||
|
||||
echo --source include/wait_for_slave_sql_error_and_skip.inc;
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_error.inc;
|
||||
if ($show_sql_error)
|
||||
if (!$not_switch_connection)
|
||||
{
|
||||
let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
||||
echo Last_SQL_Error = $error;
|
||||
connection slave;
|
||||
}
|
||||
source include/wait_for_slave_sql_error.inc;
|
||||
|
||||
# skip the erroneous statement
|
||||
set global sql_slave_skip_counter=1;
|
||||
if ($slave_skip_counter) {
|
||||
eval SET GLOBAL SQL_SLAVE_SKIP_COUNTER= $slave_skip_counter;
|
||||
}
|
||||
if (!$slave_skip_counter) {
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
}
|
||||
source include/start_slave.inc;
|
||||
connection master;
|
||||
if (!$not_switch_connection)
|
||||
{
|
||||
connection master;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
if (`SELECT STRCMP('$status_type', '') * STRCMP(UPPER('$status_type'), 'SESSION') * STRCMP(UPPER('$status_type'), 'GLOBAL')`)
|
||||
{
|
||||
--echo **** ERROR: Unknown type of variable status_type: allowed values are: SESSION or GLOBAL ****
|
||||
exit;
|
||||
die;
|
||||
}
|
||||
|
||||
let $_status_timeout_counter= $status_timeout;
|
||||
|
@ -60,7 +60,7 @@ while (`SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_va
|
|||
--echo **** Showing STATUS, PROCESSLIST ****
|
||||
eval SHOW $status_type STATUS LIKE '$status_var';
|
||||
SHOW PROCESSLIST;
|
||||
exit;
|
||||
die;
|
||||
}
|
||||
dec $_status_timeout_counter;
|
||||
sleep 0.1;
|
||||
|
|
|
@ -122,5 +122,6 @@ if (!$success)
|
|||
--echo # Timeout in wait_until_count_sessions.inc
|
||||
--echo # Number of sessions expected: <= $count_sessions found: $current_sessions
|
||||
SHOW PROCESSLIST;
|
||||
--die Timeout in wait_until_count_sessions.inc
|
||||
}
|
||||
|
||||
|
|
|
@ -769,11 +769,13 @@ sub collect_one_test_case {
|
|||
# Check for disabled tests
|
||||
# ----------------------------------------------------------------------
|
||||
my $marked_as_disabled= 0;
|
||||
if ( $disabled->{$tname} )
|
||||
if ( $disabled->{$tname} or $disabled->{"$suitename.$tname"} )
|
||||
{
|
||||
# Test was marked as disabled in suites disabled.def file
|
||||
$marked_as_disabled= 1;
|
||||
$tinfo->{'comment'}= $disabled->{$tname};
|
||||
# Test name may have been disabled with or without suite name part
|
||||
$tinfo->{'comment'}= $disabled->{$tname} ||
|
||||
$disabled->{"$suitename.$tname"};
|
||||
}
|
||||
|
||||
my $disabled_file= "$testdir/$tname.disabled";
|
||||
|
|
|
@ -264,8 +264,9 @@ sub spawn_parent_impl {
|
|||
if ( $timer_name eq "suite" )
|
||||
{
|
||||
# We give up here
|
||||
# FIXME we should only give up the suite, not all of the run?
|
||||
print STDERR "\n";
|
||||
kill(9, $pid); # Kill mysqltest
|
||||
mtr_kill_leftovers(); # Kill servers the hard way
|
||||
mtr_error("Test suite timeout");
|
||||
}
|
||||
elsif ( $timer_name eq "testcase" )
|
||||
|
|
|
@ -362,6 +362,7 @@ sub main {
|
|||
$opt_parallel= 1 if ($opt_parallel < 1);
|
||||
mtr_report("Using parallel: $opt_parallel");
|
||||
}
|
||||
$ENV{MTR_PARALLEL} = $opt_parallel;
|
||||
|
||||
# Create server socket on any free port
|
||||
my $server = new IO::Socket::INET
|
||||
|
@ -1826,7 +1827,7 @@ sub find_plugin($$)
|
|||
mtr_file_exists(vs_config_dirs($location,$plugin_filename),
|
||||
"$basedir/lib/plugin/".$plugin_filename,
|
||||
"$basedir/$location/.libs/".$plugin_filename,
|
||||
"$basedir/lib/mysql/plugin/".$plugin_filename,
|
||||
"$basedir/lib/mysql/plugin/".$plugin_filename,
|
||||
);
|
||||
return $lib_example_plugin;
|
||||
}
|
||||
|
@ -1943,6 +1944,16 @@ sub environment_setup {
|
|||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Add the paths where mysqld will find archive/blackhole/federated plugins.
|
||||
# ----------------------------------------------------
|
||||
$ENV{'ARCHIVE_PLUGIN_DIR'} =
|
||||
dirname(find_plugin("ha_archive", "storage/archive"));
|
||||
$ENV{'BLACKHOLE_PLUGIN_DIR'} =
|
||||
dirname(find_plugin("ha_blackhole", "storage/blackhole"));
|
||||
$ENV{'FEDERATED_PLUGIN_DIR'} =
|
||||
dirname(find_plugin("ha_federated", "storage/federated"));
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Add the path where mysqld will find mypluglib.so
|
||||
# ----------------------------------------------------
|
||||
|
|
|
@ -12,11 +12,11 @@ alter table t1 enable keys;;
|
|||
insert into t2 values (1);
|
||||
insert into t1 values (1, 1, 1);
|
||||
set session debug="-d,sleep_alter_enable_indexes";
|
||||
show binlog events in 'master-bin.000001' from 106;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
|
||||
master-bin.000001 # Query 1 # use `test`; alter table t1 enable keys
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values (1, 1, 1)
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 values (1)
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 enable keys
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (1, 1, 1)
|
||||
drop tables t1, t2;
|
||||
End of 5.0 tests
|
||||
drop table if exists t1, t2, t3;
|
||||
|
@ -41,17 +41,17 @@ alter table t2 change c vc varchar(100) default 'Test2', rename to t1;;
|
|||
rename table t1 to t3;
|
||||
drop table t3;
|
||||
set session debug="-d,sleep_alter_before_main_binlog";
|
||||
show binlog events in 'master-bin.000001' from 106;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; alter table t1 change i c char(10) default 'Test1'
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values ()
|
||||
master-bin.000001 # Query 1 # use `test`; alter table t1 change c vc varchar(100) default 'Test2'
|
||||
master-bin.000001 # Query 1 # use `test`; rename table t1 to t2
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (i int)
|
||||
master-bin.000001 # Query 1 # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t2 values ()
|
||||
master-bin.000001 # Query 1 # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
|
||||
master-bin.000001 # Query 1 # use `test`; rename table t1 to t3
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t3
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test1'
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values ()
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 change c vc varchar(100) default 'Test2'
|
||||
master-bin.000001 # Query # # use `test`; rename table t1 to t2
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (i int)
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 values ()
|
||||
master-bin.000001 # Query # # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
|
||||
master-bin.000001 # Query # # use `test`; rename table t1 to t3
|
||||
master-bin.000001 # Query # # use `test`; drop table t3
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -175,12 +175,12 @@ t2 CREATE TABLE `t2` (
|
|||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t2;
|
||||
show binlog events in 'master-bin.000001' from 106;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values (1)
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (1)
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
create table t1 (i int);
|
||||
set session debug="-d,sleep_create_like_before_check_if_exists:+d,sleep_create_like_before_copy";
|
||||
create table t2 like t1;;
|
||||
|
@ -197,11 +197,11 @@ reset master;
|
|||
create table t2 like t1;;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
show binlog events in 'master-bin.000001' from 106;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
create table t1 (i int);
|
||||
set session debug="-d,sleep_create_like_before_copy:+d,sleep_create_like_before_ha_create";
|
||||
reset master;
|
||||
|
@ -213,16 +213,16 @@ drop table t2;
|
|||
create table t2 like t1;;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
show binlog events in 'master-bin.000001' from 106;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 values (1)
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
create table t1 (i int);
|
||||
set session debug="-d,sleep_create_like_before_ha_create:+d,sleep_create_like_before_binlogging";
|
||||
reset master;
|
||||
|
@ -234,14 +234,14 @@ drop table t2;
|
|||
create table t2 like t1;;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
show binlog events in 'master-bin.000001' from 106;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 values (1)
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t1
|
||||
master-bin.000001 # Query # # use `test`; drop table t2
|
||||
set session debug="-d,sleep_create_like_before_binlogging";
|
||||
|
|
|
@ -32,28 +32,22 @@ HEX(s1) HEX(s2) d
|
|||
466F6F2773206120426172 ED40ED41ED42 47.93
|
||||
DROP PROCEDURE bug18293|
|
||||
DROP TABLE t4|
|
||||
SHOW BINLOG EVENTS FROM 514|
|
||||
show binlog events from <binlog_start>|
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 514 Query 1 581 BEGIN
|
||||
master-bin.000001 581 Query 1 788 use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Error in Log_event::read_log_event()' COLLATE 'latin1_swedish_ci'))
|
||||
master-bin.000001 788 Query 1 856 COMMIT
|
||||
master-bin.000001 856 Query 1 923 BEGIN
|
||||
master-bin.000001 923 Query 1 1191 use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT' COLLATE 'latin1_swedish_ci'))
|
||||
master-bin.000001 1191 Query 1 1259 COMMIT
|
||||
master-bin.000001 1259 Query 1 1422 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
|
||||
s2 CHAR(50) CHARACTER SET cp932,
|
||||
d DECIMAL(10,2))
|
||||
master-bin.000001 1422 Query 1 1668 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50),
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50),
|
||||
IN ins2 CHAR(50) CHARACTER SET cp932,
|
||||
IN ind DECIMAL(10,2))
|
||||
BEGIN
|
||||
INSERT INTO t4 VALUES (ins1, ins2, ind);
|
||||
END
|
||||
master-bin.000001 1668 Query 1 1736 BEGIN
|
||||
master-bin.000001 1736 Query 1 2000 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
|
||||
master-bin.000001 2000 Query 1 2069 COMMIT
|
||||
master-bin.000001 2069 Query 1 2155 use `test`; DROP PROCEDURE bug18293
|
||||
master-bin.000001 2155 Query 1 2231 use `test`; DROP TABLE t4
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP PROCEDURE bug18293
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t4
|
||||
End of 5.0 tests
|
||||
SHOW BINLOG EVENTS FROM 490;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
|
||||
|
|
|
@ -39,5 +39,14 @@ a
|
|||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string
|
||||
#
|
||||
CREATE TABLE t1(a BLOB);
|
||||
SET SESSION debug="+d,bug42064_simulate_oom";
|
||||
INSERT INTO t1 VALUES("");
|
||||
Got one of the listed errors
|
||||
SET SESSION debug=DEFAULT;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
|
|
@ -258,4 +258,17 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #48573: difference of index selection between rpm binary and
|
||||
# .tar.gz, windows vs linux..
|
||||
#
|
||||
CREATE TABLE t1(c1 INT, c2 INT, c4 INT, c5 INT, KEY(c2, c5), KEY(c2, c4, c5));
|
||||
INSERT INTO t1 VALUES(4, 1, 1, 1);
|
||||
INSERT INTO t1 VALUES(3, 1, 1, 1);
|
||||
INSERT INTO t1 VALUES(2, 1, 1, 1);
|
||||
INSERT INTO t1 VALUES(1, 1, 1, 1);
|
||||
EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c2,c2_2 c2 10 const,const 3 Using where
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
|
|
|
@ -10,15 +10,13 @@ SELECT 1;
|
|||
1
|
||||
# Switch to connection con2
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 107
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# Switch to connection con1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
# Switch to connection con2
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 107
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
UNLOCK TABLES;
|
||||
# Switch to connection con1
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -5,6 +5,20 @@ flush tables;
|
|||
select * from t1 where isnull(to_days(mydate));
|
||||
id mydate
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#53933 crash when using uncacheable subquery in the having clause of outer query
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
SELECT ISNULL((SELECT GET_LOCK('Bug#53933', 0) FROM t1 GROUP BY f1)) AS f2
|
||||
FROM t1 GROUP BY f1 HAVING f2 = f2;
|
||||
f2
|
||||
0
|
||||
SELECT RELEASE_LOCK('Bug#53933');
|
||||
RELEASE_LOCK('Bug#53933')
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
CREATE TABLE t1 (id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(id));
|
||||
INSERT INTO t1( id ) VALUES ( NULL );
|
||||
SELECT t1.id FROM t1 WHERE (id is not null and id is null );
|
||||
|
|
|
@ -2767,6 +2767,19 @@ SELECT MIN( a ) FROM t1 WHERE a IS NULL;
|
|||
MIN( a )
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#53859: Valgrind: opt_sum_query(TABLE_LIST*, List<Item>&, Item*) at
|
||||
# opt_sum.cc:305
|
||||
#
|
||||
CREATE TABLE t1 ( a INT, KEY (a) );
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
SELECT MIN( a ) AS min_a
|
||||
FROM t1
|
||||
WHERE a > 1 AND a IS NULL
|
||||
ORDER BY min_a;
|
||||
min_a
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# WL#3220 (Loose index scan for COUNT DISTINCT)
|
||||
|
|
|
@ -1734,4 +1734,97 @@ a
|
|||
1
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #54007: assert in ha_myisam::index_next , HANDLER
|
||||
#
|
||||
CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a), KEY b(b), KEY ab(a, b));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST;
|
||||
a b
|
||||
HANDLER t1 READ `PRIMARY` NEXT;
|
||||
a b
|
||||
HANDLER t1 READ ab NEXT;
|
||||
a b
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
HANDLER t1 CLOSE;
|
||||
INSERT INTO t1 VALUES (2, 20), (1, 10), (4, 40), (3, 30);
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
1 10
|
||||
HANDLER t1 READ `PRIMARY` NEXT;
|
||||
a b
|
||||
1 10
|
||||
HANDLER t1 READ `PRIMARY` NEXT;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ ab NEXT;
|
||||
a b
|
||||
1 10
|
||||
HANDLER t1 READ ab NEXT;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
1 10
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
3 30
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
4 40
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
4 40
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
3 30
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
HANDLER t1 CLOSE;
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ `PRIMARY` PREV;
|
||||
a b
|
||||
4 40
|
||||
HANDLER t1 READ `PRIMARY` PREV;
|
||||
a b
|
||||
3 30
|
||||
HANDLER t1 READ b PREV;
|
||||
a b
|
||||
4 40
|
||||
HANDLER t1 READ b PREV;
|
||||
a b
|
||||
3 30
|
||||
HANDLER t1 CLOSE;
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ `PRIMARY` PREV LIMIT 3;
|
||||
a b
|
||||
4 40
|
||||
3 30
|
||||
2 20
|
||||
HANDLER t1 READ b NEXT LIMIT 5;
|
||||
a b
|
||||
1 10
|
||||
2 20
|
||||
3 30
|
||||
4 40
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -1342,4 +1342,63 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE tt9 ALL NULL NULL NULL NULL 2 Using join buffer
|
||||
SET optimizer_search_depth = DEFAULT;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#46091 STRAIGHT_JOIN + RIGHT JOIN returns different result
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT NOT NULL);
|
||||
INSERT INTO t1 VALUES (9),(0);
|
||||
CREATE TABLE t2 (f1 INT NOT NULL);
|
||||
INSERT INTO t2 VALUES
|
||||
(5),(3),(0),(3),(1),(0),(1),(7),(1),(0),(0),(8),(4),(9),(0),(2),(0),(8),(5),(1);
|
||||
SELECT STRAIGHT_JOIN COUNT(*) FROM t1 TA1
|
||||
RIGHT JOIN t2 TA2 JOIN t2 TA3 ON TA2.f1 ON TA3.f1;
|
||||
COUNT(*)
|
||||
476
|
||||
EXPLAIN SELECT STRAIGHT_JOIN COUNT(*) FROM t1 TA1
|
||||
RIGHT JOIN t2 TA2 JOIN t2 TA3 ON TA2.f1 ON TA3.f1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE TA2 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE TA3 ALL NULL NULL NULL NULL 20 Using join buffer
|
||||
1 SIMPLE TA1 ALL NULL NULL NULL NULL 2
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#48971 Segfault in add_found_match_trig_cond () at sql_select.cc:5990
|
||||
#
|
||||
CREATE TABLE t1(f1 INT, PRIMARY KEY (f1));
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
EXPLAIN EXTENDED SELECT STRAIGHT_JOIN jt1.f1 FROM t1 AS jt1
|
||||
LEFT JOIN t1 AS jt2
|
||||
RIGHT JOIN t1 AS jt3
|
||||
JOIN t1 AS jt4 ON 1
|
||||
LEFT JOIN t1 AS jt5 ON 1
|
||||
ON 1
|
||||
RIGHT JOIN t1 AS jt6 ON jt6.f1
|
||||
ON 1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE jt1 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt6 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt3 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt4 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt5 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt2 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 select straight_join `test`.`jt1`.`f1` AS `f1` from `test`.`t1` `jt1` left join (`test`.`t1` `jt6` left join (`test`.`t1` `jt3` join `test`.`t1` `jt4` left join `test`.`t1` `jt5` on(1) left join `test`.`t1` `jt2` on(1)) on((`test`.`jt6`.`f1` and 1))) on(1) where 1
|
||||
EXPLAIN EXTENDED SELECT STRAIGHT_JOIN jt1.f1 FROM t1 AS jt1
|
||||
RIGHT JOIN t1 AS jt2
|
||||
RIGHT JOIN t1 AS jt3
|
||||
JOIN t1 AS jt4 ON 1
|
||||
LEFT JOIN t1 AS jt5 ON 1
|
||||
ON 1
|
||||
RIGHT JOIN t1 AS jt6 ON jt6.f1
|
||||
ON 1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE jt6 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt3 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt4 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt5 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt2 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
1 SIMPLE jt1 index NULL PRIMARY 4 NULL 2 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 select straight_join `test`.`jt1`.`f1` AS `f1` from `test`.`t1` `jt6` left join (`test`.`t1` `jt3` join `test`.`t1` `jt4` left join `test`.`t1` `jt5` on(1) left join `test`.`t1` `jt2` on(1)) on((`test`.`jt6`.`f1` and 1)) left join `test`.`t1` `jt1` on(1) where 1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -496,4 +496,11 @@ SELECT * FROM t1;
|
|||
col0
|
||||
test
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #52512 : Assertion `! is_set()' in
|
||||
# Diagnostics_area::set_ok_status on LOAD DATA
|
||||
#
|
||||
CREATE TABLE t1 (id INT NOT NULL);
|
||||
LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -602,9 +602,11 @@ select * from t2 /* must be (3,1), (4,4) */;
|
|||
a b
|
||||
3 1
|
||||
4 4
|
||||
show master status /* there must be the UPDATE query event */;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 344
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t2,t1 SET t2.a=t1.a+2
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
insert into t1 values (1,2),(3,4),(4,4);
|
||||
|
@ -612,9 +614,11 @@ insert into t2 values (1,2),(3,4),(4,4);
|
|||
reset master;
|
||||
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
||||
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
|
||||
show master status /* there must be the UPDATE query event */;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 359
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
drop table t1, t2;
|
||||
set @@session.binlog_format= @sav_binlog_format;
|
||||
drop table if exists t1, t2, t3;
|
||||
|
|
|
@ -1,5 +1,29 @@
|
|||
drop table if exists t1;
|
||||
#
|
||||
# Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
|
||||
#
|
||||
CREATE TABLE t1 (a INT) PARTITION BY HASH (a);
|
||||
FLUSH TABLES;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Error Failed to read from the .par file
|
||||
test.t1 check Error Incorrect information in file: './test/t1.frm'
|
||||
test.t1 check error Corrupt
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Failed to read from the .par file
|
||||
# Note that it is currently impossible to drop a partitioned table
|
||||
# without the .par file
|
||||
DROP TABLE t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
#
|
||||
# Bug#49477: Assertion `0' failed in ha_partition.cc:5530
|
||||
# with temporary table and partitions
|
||||
#
|
||||
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
|
||||
CREATE TEMPORARY TABLE tmp_t1 LIKE t1;
|
||||
ERROR HY000: Cannot create temporary table with partitions
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with
|
||||
# subpartitions
|
||||
SET @org_mode=@@sql_mode;
|
||||
|
|
|
@ -14,5 +14,14 @@ end|
|
|||
reset master|
|
||||
insert into t2 values (bug23333(),1)|
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
show binlog events from <binlog_start>|
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
select count(*),@a from t1 /* must be 1,1 */|
|
||||
count(*) @a
|
||||
1 1
|
||||
drop table t1,t2;
|
||||
drop function if exists bug23333;
|
||||
|
|
|
@ -139,6 +139,16 @@ CAST(c AS TIME)
|
|||
00:00:00
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values
|
||||
#
|
||||
CREATE TABLE t1(f1 TIME);
|
||||
INSERT INTO t1 VALUES ('23:38:57');
|
||||
SELECT TIMESTAMP(f1,'1') FROM t1;
|
||||
TIMESTAMP(f1,'1')
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t1 (f1 TIME);
|
||||
INSERT INTO t1 VALUES ('24:00:00');
|
||||
SELECT '24:00:00' = (SELECT f1 FROM t1);
|
||||
|
|
|
@ -1026,6 +1026,13 @@ hostname #
|
|||
# Test 'myisam_mmap_size' option is not dynamic
|
||||
SET @@myisam_mmap_size= 500M;
|
||||
ERROR HY000: Variable 'myisam_mmap_size' is a read only variable
|
||||
#
|
||||
# Bug #52315: utc_date() crashes when system time > year 2037
|
||||
#
|
||||
SET TIMESTAMP=2*1024*1024*1024;
|
||||
#Should not crash
|
||||
SELECT UTC_DATE();
|
||||
SET TIMESTAMP=DEFAULT;
|
||||
End of 5.0 tests
|
||||
set join_buffer_size=1;
|
||||
Warnings:
|
||||
|
|
|
@ -156,10 +156,9 @@ select * from t2 /* must be (3,1), (4,4) */;
|
|||
a b
|
||||
1 1
|
||||
4 4
|
||||
there must no UPDATE in binlog
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
||||
# There must no UPDATE in binlog;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
insert into t1 values (1,2),(3,4),(4,4);
|
||||
|
@ -167,9 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4);
|
|||
reset master;
|
||||
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
||||
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
|
||||
there must no UPDATE in binlog
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
||||
# There must be no UPDATE query event;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
drop table t1, t2;
|
||||
End of tests
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -105,9 +105,8 @@ select * from t2;
|
|||
a
|
||||
select * from t3;
|
||||
a
|
||||
show binlog events;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query # # use `test`; drop table t1,t2
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
|
@ -127,7 +126,7 @@ master-bin.000001 # Query # # use `test`; replace into t1 values(100)
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) ;file_id=#
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 add b int
|
||||
|
@ -164,13 +163,6 @@ start transaction;
|
|||
insert into t1 values(2);
|
||||
rollback;
|
||||
set autocommit=1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values(1)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
drop table if exists t1;
|
||||
reset master;
|
||||
create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
|
||||
|
|
|
@ -155,8 +155,8 @@ reset master;
|
|||
UPDATE t2,t1 SET t2.a=t1.a+2;
|
||||
# check
|
||||
select * from t2 /* must be (3,1), (4,4) */;
|
||||
--echo there must no UPDATE in binlog
|
||||
source include/show_master_status.inc;
|
||||
--echo # There must no UPDATE in binlog;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
# B. testing multi_update::send_error() execution branch
|
||||
delete from t1;
|
||||
|
@ -166,8 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4);
|
|||
reset master;
|
||||
--error ER_DUP_ENTRY
|
||||
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
||||
--echo there must no UPDATE in binlog
|
||||
source include/show_master_status.inc;
|
||||
--echo # There must be no UPDATE query event;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
# cleanup bug#27716
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -5,8 +5,7 @@ create table t1 (a int, b int) engine=innodb;
|
|||
begin;
|
||||
insert into t1 values (1,2);
|
||||
commit;
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
source include/show_binlog_events.inc;
|
||||
drop table t1;
|
||||
|
||||
# This is a wrapper for binlog.test so that the same test case can be used
|
||||
|
|
|
@ -607,9 +607,9 @@ INSERT INTO t2 SET a = func_modify_t1();
|
|||
|
||||
SET SESSION binlog_format = MIXED;
|
||||
--echo # Check if the statement is logged in row format.
|
||||
let $pos0_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
INSERT INTO t2 SET a = func_modify_t1();
|
||||
eval SHOW BINLOG EVENTS FROM $pos0_master;
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
# clean up
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -638,9 +638,9 @@ INSERT INTO t1 SET a = 1;
|
|||
|
||||
SET SESSION binlog_format = MIXED;
|
||||
--echo # Check if the statement is logged in row format.
|
||||
let $pos1_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
INSERT INTO t1 SET a = 2;
|
||||
eval SHOW BINLOG EVENTS FROM $pos1_master;
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
# clean up
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
|
|
@ -16,12 +16,11 @@ LOAD DATA INFILE FILENAME
|
|||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
3
|
||||
SHOW BINLOG EVENTS;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc 1 # Server ver: #
|
||||
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (b CHAR(10))
|
||||
master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE FILENAME ;file_id=#
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (b CHAR(10))
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`b`) ;file_id=#
|
||||
|
||||
**** On Slave ****
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
|
|
|
@ -13,5 +13,6 @@ Tables_in_test
|
|||
t1
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 278
|
||||
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
||||
flush logs;
|
||||
drop table t1;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue