Merge with MariaDB 5.1.49
Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
This commit is contained in:
commit
d042146e5b
@ -127,8 +127,12 @@ fi
|
|||||||
|
|
||||||
# Set flags for various build configurations.
|
# Set flags for various build configurations.
|
||||||
# Used in -valgrind builds
|
# Used in -valgrind builds
|
||||||
|
# Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro
|
||||||
|
# LINT_INIT(), which is only useful for silencing spurious warnings
|
||||||
|
# of static analysis tools. We want LINT_INIT() to be a no-op in Valgrind.
|
||||||
valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_valgrind "
|
valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_valgrind "
|
||||||
valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
||||||
|
valgrind_configs="--with-valgrind"
|
||||||
#
|
#
|
||||||
# Used in -debug builds
|
# Used in -debug builds
|
||||||
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
|
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
|
||||||
|
@ -941,6 +941,7 @@ set_valgrind_flags()
|
|||||||
loc_valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_valgrind "
|
loc_valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_valgrind "
|
||||||
loc_valgrind_flags="$loc_valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
loc_valgrind_flags="$loc_valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
||||||
compiler_flags="$compiler_flags $loc_valgrind_flags"
|
compiler_flags="$compiler_flags $loc_valgrind_flags"
|
||||||
|
with_flags="$with_flags --with-valgrind"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
|||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$amd64_cflags $debug_cflags $valgrind_flags"
|
extra_flags="$amd64_cflags $debug_cflags $valgrind_flags"
|
||||||
extra_configs="$amd64_configs $debug_configs $max_configs"
|
extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
|
||||||
|
@ -29,6 +29,6 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
|||||||
c_warnings="-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572"
|
c_warnings="-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572"
|
||||||
cxx_warnings="$c_warnings -wd869,874"
|
cxx_warnings="$c_warnings -wd869,874"
|
||||||
base_cxxflags="-fno-exceptions -fno-rtti"
|
base_cxxflags="-fno-exceptions -fno-rtti"
|
||||||
extra_configs="$pentium_configs $debug_configs"
|
extra_configs="$pentium_configs $debug_configs $valgrind_configs"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
|||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
||||||
extra_configs="$pentium_configs $debug_configs $max_configs"
|
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
|||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
||||||
extra_configs="$pentium_configs $debug_configs $max_no_ndb_configs"
|
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_no_ndb_configs"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
|||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags"
|
extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags"
|
||||||
extra_configs="$pentium_configs $debug_configs $max_configs"
|
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
|
||||||
|
@ -161,8 +161,8 @@ test-bt:
|
|||||||
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
|
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
|
||||||
cd mysql-test ; \
|
cd mysql-test ; \
|
||||||
MTR_BUILD_THREAD=auto \
|
MTR_BUILD_THREAD=auto \
|
||||||
@PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --comment=ndb+rpl_ndb+ps --force --timer \
|
@PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --comment=ndb+ps --force --timer \
|
||||||
--ps-protocol --mysqld=--binlog-format=row --suite=ndb,rpl_ndb ; \
|
--ps-protocol --mysqld=--binlog-format=row --suite=ndb ; \
|
||||||
MTR_BUILD_THREAD=auto \
|
MTR_BUILD_THREAD=auto \
|
||||||
@PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --comment=ndb --force --timer \
|
@PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --comment=ndb --force --timer \
|
||||||
--with-ndbcluster-only ; \
|
--with-ndbcluster-only ; \
|
||||||
|
177
client/mysql.cc
177
client/mysql.cc
@ -1348,65 +1348,73 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0},
|
||||||
{"abort-source-on-error", OPT_ABORT_SOURCE_ON_ERROR,
|
{"abort-source-on-error", OPT_ABORT_SOURCE_ON_ERROR,
|
||||||
"Abort 'source filename' operations in case of errors",
|
"Abort 'source filename' operations in case of errors",
|
||||||
(uchar**) &batch_abort_on_error, (uchar**) &batch_abort_on_error, 0,
|
&batch_abort_on_error, &batch_abort_on_error, 0,
|
||||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef __NETWARE__
|
#ifdef __NETWARE__
|
||||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for 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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"auto-rehash", OPT_AUTO_REHASH,
|
{"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.",
|
"Enable automatic rehashing. One doesn't need to use 'rehash' to get table "
|
||||||
(uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
|
"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},
|
0, 0},
|
||||||
{"no-auto-rehash", 'A',
|
{"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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"batch", 'B',
|
{"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,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
"Directory for character set files.", &charsets_dir,
|
||||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"comments", 'c', "Preserve comments. Send comments to the server."
|
{"comments", 'c', "Preserve comments. Send comments to the server."
|
||||||
" The default is --skip-comments (discard comments), enable with --comments.",
|
" 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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compress", 'C', "Use compression in server/client protocol.",
|
{"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},
|
0, 0, 0},
|
||||||
|
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#else
|
#else
|
||||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
{"debug", '#', "Output debug log.", &default_dbug_option,
|
||||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
|
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
|
||||||
(uchar**) &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"database", 'D', "Database to use.", (uchar**) ¤t_db,
|
{"database", 'D', "Database to use.", ¤t_db,
|
||||||
(uchar**) ¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", (uchar**) &default_charset,
|
"Set the default character set.", &default_charset,
|
||||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", (uchar**) &delimiter_str,
|
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", &delimiter_str,
|
||||||
(uchar**) &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0,
|
{"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0,
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"vertical", 'E', "Print the output of a query (rows) vertically.",
|
{"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},
|
0},
|
||||||
{"force", 'f', "Continue even if we get an SQL error. Sets abort-source-on-error to 0",
|
{"force", 'f', "Continue even if we get an SQL error. Sets abort-source-on-error to 0",
|
||||||
(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},
|
0, 0, 0, 0},
|
||||||
{"named-commands", 'G',
|
{"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.",
|
"Enable named commands. Named commands mean this program's internal "
|
||||||
(uchar**) &named_cmds, (uchar**) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
"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},
|
0, 0},
|
||||||
{"no-named-commands", 'g',
|
{"no-named-commands", 'g',
|
||||||
"Named commands are disabled. Use \\* form only, or use named commands "
|
"Named commands are disabled. Use \\* form only, or use named commands "
|
||||||
@ -1416,47 +1424,54 @@ static struct my_option my_long_options[] =
|
|||||||
"WARNING: option deprecated; use --disable-named-commands instead.",
|
"WARNING: option deprecated; use --disable-named-commands instead.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"ignore-spaces", 'i', "Ignore space after function names.",
|
{"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},
|
0, 0, 0, 0},
|
||||||
{"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
|
{"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
|
||||||
(uchar**) &opt_local_infile,
|
&opt_local_infile,
|
||||||
(uchar**) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
&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,
|
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
|
||||||
(uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"host", 'h', "Connect to host.", (uchar**) ¤t_host,
|
{"host", 'h', "Connect to host.", ¤t_host,
|
||||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
¤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,
|
{"html", 'H', "Produce HTML output.", &opt_html, &opt_html,
|
||||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
|
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
|
||||||
(uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
|
&line_numbers, &line_numbers, 0, GET_BOOL,
|
||||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
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,
|
{"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},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
|
{"unbuffered", 'n', "Flush buffer after each query.", &unbuffered,
|
||||||
(uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
|
{"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},
|
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"skip-column-names", 'N',
|
{"skip-column-names", 'N',
|
||||||
"Don't write column names in results.",
|
"Don't write column names in results.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"set-variable", 'O',
|
{"set-variable", 'O',
|
||||||
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
|
"Change the value of a variable. Please note that this option is "
|
||||||
|
"deprecated; you can set variables directly with --variable-name=value.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C).",
|
{"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},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"one-database", 'o',
|
{"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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef USE_POPEN
|
#ifdef USE_POPEN
|
||||||
{"pager", OPT_PAGER,
|
{"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},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"no-pager", OPT_NOPAGER,
|
{"no-pager", OPT_NOPAGER,
|
||||||
"Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option deprecated; use --disable-pager instead.",
|
"Disable pager and print to stdout. See interactive help (\\h) also. "
|
||||||
|
"WARNING: option deprecated; use --disable-pager instead.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"password", 'p',
|
{"password", 'p',
|
||||||
@ -1472,48 +1487,53 @@ static struct my_option my_long_options[] =
|
|||||||
"/etc/services, "
|
"/etc/services, "
|
||||||
#endif
|
#endif
|
||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
(uchar**) &opt_mysql_port,
|
&opt_mysql_port,
|
||||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
|
{"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
{"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},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"quick", 'q',
|
{"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.",
|
"Don't cache result, print it row by row. This may slow down the server "
|
||||||
(uchar**) &quick, (uchar**) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
"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.",
|
{"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},
|
0, 0, 0},
|
||||||
{"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default.",
|
{"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable "
|
||||||
(uchar**) &opt_reconnect, (uchar**) &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
"with --disable-reconnect. This option is enabled by default.",
|
||||||
{"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,
|
&opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 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
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"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,
|
||||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#include "sslopt-longopts.h"
|
#include "sslopt-longopts.h"
|
||||||
{"table", 't', "Output in table format.", (uchar**) &output_tables,
|
{"table", 't', "Output in table format.", &output_tables,
|
||||||
(uchar**) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"tee", OPT_TEE,
|
{"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},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: Option deprecated; use --disable-tee instead.", 0, 0, 0, GET_NO_ARG,
|
{"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. "
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
"WARNING: Option deprecated; use --disable-tee instead.",
|
||||||
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifndef DONT_ALLOW_USER_CHANGE
|
#ifndef DONT_ALLOW_USER_CHANGE
|
||||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
{"user", 'u', "User for login if not current user.", ¤t_user,
|
||||||
(uchar**) ¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
|
{"safe-updates", '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},
|
0, 0, 0, 0},
|
||||||
{"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
|
{"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},
|
0, 0, 0, 0},
|
||||||
{"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
|
{"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
|
||||||
0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -1523,35 +1543,32 @@ static struct my_option my_long_options[] =
|
|||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"connect_timeout", OPT_CONNECT_TIMEOUT,
|
{"connect_timeout", OPT_CONNECT_TIMEOUT,
|
||||||
"Number of seconds before connection timeout.",
|
"Number of seconds before connection timeout.",
|
||||||
(uchar**) &opt_connect_timeout,
|
&opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||||
(uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0,
|
0, 0, 3600*12, 0, 0, 0},
|
||||||
0, 0},
|
|
||||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
||||||
"The maximum packet length to send to or receive from server.",
|
"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,
|
GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096,
|
||||||
(longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
(longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||||
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
|
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
|
||||||
"The buffer size for TCP/IP and socket communication.",
|
"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},
|
REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||||
{"select_limit", OPT_SELECT_LIMIT,
|
{"select_limit", OPT_SELECT_LIMIT,
|
||||||
"Automatic limit for SELECT when using --safe-updates.",
|
"Automatic limit for SELECT when using --safe-updates.",
|
||||||
(uchar**) &select_limit,
|
&select_limit, &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L,
|
||||||
(uchar**) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX,
|
1, ULONG_MAX, 0, 1, 0},
|
||||||
0, 1, 0},
|
|
||||||
{"max_join_size", OPT_MAX_JOIN_SIZE,
|
{"max_join_size", OPT_MAX_JOIN_SIZE,
|
||||||
"Automatic limit for rows in a join when using --safe-updates.",
|
"Automatic limit for rows in a join when using --safe-updates.",
|
||||||
(uchar**) &max_join_size,
|
&max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L,
|
||||||
(uchar**) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ULONG_MAX,
|
1, ULONG_MAX, 0, 1, 0},
|
||||||
0, 1, 0},
|
|
||||||
{"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
|
{"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
|
||||||
" uses old (pre-4.1.1) protocol.", (uchar**) &opt_secure_auth,
|
" uses old (pre-4.1.1) protocol.", &opt_secure_auth,
|
||||||
(uchar**) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&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.",
|
{"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},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
|
{"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},
|
||||||
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
|
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
|
||||||
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
|
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
|
||||||
|
@ -68,7 +68,7 @@ static struct my_option my_long_options[]=
|
|||||||
"Directory for character set files.", 0,
|
"Directory for character set files.", 0,
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
|
{"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',
|
{"datadir", 'd',
|
||||||
"Not used by mysql_upgrade. Only for backward compatibility.",
|
"Not used by mysql_upgrade. Only for backward compatibility.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -76,26 +76,26 @@ static struct my_option my_long_options[]=
|
|||||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#else
|
#else
|
||||||
{"debug", '#', "Output debug log.", (uchar* *) & default_dbug_option,
|
{"debug", '#', "Output debug log.", &default_dbug_option,
|
||||||
(uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
|
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
|
||||||
(uchar**) &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", 0,
|
"Set the default character set.", 0,
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
|
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
|
||||||
"has already been executed for the current version of MySQL.",
|
"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"host",'h', "Connect to host.", 0,
|
{"host",'h', "Connect to host.", 0,
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"password", 'p',
|
{"password", 'p',
|
||||||
"Password to use when connecting to server. If password is not given,"
|
"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},
|
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0,
|
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0,
|
||||||
@ -121,15 +121,15 @@ static struct my_option my_long_options[]=
|
|||||||
#include <sslopt-longopts.h>
|
#include <sslopt-longopts.h>
|
||||||
{"tmpdir", 't', "Directory for temporary files.",
|
{"tmpdir", 't', "Directory for temporary files.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"user", 'u', "User for login if not current user.", (uchar**) &opt_user,
|
{"user", 'u', "User for login if not current user.", &opt_user,
|
||||||
(uchar**) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"verbose", 'v', "Display more output about the process.",
|
{"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},
|
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"write-binlog", OPT_WRITE_BINLOG,
|
{"write-binlog", OPT_WRITE_BINLOG,
|
||||||
"All commands including mysqlcheck are binlogged. Enabled by default;"
|
"All commands including mysqlcheck are binlogged. Enabled by default;"
|
||||||
"use --skip-write-binlog when commands should not be sent to replication slaves.",
|
"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},
|
1, 0, 0, 0, 0, 0},
|
||||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
@ -128,37 +128,37 @@ static struct my_option my_long_options[] =
|
|||||||
#endif
|
#endif
|
||||||
{"count", 'c',
|
{"count", 'c',
|
||||||
"Number of iterations to make. This works with -i (--sleep) only.",
|
"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"force", 'f',
|
{"force", 'f',
|
||||||
"Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs.",
|
"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,
|
&option_force, &option_force, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||||
0, 0, 0, 0},
|
0, 0, 0, 0},
|
||||||
{"compress", 'C', "Use compression in server/client protocol.",
|
{"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},
|
0, 0, 0},
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
"Directory for character set files.", &charsets_dir,
|
||||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", (uchar**) &default_charset,
|
"Set the default character set.", &default_charset,
|
||||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
|
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"no-beep", 'b', "Turn off beep on error.", (uchar**) &opt_nobeep,
|
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
|
||||||
(uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"password", 'p',
|
{"password", 'p',
|
||||||
"Password to use when connecting to server. If password is not given it's asked from the tty.",
|
"Password to use when connecting to server. If password is not given it's asked from the tty.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -172,50 +172,52 @@ static struct my_option my_long_options[] =
|
|||||||
"/etc/services, "
|
"/etc/services, "
|
||||||
#endif
|
#endif
|
||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
(uchar**) &tcp_port,
|
&tcp_port,
|
||||||
(uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&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).",
|
{"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},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"relative", 'r',
|
{"relative", 'r',
|
||||||
"Show difference between current and previous values when used with -i. Currently only works with extended-status.",
|
"Show difference between current and previous values when used with -i. "
|
||||||
(uchar**) &opt_relative, (uchar**) &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
"Currently only works with extended-status.",
|
||||||
|
&opt_relative, &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||||
0, 0, 0},
|
0, 0, 0},
|
||||||
{"set-variable", 'O',
|
{"set-variable", 'O',
|
||||||
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
|
"Change the value of a variable. Please note that this option is "
|
||||||
|
"deprecated; you can set variables directly with --variable-name=value.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"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},
|
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"silent", 's', "Silently exit if one can't connect to server.",
|
{"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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
(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},
|
0, 0, 0},
|
||||||
{"sleep", 'i', "Execute commands repeatedly with a sleep between.",
|
{"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},
|
0, 0},
|
||||||
#include <sslopt-longopts.h>
|
#include <sslopt-longopts.h>
|
||||||
#ifndef DONT_ALLOW_USER_CHANGE
|
#ifndef DONT_ALLOW_USER_CHANGE
|
||||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
{"user", 'u', "User for login if not current user.", &user,
|
||||||
(uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"verbose", 'v', "Write more information.", (uchar**) &opt_verbose,
|
{"verbose", 'v', "Write more information.", &opt_verbose,
|
||||||
(uchar**) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&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,
|
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"vertical", 'E',
|
{"vertical", 'E',
|
||||||
"Print output vertically. Is similar to --relative, but prints output vertically.",
|
"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},
|
0, 0, 0},
|
||||||
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT,
|
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT,
|
||||||
OPT_ARG, 0, 0, 0, 0, 0, 0},
|
OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", (uchar**) &opt_connect_timeout,
|
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", &opt_connect_timeout,
|
||||||
(uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
|
&opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
|
||||||
3600*12, 0, 1, 0},
|
3600*12, 0, 1, 0},
|
||||||
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (uchar**) &opt_shutdown_timeout,
|
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout,
|
||||||
(uchar**) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
&opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||||
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
|
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}
|
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
@ -1062,9 +1062,8 @@ static struct my_option my_long_options[] =
|
|||||||
"events); 'always' prints base64 whenever possible. 'always' is for "
|
"events); 'always' prints base64 whenever possible. 'always' is for "
|
||||||
"debugging only and should not be used in a production system. If this "
|
"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 is not given, the default is 'auto'; if it is given with no "
|
||||||
"argument, 'always' is used."
|
"argument, 'always' is used.",
|
||||||
,(uchar**) &opt_base64_output_mode_str,
|
&opt_base64_output_mode_str, &opt_base64_output_mode_str,
|
||||||
(uchar**) &opt_base64_output_mode_str,
|
|
||||||
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
/*
|
/*
|
||||||
mysqlbinlog needs charsets knowledge, to be able to convert a charset
|
mysqlbinlog needs charsets knowledge, to be able to convert a charset
|
||||||
@ -1073,43 +1072,43 @@ static struct my_option my_long_options[] =
|
|||||||
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
|
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
|
||||||
*/
|
*/
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
"Directory for character set files.", &charsets_dir,
|
||||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"database", 'd', "List entries for just this database (local log only).",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
{"debug", '#', "Output debug log.", &default_dbug_option,
|
||||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
|
{"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. "
|
"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 "
|
"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 "
|
"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.",
|
"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},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"force-if-open", 'F', "Force if binlog was not closed properly.",
|
{"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},
|
1, 0, 0, 0, 0, 0},
|
||||||
{"force-read", 'f', "Force reading unknown binlog events.",
|
{"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},
|
0, 0},
|
||||||
{"hexdump", 'H', "Augment output with hexadecimal and ASCII event dump.",
|
{"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},
|
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},
|
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.",
|
{"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},
|
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},
|
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"password", 'p', "Password to connect to remote server.",
|
{"password", 'p', "Password to connect to remote server.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -1119,10 +1118,10 @@ static struct my_option my_long_options[] =
|
|||||||
"/etc/services, "
|
"/etc/services, "
|
||||||
#endif
|
#endif
|
||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"position", OPT_POSITION, "Deprecated. Use --start-position instead.",
|
{"position", OPT_POSITION, "Deprecated. Use --start-position instead.",
|
||||||
(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,
|
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
|
||||||
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
||||||
(ulonglong)(~(uint32)0), 0, 0, 0},
|
(ulonglong)(~(uint32)0), 0, 0, 0},
|
||||||
@ -1130,31 +1129,31 @@ static struct my_option my_long_options[] =
|
|||||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"read-from-remote-server", 'R', "Read binary logs from a MySQL server.",
|
{"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},
|
0, 0},
|
||||||
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
|
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"server-id", OPT_SERVER_ID,
|
{"server-id", OPT_SERVER_ID,
|
||||||
"Extract only binlog entries created by the server having the given 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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"set-charset", OPT_SET_CHARSET,
|
{"set-charset", OPT_SET_CHARSET,
|
||||||
"Add 'SET NAMES character_set' to the output.", (uchar**) &charset,
|
"Add 'SET NAMES character_set' to the output.", &charset,
|
||||||
(uchar**) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name,
|
"Base name of shared memory.", &shared_memory_base_name,
|
||||||
(uchar**) &shared_memory_base_name,
|
&shared_memory_base_name,
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"short-form", 's', "Just show regular queries: no extra info and no "
|
{"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 "
|
"row-based events. This is for testing only, and should not be used in "
|
||||||
"production systems. If you want to suppress base64-output, consider "
|
"production systems. If you want to suppress base64-output, consider "
|
||||||
"using --base64-output=never instead.",
|
"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},
|
0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"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},
|
0, 0},
|
||||||
{"start-datetime", OPT_START_DATETIME,
|
{"start-datetime", OPT_START_DATETIME,
|
||||||
"Start reading the binlog at first event having a datetime equal or "
|
"Start reading the binlog at first event having a datetime equal or "
|
||||||
@ -1162,12 +1161,12 @@ static struct my_option my_long_options[] =
|
|||||||
"in the local time zone, in any format accepted by the MySQL server "
|
"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 "
|
"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).",
|
"(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},
|
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"start-position", 'j',
|
{"start-position", 'j',
|
||||||
"Start reading the binlog at position N. Applies to the first binlog "
|
"Start reading the binlog at position N. Applies to the first binlog "
|
||||||
"passed on the command line.",
|
"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,
|
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
|
||||||
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
||||||
(ulonglong)(~(uint32)0), 0, 0, 0},
|
(ulonglong)(~(uint32)0), 0, 0, 0},
|
||||||
@ -1177,22 +1176,22 @@ static struct my_option my_long_options[] =
|
|||||||
"in the local time zone, in any format accepted by the MySQL server "
|
"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 "
|
"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).",
|
"(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},
|
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"stop-position", OPT_STOP_POSITION,
|
{"stop-position", OPT_STOP_POSITION,
|
||||||
"Stop reading the binlog at position N. Applies to the last binlog "
|
"Stop reading the binlog at position N. Applies to the last binlog "
|
||||||
"passed on the command line.",
|
"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,
|
REQUIRED_ARG, (ulonglong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE,
|
||||||
(ulonglong)(~(my_off_t)0), 0, 0, 0},
|
(ulonglong)(~(my_off_t)0), 0, 0, 0},
|
||||||
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \
|
{"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 \
|
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, \
|
binlog of the MySQL server. If you send the output to the same MySQL server, \
|
||||||
that may lead to an endless loop.",
|
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},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"user", 'u', "Connect to the remote server as username.",
|
{"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},
|
0, 0},
|
||||||
{"verbose", 'v', "Reconstruct SQL statements out of row events. "
|
{"verbose", 'v', "Reconstruct SQL statements out of row events. "
|
||||||
"-v -v adds comments on column data types.",
|
"-v -v adds comments on column data types.",
|
||||||
@ -1201,7 +1200,7 @@ that may lead to an endless loop.",
|
|||||||
0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0},
|
||||||
{"open_files_limit", OPT_OPEN_FILES_LIMIT,
|
{"open_files_limit", OPT_OPEN_FILES_LIMIT,
|
||||||
"Used to reserve file descriptors for use by this program.",
|
"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},
|
REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0},
|
||||||
{"rewrite-db", OPT_REWRITE_DB,
|
{"rewrite-db", OPT_REWRITE_DB,
|
||||||
"Updates to a database with a different name than the original. \
|
"Updates to a database with a different name than the original. \
|
||||||
|
@ -54,13 +54,13 @@ static struct my_option my_long_options[] =
|
|||||||
{
|
{
|
||||||
{"all-databases", 'A',
|
{"all-databases", 'A',
|
||||||
"Check all the databases. This is the same as --databases with all databases selected.",
|
"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},
|
0, 0},
|
||||||
{"analyze", 'a', "Analyze given tables.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
{"analyze", 'a', "Analyze given tables.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
||||||
0, 0, 0, 0},
|
0, 0, 0, 0},
|
||||||
{"all-in-1", '1',
|
{"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.",
|
"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},
|
0, 0, 0},
|
||||||
#ifdef __NETWARE__
|
#ifdef __NETWARE__
|
||||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for 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
|
#endif
|
||||||
{"auto-repair", OPT_AUTO_REPAIR,
|
{"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.",
|
"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},
|
0, 0, 0, 0, 0},
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
"Directory for character set files.", &charsets_dir,
|
||||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
{"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
||||||
0, 0, 0, 0},
|
0, 0, 0, 0},
|
||||||
{"check-only-changed", 'C',
|
{"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.",
|
"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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
|
{"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},
|
0, 0, 0},
|
||||||
{"databases", 'B',
|
{"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.",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||||
@ -96,40 +96,40 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", (uchar**) &default_charset,
|
"Set the default character set.", &default_charset,
|
||||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"fast",'F', "Check only tables that haven't been closed properly.",
|
{"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},
|
0},
|
||||||
{"fix-db-names", OPT_FIX_DB_NAMES, "Fix database names.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"fix-table-names", OPT_FIX_TABLE_NAMES, "Fix table names.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"force", 'f', "Continue even if we get an SQL error.",
|
{"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},
|
0, 0, 0, 0},
|
||||||
{"extended", 'e',
|
{"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.",
|
"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},
|
0, 0, 0},
|
||||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"host",'h', "Connect to host.", (uchar**) ¤t_host,
|
{"host",'h', "Connect to host.", ¤t_host,
|
||||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"medium-check", 'm',
|
{"medium-check", 'm',
|
||||||
"Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.",
|
"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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"write-binlog", OPT_WRITE_BINLOG,
|
{"write-binlog", OPT_WRITE_BINLOG,
|
||||||
"Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Enabled by default; use --skip-write-binlog when commands should not be sent to replication slaves.",
|
"Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. 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},
|
1, 0, 0, 0, 0, 0},
|
||||||
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
|
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
|
||||||
0, 0},
|
0, 0},
|
||||||
@ -146,38 +146,38 @@ static struct my_option my_long_options[] =
|
|||||||
"/etc/services, "
|
"/etc/services, "
|
||||||
#endif
|
#endif
|
||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
(uchar**) &opt_mysql_port,
|
&opt_mysql_port,
|
||||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
{"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},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"quick", 'q',
|
{"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.",
|
"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},
|
0},
|
||||||
{"repair", 'r',
|
{"repair", 'r',
|
||||||
"Can fix almost anything except unique keys that aren't unique.",
|
"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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"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},
|
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"silent", 's', "Print only error messages.", (uchar**) &opt_silent,
|
{"silent", 's', "Print only error messages.", &opt_silent,
|
||||||
(uchar**) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
(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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#include <sslopt-longopts.h>
|
#include <sslopt-longopts.h>
|
||||||
{"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
|
{"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
|
||||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"use-frm", OPT_FRM,
|
{"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.",
|
"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},
|
0},
|
||||||
#ifndef DONT_ALLOW_USER_CHANGE
|
#ifndef DONT_ALLOW_USER_CHANGE
|
||||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
{"user", 'u', "User for login if not current user.", ¤t_user,
|
||||||
(uchar**) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG,
|
{"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
@ -180,115 +180,115 @@ HASH ignore_table;
|
|||||||
static struct my_option my_long_options[] =
|
static struct my_option my_long_options[] =
|
||||||
{
|
{
|
||||||
{"all", OPT_ALL, "Deprecated. Use --create-options instead.",
|
{"all", OPT_ALL, "Deprecated. Use --create-options instead.",
|
||||||
(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},
|
0, 0, 0, 0, 0},
|
||||||
{"all-databases", 'A',
|
{"all-databases", 'A',
|
||||||
"Dump all the databases. This will be same as --databases with all databases selected.",
|
"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},
|
0, 0},
|
||||||
{"all-tablespaces", 'Y',
|
{"all-tablespaces", 'Y',
|
||||||
"Dump all the tablespaces.",
|
"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},
|
0, 0},
|
||||||
{"no-tablespaces", 'y',
|
{"no-tablespaces", 'y',
|
||||||
"Do not dump any tablespace information.",
|
"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},
|
0, 0},
|
||||||
{"add-drop-database", OPT_DROP_DATABASE, "Add a DROP DATABASE before each create.",
|
{"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},
|
0},
|
||||||
{"add-drop-table", OPT_DROP, "Add a DROP TABLE before each create.",
|
{"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},
|
0},
|
||||||
{"add-locks", OPT_LOCKS, "Add locks around INSERT statements.",
|
{"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},
|
0},
|
||||||
{"allow-keywords", OPT_KEYWORDS,
|
{"allow-keywords", OPT_KEYWORDS,
|
||||||
"Allow creation of column names that are keywords.", (uchar**) &opt_keywords,
|
"Allow creation of column names that are keywords.", &opt_keywords,
|
||||||
(uchar**) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef __NETWARE__
|
#ifdef __NETWARE__
|
||||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for 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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
"Directory for character set files.", &charsets_dir,
|
||||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"comments", 'i', "Write additional information.",
|
{"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},
|
1, 0, 0, 0, 0, 0},
|
||||||
{"compatible", OPT_COMPATIBLE,
|
{"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.",
|
"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,
|
&opt_compatible_mode_str, &opt_compatible_mode_str, 0,
|
||||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compact", OPT_COMPACT,
|
{"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.",
|
"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,
|
&opt_compact, &opt_compact, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||||
0, 0},
|
0, 0},
|
||||||
{"complete-insert", 'c', "Use complete insert statements.",
|
{"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},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compress", 'C', "Use compression in server/client protocol.",
|
{"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},
|
0, 0, 0},
|
||||||
{"create-options", 'a',
|
{"create-options", 'a',
|
||||||
"Include all MySQL specific create options.",
|
"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},
|
0, 0, 0, 0, 0},
|
||||||
{"databases", 'B',
|
{"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.",
|
"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},
|
0, 0, 0, 0},
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#else
|
#else
|
||||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
{"debug", '#', "Output debug log.", &default_dbug_option,
|
||||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", (uchar**) &default_charset,
|
"Set the default character set.", &default_charset,
|
||||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED.",
|
{"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},
|
0, 0},
|
||||||
{"delete-master-logs", OPT_DELETE_MASTER_LOGS,
|
{"delete-master-logs", OPT_DELETE_MASTER_LOGS,
|
||||||
"Delete logs on master after backup. This automatically enables --master-data.",
|
"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"disable-keys", 'K',
|
{"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,
|
"'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.", &opt_disable_keys,
|
||||||
(uchar**) &opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
&opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"events", 'E', "Dump events.",
|
{"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},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"extended-insert", 'e',
|
{"extended-insert", 'e',
|
||||||
"Use multiple-row INSERT syntax that include several VALUES lists.",
|
"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},
|
1, 0, 0, 0, 0, 0},
|
||||||
{"fields-terminated-by", OPT_FTB,
|
{"fields-terminated-by", OPT_FTB,
|
||||||
"Fields in the output file are terminated by the given string.",
|
"Fields in the output 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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"fields-enclosed-by", OPT_ENC,
|
{"fields-enclosed-by", OPT_ENC,
|
||||||
"Fields in the output file are enclosed by the given character.",
|
"Fields in the output 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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||||
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
||||||
"Fields in the output file are optionally enclosed by the given character.",
|
"Fields in the output 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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||||
{"fields-escaped-by", OPT_ESC,
|
{"fields-escaped-by", OPT_ESC,
|
||||||
"Fields in the output file are escaped by the given character.",
|
"Fields in the output file are escaped by the given character.",
|
||||||
(uchar**) &escaped, (uchar**) &escaped, 0,
|
&escaped, &escaped, 0,
|
||||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"first-slave", OPT_FIRST_SLAVE, "Deprecated, renamed to --lock-all-tables.",
|
{"first-slave", OPT_FIRST_SLAVE, "Deprecated, renamed to --lock-all-tables.",
|
||||||
(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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
|
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
|
||||||
"Note that if you dump many databases at once (using the option "
|
"Note that if you dump many databases at once (using the option "
|
||||||
@ -299,24 +299,24 @@ static struct my_option my_long_options[] =
|
|||||||
"to the moment all tables are locked. So if you want your dump and "
|
"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 "
|
"the log flush to happen at the same exact moment you should use "
|
||||||
"--lock-all-tables or --master-data with --flush-logs.",
|
"--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},
|
0, 0},
|
||||||
{"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement "
|
{"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement "
|
||||||
"after dumping the mysql database. This option should be used any "
|
"after dumping the mysql database. This option should be used any "
|
||||||
"time the dump contains the mysql database and any other database "
|
"time the dump contains the mysql database and any other database "
|
||||||
"that depends on the data in the mysql database for proper restore. ",
|
"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},
|
0, 0},
|
||||||
{"force", 'f', "Continue even if we get an SQL error.",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
|
{"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
|
||||||
"VARBINARY, BLOB) in hexadecimal format.",
|
"VARBINARY, BLOB) in hexadecimal format.",
|
||||||
(uchar**) &opt_hex_blob, (uchar**) &opt_hex_blob, 0, GET_BOOL, NO_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.", (uchar**) ¤t_host,
|
{"host", 'h', "Connect to host.", ¤t_host,
|
||||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"ignore-table", OPT_IGNORE_TABLE,
|
{"ignore-table", OPT_IGNORE_TABLE,
|
||||||
"Do not dump the specified table. To specify more than one table to ignore, "
|
"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 "
|
"use the directive multiple times, once for each table. Each table must "
|
||||||
@ -324,21 +324,21 @@ static struct my_option my_long_options[] =
|
|||||||
"--ignore-table=database.table.",
|
"--ignore-table=database.table.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"insert-ignore", OPT_INSERT_IGNORE, "Insert rows with INSERT IGNORE.",
|
{"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},
|
0, 0},
|
||||||
{"lines-terminated-by", OPT_LTB,
|
{"lines-terminated-by", OPT_LTB,
|
||||||
"Lines in the output file are terminated by the given string.",
|
"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"lock-all-tables", 'x', "Locks all tables across all databases. This "
|
{"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 "
|
"is achieved by taking a global read lock for the duration of the whole "
|
||||||
"dump. Automatically turns --single-transaction and --lock-tables off.",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"lock-tables", 'l', "Lock all tables for read.", (uchar**) &lock_tables,
|
{"lock-tables", 'l', "Lock all tables for read.", &lock_tables,
|
||||||
(uchar**) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
&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.",
|
{"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"master-data", OPT_MASTER_DATA,
|
{"master-data", OPT_MASTER_DATA,
|
||||||
"This causes the binary log position and filename to be appended to the "
|
"This causes the binary log position and filename to be appended to the "
|
||||||
@ -350,33 +350,33 @@ static struct my_option my_long_options[] =
|
|||||||
"don't forget to read about --single-transaction below). In all cases, "
|
"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. "
|
"any action on logs will happen at the exact moment of the dump. "
|
||||||
"Option automatically turns --lock-tables off.",
|
"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},
|
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
|
||||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
||||||
"The maximum packet length to send to or receive from server.",
|
"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,
|
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
|
||||||
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||||
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
|
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
|
||||||
"The buffer size for TCP/IP and socket communication.",
|
"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,
|
GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L,
|
||||||
MALLOC_OVERHEAD-1024, 1024, 0},
|
MALLOC_OVERHEAD-1024, 1024, 0},
|
||||||
{"no-autocommit", OPT_AUTOCOMMIT,
|
{"no-autocommit", OPT_AUTOCOMMIT,
|
||||||
"Wrap tables with autocommit/commit statements.",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"no-create-db", 'n',
|
{"no-create-db", 'n',
|
||||||
"Suppress the CREATE DATABASE ... IF EXISTS statement that normally is "
|
"Suppress the CREATE DATABASE ... IF EXISTS statement that normally is "
|
||||||
"output for each dumped database if --all-databases or --databases is "
|
"output for each dumped database if --all-databases or --databases is "
|
||||||
"given.",
|
"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"no-create-info", 't', "Don't write table creation info.",
|
{"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_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
|
{"no-data", 'd', "No row information.", &opt_no_data,
|
||||||
(uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"no-set-names", 'N',"Suppress the SET NAMES statement",
|
{"no-set-names", 'N',"Suppress the SET NAMES statement",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"opt", OPT_OPTIMIZE,
|
{"opt", OPT_OPTIMIZE,
|
||||||
@ -384,7 +384,7 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"order-by-primary", OPT_ORDER_BY_PRIMARY,
|
{"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.",
|
"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", 'p',
|
||||||
"Password to use when connecting to server. If password is not given it's solicited on the tty.",
|
"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},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -392,36 +392,36 @@ static struct my_option my_long_options[] =
|
|||||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
{"port", 'P', "Port number to use for connection.", &opt_mysql_port,
|
||||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"quick", 'q', "Don't buffer query, dump directly to stdout.",
|
{"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 (`).",
|
{"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},
|
0, 0},
|
||||||
{"replace", OPT_MYSQL_REPLACE_INTO, "Use REPLACE INTO instead of INSERT INTO.",
|
{"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},
|
0, 0},
|
||||||
{"result-file", 'r',
|
{"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},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"routines", 'R', "Dump stored routines (functions and procedures).",
|
{"routines", 'R', "Dump stored routines (functions and procedures).",
|
||||||
(uchar**) &opt_routines, (uchar**) &opt_routines, 0, GET_BOOL,
|
&opt_routines, &opt_routines, 0, GET_BOOL,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"set-charset", OPT_SET_CHARSET,
|
{"set-charset", OPT_SET_CHARSET,
|
||||||
"Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset.",
|
"Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset.",
|
||||||
(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},
|
0, 0, 0, 0, 0},
|
||||||
{"set-variable", 'O',
|
{"set-variable", 'O',
|
||||||
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
|
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"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},
|
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
@ -439,42 +439,42 @@ static struct my_option my_long_options[] =
|
|||||||
"connection should use the following statements: ALTER TABLE, DROP "
|
"connection should use the following statements: ALTER TABLE, DROP "
|
||||||
"TABLE, RENAME TABLE, TRUNCATE TABLE, as consistent snapshot is not "
|
"TABLE, RENAME TABLE, TRUNCATE TABLE, as consistent snapshot is not "
|
||||||
"isolated from them. Option automatically turns off --lock-tables.",
|
"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},
|
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.",
|
{"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},
|
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"skip-opt", OPT_SKIP_OPTIMIZATION,
|
{"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.",
|
"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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
(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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#include <sslopt-longopts.h>
|
#include <sslopt-longopts.h>
|
||||||
{"tab",'T',
|
{"tab",'T',
|
||||||
"Create tab-separated textfile for each table to given path. (Create .sql "
|
"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 "
|
"and .txt files.) NOTE: This only works if mysqldump is run on the same "
|
||||||
"machine as the mysqld server.",
|
"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).",
|
{"tables", OPT_TABLES, "Overrides option --databases (-B).",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table.",
|
{"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},
|
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"tz-utc", OPT_TZ_UTC,
|
{"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.",
|
"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
|
#ifndef DONT_ALLOW_USER_CHANGE
|
||||||
{"user", 'u', "User for login if not current user.",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"verbose", 'v', "Print info about the various stages.",
|
{"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,
|
{"version",'V', "Output version information and exit.", 0, 0, 0,
|
||||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"where", 'w', "Dump only selected records. Quotes are mandatory.",
|
{"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,
|
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
|
@ -73,68 +73,68 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
"Directory for character set files.", &charsets_dir,
|
||||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", (uchar**) &default_charset,
|
"Set the default character set.", &default_charset,
|
||||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"columns", 'c',
|
{"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.",
|
"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},
|
0, 0, 0},
|
||||||
{"compress", 'C', "Use compression in server/client protocol.",
|
{"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},
|
0, 0, 0},
|
||||||
{"debug",'#', "Output debug log. Often this is 'd:t:o,filename'.", 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},
|
GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"delete", 'd', "First delete all rows from table.", (uchar**) &opt_delete,
|
{"delete", 'd', "First delete all rows from table.", &opt_delete,
|
||||||
(uchar**) &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"fields-terminated-by", OPT_FTB,
|
{"fields-terminated-by", OPT_FTB,
|
||||||
"Fields in the input file are terminated by the given string.",
|
"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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"fields-enclosed-by", OPT_ENC,
|
{"fields-enclosed-by", OPT_ENC,
|
||||||
"Fields in the import file are enclosed by the given character.",
|
"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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
||||||
"Fields in the input file are optionally enclosed by the given character.",
|
"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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"fields-escaped-by", OPT_ESC,
|
{"fields-escaped-by", OPT_ESC,
|
||||||
"Fields in the input file are escaped by the given character.",
|
"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},
|
0, 0},
|
||||||
{"force", 'f', "Continue even if we get an SQL error.",
|
{"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},
|
0, 0, 0, 0},
|
||||||
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"host", 'h', "Connect to host.", (uchar**) ¤t_host,
|
{"host", 'h', "Connect to host.", ¤t_host,
|
||||||
(uchar**) ¤t_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
¤t_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"ignore", 'i', "If duplicate unique key was found, keep old row.",
|
{"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.",
|
{"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"lines-terminated-by", OPT_LTB,
|
{"lines-terminated-by", OPT_LTB,
|
||||||
"Lines in the input file are terminated by the given string.",
|
"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"local", 'L', "Read all files through the client.", (uchar**) &opt_local_file,
|
{"local", 'L', "Read all files through the client.", &opt_local_file,
|
||||||
(uchar**) &opt_local_file, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&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).",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"low-priority", OPT_LOW_PRIORITY,
|
{"low-priority", OPT_LOW_PRIORITY,
|
||||||
"Use LOW_PRIORITY when updating the table.", (uchar**) &opt_low_priority,
|
"Use LOW_PRIORITY when updating the table.", &opt_low_priority,
|
||||||
(uchar**) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"password", 'p',
|
{"password", 'p',
|
||||||
"Password to use when connecting to server. If password is not given it's asked from the tty.",
|
"Password to use when connecting to server. If password is not given it's asked from the tty.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -148,35 +148,35 @@ static struct my_option my_long_options[] =
|
|||||||
"/etc/services, "
|
"/etc/services, "
|
||||||
#endif
|
#endif
|
||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
(uchar**) &opt_mysql_port,
|
&opt_mysql_port,
|
||||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
{"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},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"replace", 'r', "If duplicate unique key was found, replace old row.",
|
{"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
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"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},
|
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
(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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#include <sslopt-longopts.h>
|
#include <sslopt-longopts.h>
|
||||||
{"use-threads", OPT_USE_THREADS,
|
{"use-threads", OPT_USE_THREADS,
|
||||||
"Load files in parallel. The argument is the number "
|
"Load files in parallel. The argument is the number "
|
||||||
"of threads to use for loading data.",
|
"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},
|
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifndef DONT_ALLOW_USER_CHANGE
|
#ifndef DONT_ALLOW_USER_CHANGE
|
||||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
{"user", 'u', "User for login if not current user.", ¤t_user,
|
||||||
(uchar**) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"verbose", 'v', "Print info about the various stages.", (uchar**) &verbose,
|
{"verbose", 'v', "Print info about the various stages.", &verbose,
|
||||||
(uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
|
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
|
@ -164,35 +164,35 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"character-sets-dir", 'c', "Directory for character set files.",
|
{"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},
|
0, 0, 0, 0, 0},
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", (uchar**) &default_charset,
|
"Set the default character set.", &default_charset,
|
||||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"count", OPT_COUNT,
|
{"count", OPT_COUNT,
|
||||||
"Show number of rows per table (may be slow for non-MyISAM tables).",
|
"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},
|
0, 0, 0},
|
||||||
{"compress", 'C', "Use compression in server/client protocol.",
|
{"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},
|
0, 0, 0},
|
||||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
{"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},
|
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,
|
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"host", 'h', "Connect to host.", (uchar**) &host, (uchar**) &host, 0, GET_STR,
|
{"host", 'h', "Connect to host.", &host, &host, 0, GET_STR,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"status", 'i', "Shows a lot of extra information about each table.",
|
{"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},
|
0, 0},
|
||||||
{"keys", 'k', "Show keys for table.", (uchar**) &opt_show_keys,
|
{"keys", 'k', "Show keys for table.", &opt_show_keys,
|
||||||
(uchar**) &opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"password", 'p',
|
{"password", 'p',
|
||||||
"Password to use when connecting to server. If password is not given, it's "
|
"Password to use when connecting to server. If password is not given, it's "
|
||||||
"solicited on the tty.",
|
"solicited on the tty.",
|
||||||
@ -203,8 +203,8 @@ static struct my_option my_long_options[] =
|
|||||||
"/etc/services, "
|
"/etc/services, "
|
||||||
#endif
|
#endif
|
||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
(uchar**) &opt_mysql_port,
|
&opt_mysql_port,
|
||||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||||
@ -215,19 +215,20 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"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,
|
||||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||||
|
0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"show-table-type", 't', "Show table type column.",
|
{"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},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
(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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#include <sslopt-longopts.h>
|
#include <sslopt-longopts.h>
|
||||||
#ifndef DONT_ALLOW_USER_CHANGE
|
#ifndef DONT_ALLOW_USER_CHANGE
|
||||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
{"user", 'u', "User for login if not current user.", &user,
|
||||||
(uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"verbose", 'v',
|
{"verbose", 'v',
|
||||||
"More verbose output; you can use this multiple times to get even more "
|
"More verbose output; you can use this multiple times to get even more "
|
||||||
|
@ -525,62 +525,62 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql", 'a',
|
{"auto-generate-sql", 'a',
|
||||||
"Generate SQL where not supplied by file or command line.",
|
"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
|
{"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
|
||||||
"Add an AUTO_INCREMENT column to auto-generated tables.",
|
"Add an AUTO_INCREMENT column to auto-generated tables.",
|
||||||
(uchar**) &auto_generate_sql_autoincrement,
|
&auto_generate_sql_autoincrement,
|
||||||
(uchar**) &auto_generate_sql_autoincrement,
|
&auto_generate_sql_autoincrement,
|
||||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
|
{"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
|
||||||
"Set this number to generate a set number of queries to run.",
|
"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},
|
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
|
{"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
|
||||||
"Add GUID based primary keys to auto-generated tables.",
|
"Add GUID based primary keys to auto-generated tables.",
|
||||||
(uchar**) &auto_generate_sql_guid_primary,
|
&auto_generate_sql_guid_primary,
|
||||||
(uchar**) &auto_generate_sql_guid_primary,
|
&auto_generate_sql_guid_primary,
|
||||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE,
|
{"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.",
|
"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},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql-secondary-indexes",
|
{"auto-generate-sql-secondary-indexes",
|
||||||
OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
|
OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
|
||||||
"Number of secondary indexes to add to auto-generated tables.",
|
"Number of secondary indexes to add to auto-generated tables.",
|
||||||
(uchar**) &auto_generate_sql_secondary_indexes,
|
&auto_generate_sql_secondary_indexes,
|
||||||
(uchar**) &auto_generate_sql_secondary_indexes, 0,
|
&auto_generate_sql_secondary_indexes, 0,
|
||||||
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql-unique-query-number",
|
{"auto-generate-sql-unique-query-number",
|
||||||
OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
|
OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
|
||||||
"Number of unique queries to generate for automatic tests.",
|
"Number of unique queries to generate for automatic tests.",
|
||||||
(uchar**) &auto_generate_sql_unique_query_number,
|
&auto_generate_sql_unique_query_number,
|
||||||
(uchar**) &auto_generate_sql_unique_query_number,
|
&auto_generate_sql_unique_query_number,
|
||||||
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
|
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql-unique-write-number",
|
{"auto-generate-sql-unique-write-number",
|
||||||
OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
|
OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
|
||||||
"Number of unique queries to generate for auto-generate-sql-write-number.",
|
"Number of unique queries to generate for auto-generate-sql-write-number.",
|
||||||
(uchar**) &auto_generate_sql_unique_write_number,
|
&auto_generate_sql_unique_write_number,
|
||||||
(uchar**) &auto_generate_sql_unique_write_number,
|
&auto_generate_sql_unique_write_number,
|
||||||
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
|
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
|
||||||
{"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
|
{"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
|
||||||
"Number of row inserts to perform for each thread (default is 100).",
|
"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},
|
0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0},
|
||||||
{"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"compress", 'C', "Use compression in server/client protocol.",
|
{"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},
|
0, 0, 0},
|
||||||
{"concurrency", 'c', "Number of clients to simulate for query to run.",
|
{"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"create", OPT_SLAP_CREATE_STRING, "File or string to use create tables.",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.",
|
{"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"csv", OPT_SLAP_CSV,
|
{"csv", OPT_SLAP_CSV,
|
||||||
"Generate CSV output to named file or to stdout if no file is named.",
|
"Generate CSV output to named file or to stdout if no file is named.",
|
||||||
@ -590,47 +590,48 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#else
|
#else
|
||||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
{"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},
|
OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
|
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
|
||||||
(uchar**) &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"delimiter", 'F',
|
{"delimiter", 'F',
|
||||||
"Delimiter to use in SQL statements supplied in file or command line.",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"detach", OPT_SLAP_DETACH,
|
{"detach", OPT_SLAP_DETACH,
|
||||||
"Detach (close and reopen) connections after X number of requests.",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"engine", 'e', "Comma separated list of storage engines to use for creating the table."
|
{"engine", 'e',
|
||||||
" The test is run for each engine. You can also specify an option for an engine"
|
"Comma separated list of storage engines to use for creating the table."
|
||||||
" after a `:', like memory:max_row=2300",
|
" The test is run for each engine. You can also specify an option for an "
|
||||||
(uchar**) &default_engine, (uchar**) &default_engine, 0,
|
"engine after a `:', like memory:max_row=2300",
|
||||||
|
&default_engine, &default_engine, 0,
|
||||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"iterations", 'i', "Number of times to run the tests.", (uchar**) &iterations,
|
{"iterations", 'i', "Number of times to run the tests.", &iterations,
|
||||||
(uchar**) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
|
&iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"number-char-cols", 'x',
|
{"number-char-cols", 'x',
|
||||||
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql.",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"number-int-cols", 'y',
|
{"number-int-cols", 'y',
|
||||||
"Number of INT columns to create in table if specifying --auto-generate-sql.",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY,
|
{"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY,
|
||||||
"Limit each client to this number of queries (this is not exact).",
|
"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},
|
GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"only-print", OPT_MYSQL_ONLY_PRINT,
|
{"only-print", OPT_MYSQL_ONLY_PRINT,
|
||||||
"Do not connect to the databases, but instead print out what would have "
|
"Do not connect to the databases, but instead print out what would have "
|
||||||
"been done.",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"password", 'p',
|
{"password", 'p',
|
||||||
"Password to use when connecting to server. If password is not given it's "
|
"Password to use when connecting to server. If password is not given it's "
|
||||||
@ -639,58 +640,54 @@ static struct my_option my_long_options[] =
|
|||||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
{"port", 'P', "Port number to use for connection.", &opt_mysql_port,
|
||||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
|
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
{"post-query", OPT_SLAP_POST_QUERY,
|
{"post-query", OPT_SLAP_POST_QUERY,
|
||||||
"Query to run or file containing query to execute after tests have completed.",
|
"Query to run or file containing query to execute after tests have completed.",
|
||||||
(uchar**) &user_supplied_post_statements,
|
&user_supplied_post_statements, &user_supplied_post_statements,
|
||||||
(uchar**) &user_supplied_post_statements,
|
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"post-system", OPT_SLAP_POST_SYSTEM,
|
{"post-system", OPT_SLAP_POST_SYSTEM,
|
||||||
"system() string to execute after tests have completed.",
|
"system() string to execute after tests have completed.",
|
||||||
(uchar**) &post_system,
|
&post_system, &post_system,
|
||||||
(uchar**) &post_system,
|
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"pre-query", OPT_SLAP_PRE_QUERY,
|
{"pre-query", OPT_SLAP_PRE_QUERY,
|
||||||
"Query to run or file containing query to execute before running tests.",
|
"Query to run or file containing query to execute before running tests.",
|
||||||
(uchar**) &user_supplied_pre_statements,
|
&user_supplied_pre_statements, &user_supplied_pre_statements,
|
||||||
(uchar**) &user_supplied_pre_statements,
|
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"pre-system", OPT_SLAP_PRE_SYSTEM,
|
{"pre-system", OPT_SLAP_PRE_SYSTEM,
|
||||||
"system() string to execute before running tests.",
|
"system() string to execute before running tests.",
|
||||||
(uchar**) &pre_system,
|
&pre_system, &pre_system,
|
||||||
(uchar**) &pre_system,
|
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"query", 'q', "Query to run or file containing query to run.",
|
{"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},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name,
|
"Base name of shared memory.", &shared_memory_base_name,
|
||||||
(uchar**) &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"silent", 's', "Run program in silent mode - no output.",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"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},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#include <sslopt-longopts.h>
|
#include <sslopt-longopts.h>
|
||||||
#ifndef DONT_ALLOW_USER_CHANGE
|
#ifndef DONT_ALLOW_USER_CHANGE
|
||||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
{"user", 'u', "User for login if not current user.", &user,
|
||||||
(uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"verbose", 'v',
|
{"verbose", 'v',
|
||||||
"More verbose output; you can use this multiple times to get even more "
|
"More verbose output; you can use this multiple times to get even more "
|
||||||
"verbose output.", (uchar**) &verbose, (uchar**) &verbose, 0,
|
"verbose output.", &verbose, &verbose, 0, GET_NO_ARG, NO_ARG,
|
||||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
|
{"version", 'V', "Output version information and exit.", 0, 0, 0,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5884,18 +5884,18 @@ static struct my_option my_long_options[] =
|
|||||||
{
|
{
|
||||||
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"basedir", 'b', "Basedir for tests.", (uchar**) &opt_basedir,
|
{"basedir", 'b', "Basedir for tests.", &opt_basedir,
|
||||||
(uchar**) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", (uchar**) &opt_charsets_dir,
|
"Directory for character set files.", &opt_charsets_dir,
|
||||||
(uchar**) &opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compress", 'C', "Use the compressed server/client protocol.",
|
{"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},
|
0, 0, 0},
|
||||||
{"cursor-protocol", OPT_CURSOR_PROTOCOL, "Use cursors for prepared statements.",
|
{"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},
|
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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||||
@ -5905,33 +5905,33 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"global-subst", OPT_GLOBAL_SUBST, "argument should be 'X,Y' ;"
|
{"global-subst", OPT_GLOBAL_SUBST, "argument should be 'X,Y' ;"
|
||||||
" substitute string X with another Y accross the whole test's current"
|
" substitute string X with another Y accross the whole test's current"
|
||||||
" result before comparing with expected result file",
|
" result before comparing with expected result file",
|
||||||
(uchar**) &global_subst, (uchar**) &global_subst, 0,
|
&global_subst, &global_subst, 0,
|
||||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
GET_STR, REQUIRED_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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"include", 'i', "Include SQL before each test case.", (uchar**) &opt_include,
|
{"include", 'i', "Include SQL before each test case.", &opt_include,
|
||||||
(uchar**) &opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"logdir", OPT_LOG_DIR, "Directory for log files", (uchar**) &opt_logdir,
|
{"logdir", OPT_LOG_DIR, "Directory for log files", &opt_logdir,
|
||||||
(uchar**) &opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"mark-progress", OPT_MARK_PROGRESS,
|
{"mark-progress", OPT_MARK_PROGRESS,
|
||||||
"Write line number and elapsed time to <testname>.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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"max-connect-retries", OPT_MAX_CONNECT_RETRIES,
|
{"max-connect-retries", OPT_MAX_CONNECT_RETRIES,
|
||||||
"Maximum number of attempts to connect to server.",
|
"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},
|
GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0},
|
||||||
{"max-connections", OPT_MAX_CONNECTIONS,
|
{"max-connections", OPT_MAX_CONNECTIONS,
|
||||||
"Max number of open connections to server",
|
"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},
|
GET_INT, REQUIRED_ARG, 128, 8, 5120, 0, 0, 0},
|
||||||
{"password", 'p', "Password to use when connecting to server.",
|
{"password", 'p', "Password to use when connecting to server.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -5941,18 +5941,17 @@ static struct my_option my_long_options[] =
|
|||||||
"/etc/services, "
|
"/etc/services, "
|
||||||
#endif
|
#endif
|
||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
(uchar**) &opt_port,
|
&opt_port, &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
(uchar**) &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
{"ps-protocol", OPT_PS_PROTOCOL,
|
{"ps-protocol", OPT_PS_PROTOCOL,
|
||||||
"Use prepared-statement protocol for communication.",
|
"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"quiet", 's', "Suppress all normal output.", (uchar**) &silent,
|
{"quiet", 's', "Suppress all normal output.", &silent,
|
||||||
(uchar**) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"record", 'r', "Record output of test_file into result file.",
|
{"record", 'r', "Record output of test_file into result file.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"result-file", 'R', "Read/store result from/in this file.",
|
{"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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"server-arg", 'A', "Send option value to embedded server as a parameter.",
|
{"server-arg", 'A', "Send option value to embedded server as a parameter.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -5960,28 +5959,28 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name,
|
"Base name of shared memory.", &shared_memory_base_name,
|
||||||
(uchar**) &shared_memory_base_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
&shared_memory_base_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||||
0, 0, 0},
|
0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"silent", 's', "Suppress all normal output. Synonym for --quiet.",
|
{"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,
|
{"skip-safemalloc", OPT_SKIP_SAFEMALLOC,
|
||||||
"Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
"Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"sleep", 'T', "Always sleep this many seconds on sleep commands.",
|
{"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},
|
0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"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},
|
0, 0, 0},
|
||||||
{"sp-protocol", OPT_SP_PROTOCOL, "Use stored procedures for select.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#include "sslopt-longopts.h"
|
#include "sslopt-longopts.h"
|
||||||
{"tail-lines", OPT_TAIL_LINES,
|
{"tail-lines", OPT_TAIL_LINES,
|
||||||
"Number of lines of the result to include in a failure report.",
|
"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},
|
GET_INT, REQUIRED_ARG, 0, 0, 10000, 0, 0, 0},
|
||||||
{"test-file", 'x', "Read test from/in this file (default stdin).",
|
{"test-file", 'x', "Read test from/in this file (default stdin).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -5992,14 +5991,14 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"tmpdir", 't', "Temporary directory where sockets are put.",
|
{"tmpdir", 't', "Temporary directory where sockets are put.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"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},
|
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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"version", 'V', "Output version information and exit.",
|
{"version", 'V', "Output version information and exit.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"view-protocol", OPT_VIEW_PROTOCOL, "Use views for select.",
|
{"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},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
@ -38,11 +38,20 @@ AC_DEFUN([MYSQL_USE_BUNDLED_YASSL], [
|
|||||||
esac
|
esac
|
||||||
AC_SUBST([yassl_taocrypt_extra_cxxflags])
|
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/
|
# Link extra/yassl/include/openssl subdir to include/
|
||||||
yassl_h_ln_cmd="\$(LN) -s \$(top_srcdir)/extra/yassl/include/openssl openssl"
|
yassl_h_ln_cmd="\$(LN) -s \$(top_srcdir)/extra/yassl/include/openssl openssl"
|
||||||
AC_SUBST(yassl_h_ln_cmd)
|
AC_SUBST(yassl_h_ln_cmd)
|
||||||
|
|
||||||
AC_MSG_RESULT([using bundled yaSSL])
|
AC_MSG_RESULT([using bundled yaSSL $yassl_thread_safe])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
17
configure.in
17
configure.in
@ -834,9 +834,9 @@ AC_TYPE_SIZE_T
|
|||||||
AC_HEADER_DIRENT
|
AC_HEADER_DIRENT
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_HEADER_SYS_WAIT
|
AC_HEADER_SYS_WAIT
|
||||||
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h ieeefp.h limits.h \
|
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h fpu_control.h \
|
||||||
memory.h pwd.h select.h fnmatch.h \
|
ieeefp.h limits.h memory.h pwd.h select.h fnmatch.h \
|
||||||
stdlib.h stddef.h sys/stat.h valgrind/memcheck.h \
|
stdlib.h stddef.h sys/stat.h \
|
||||||
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.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 \
|
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
|
||||||
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
|
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
|
||||||
@ -1727,6 +1727,17 @@ else
|
|||||||
CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
|
CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_ARG_WITH([valgrind],
|
||||||
|
[AS_HELP_STRING([--with-valgrind],
|
||||||
|
[Valgrind instrumentation @<:@default=no@:>@])],
|
||||||
|
[], [with_valgrind=no])
|
||||||
|
|
||||||
|
if test "$with_valgrind" != "no"
|
||||||
|
then
|
||||||
|
AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
|
||||||
|
[AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
|
||||||
|
fi
|
||||||
|
|
||||||
# Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it.
|
# Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it.
|
||||||
AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
|
AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
|
||||||
AC_ARG_ENABLE(debug_sync,
|
AC_ARG_ENABLE(debug_sync,
|
||||||
|
@ -99,31 +99,30 @@ static struct my_option my_long_options[]=
|
|||||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#else
|
#else
|
||||||
{"debug", '#', "Output debug log", (uchar**) & default_dbug_option,
|
{"debug", '#', "Output debug log", &default_dbug_option,
|
||||||
(uchar**) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) & info_flag,
|
{"debug-info", 'T', "Print some debug info at exit.", &info_flag,
|
||||||
(uchar**) & info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&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,
|
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"version", 'V', "Prints version", 0, 0, 0, GET_NO_ARG,
|
{"version", 'V', "Prints version", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"charset", 'C', "Charset dir", (uchar**) & charsets_dir,
|
{"charset", 'C', "Charset dir",
|
||||||
(uchar**) & charsets_dir,
|
(char**) &charsets_dir, (char**) &charsets_dir,
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
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},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"out_dir", 'D', "Output base directory", (uchar**) & DATADIRECTORY,
|
{"out_dir", 'D', "Output base directory", &DATADIRECTORY, &DATADIRECTORY,
|
||||||
(uchar**) & DATADIRECTORY,
|
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"out_file", 'O', "Output filename (errmsg.sys)", (uchar**) & OUTFILE,
|
{"out_file", 'O', "Output filename (errmsg.sys)", &OUTFILE,
|
||||||
(uchar**) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"header_file", 'H', "mysqld_error.h file ", (uchar**) & HEADERFILE,
|
{"header_file", 'H', "mysqld_error.h file ", &HEADERFILE,
|
||||||
(uchar**) & HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"name_file", 'N', "mysqld_ername.h file ", (uchar**) & NAMEFILE,
|
{"name_file", 'N', "mysqld_ername.h file ", &NAMEFILE,
|
||||||
(uchar**) & NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"state_file", 'S', "sql_state.h file", (uchar**) & STATEFILE,
|
{"state_file", 'S', "sql_state.h file", &STATEFILE,
|
||||||
(uchar**) & STATEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&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}
|
{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
|
searched for a file of this name (and standard filename extensions are
|
||||||
added if the file has no extension)
|
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",
|
{"config-file", 'c', "Deprecated, please use --defaults-file instead. "
|
||||||
(uchar**) &config_file, (uchar**) &config_file, 0, GET_STR, REQUIRED_ARG,
|
"Name of config file to read; if no extension is given, default "
|
||||||
|
"extension (e.g., .ini or .cnf) will be added",
|
||||||
|
(char**) &config_file, (char**) &config_file, 0, GET_STR, REQUIRED_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#else
|
#else
|
||||||
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
|
{"debug", '#', "Output debug log", &default_dbug_option,
|
||||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#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",
|
{"defaults-file", 'c', "Like --config-file, except: if first option, "
|
||||||
(uchar**) &config_file, (uchar**) &config_file, 0, GET_STR, REQUIRED_ARG,
|
"then read this file only, do not read global or per-user config "
|
||||||
|
"files; should be the first option",
|
||||||
|
(char**) &config_file, (char*) &config_file, 0, GET_STR, REQUIRED_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"defaults-extra-file", 'e',
|
{"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",
|
"Read this file after the global config file and before the config "
|
||||||
(uchar**) &my_defaults_extra_file, (uchar**) &my_defaults_extra_file, 0,
|
"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},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"defaults-group-suffix", 'g',
|
{"defaults-group-suffix", 'g',
|
||||||
"In addition to the given groups, read also groups with this suffix",
|
"In addition to the given groups, read also groups with this suffix",
|
||||||
(uchar**) &my_defaults_group_suffix, (uchar**) &my_defaults_group_suffix,
|
(char**) &my_defaults_group_suffix, (char**) &my_defaults_group_suffix,
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"extra-file", 'e',
|
{"extra-file", 'e',
|
||||||
"Deprecated. Synonym for --defaults-extra-file.",
|
"Deprecated. Synonym for --defaults-extra-file.",
|
||||||
(uchar**) &my_defaults_extra_file,
|
&my_defaults_extra_file,
|
||||||
(uchar**) &my_defaults_extra_file, 0, GET_STR,
|
&my_defaults_extra_file, 0, GET_STR,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
|
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
@ -38,7 +38,7 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0},
|
||||||
{"verbose", 'v',
|
{"verbose", 'v',
|
||||||
"Be more verbose. Give a warning, if kill can't handle signal 0.",
|
"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,
|
{"version", 'V', "Print version information and exit.", 0, 0, 0,
|
||||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
|
@ -60,18 +60,18 @@ static struct my_option my_long_options[] =
|
|||||||
{"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG,
|
{"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||||
{"ndb", 257, "Ndbcluster storage engine specific error codes.", (uchar**) &ndb_code,
|
{"ndb", 257, "Ndbcluster storage engine specific error codes.", &ndb_code,
|
||||||
(uchar**) &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_ERRLIST
|
#ifdef HAVE_SYS_ERRLIST
|
||||||
{"all", 'a', "Print all the error messages and the number.",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"silent", 's', "Only print the error message.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
{"silent", 's', "Only print the error message.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"verbose", 'v', "Print error code and message (default).", (uchar**) &verbose,
|
{"verbose", 'v', "Print error code and message (default).", &verbose,
|
||||||
(uchar**) &verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
&verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"version", 'V', "Displays version information and exits.",
|
{"version", 'V', "Displays version information and exits.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
|
@ -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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"version", 'V', "Output version information and exit.",
|
{"version", 'V', "Output version information and exit.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"symbols-file", 's', "Use specified symbols file.", (uchar**) &sym_fname,
|
{"symbols-file", 's', "Use specified symbols file.", &sym_fname,
|
||||||
(uchar**) &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"numeric-dump-file", 'n', "Read the dump from specified file.",
|
{"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},
|
||||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
@ -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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"info", 'I', "Synonym for --help.",
|
{"info", 'I', "Synonym for --help.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"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},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"version", 'V', "Displays version information and exits.",
|
{"version", 'V', "Displays version information and exits.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
@ -17,7 +17,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/include
|
|||||||
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include
|
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include
|
||||||
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
|
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
|
||||||
|
|
||||||
ADD_DEFINITIONS("-D_LIB -DYASSL_PREFIX")
|
ADD_DEFINITIONS("-D_LIB -DYASSL_PREFIX -DYASSL_THREAD_SAFE")
|
||||||
|
|
||||||
SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
|
SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
|
||||||
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
|
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
|
||||||
|
@ -5,49 +5,49 @@ Certificate:
|
|||||||
Signature Algorithm: md5WithRSAEncryption
|
Signature Algorithm: md5WithRSAEncryption
|
||||||
Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||||
Validity
|
Validity
|
||||||
Not Before: Jan 18 20:12:32 2005 GMT
|
Not Before: Mar 7 03:10:11 2005 GMT
|
||||||
Not After : Oct 15 20:12:32 2007 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: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||||
Subject Public Key Info:
|
Subject Public Key Info:
|
||||||
Public Key Algorithm: rsaEncryption
|
Public Key Algorithm: rsaEncryption
|
||||||
RSA Public Key: (512 bit)
|
RSA Public Key: (512 bit)
|
||||||
Modulus (512 bit):
|
Modulus (512 bit):
|
||||||
00:cf:2b:14:00:b0:3c:df:6f:9e:91:40:ec:c8:f6:
|
00:ef:c1:e3:9a:3c:6e:6e:cb:26:6f:05:be:e0:cb:
|
||||||
90:b2:5b:b4:70:80:a5:a4:0a:73:c7:44:f3:2a:26:
|
57:a0:4b:68:e6:1b:f9:95:db:01:92:aa:6e:a6:b5:
|
||||||
c4:2f:f1:3a:f1:c3:c4:ac:fc:c3:d2:c3:bf:f5:d7:
|
2d:b1:2b:50:fd:db:13:f2:c5:d8:b8:4f:75:28:53:
|
||||||
6a:38:42:ad:22:ab:c8:c4:4b:4c:1d:16:af:05:34:
|
72:e8:e5:11:9d:bb:c3:4f:4f:09:fd:4c:e7:46:d5:
|
||||||
7d:79:97:5e:e1
|
1d:bb:35:02:af
|
||||||
Exponent: 65537 (0x10001)
|
Exponent: 65537 (0x10001)
|
||||||
X509v3 extensions:
|
X509v3 extensions:
|
||||||
X509v3 Subject Key Identifier:
|
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:
|
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
|
DirName:/C=US/ST=Oregon/L=Portland/O=sawtooth/CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||||
serial:00
|
serial:00
|
||||||
|
|
||||||
X509v3 Basic Constraints:
|
X509v3 Basic Constraints:
|
||||||
CA:TRUE
|
CA:TRUE
|
||||||
Signature Algorithm: md5WithRSAEncryption
|
Signature Algorithm: md5WithRSAEncryption
|
||||||
27:f7:3d:fb:39:6f:73:a4:86:f3:a0:48:22:60:84:e9:5c:3d:
|
d9:77:e3:07:d9:2e:ec:2f:9b:8e:9e:ca:b4:00:0b:ef:c7:74:
|
||||||
28:36:05:16:44:98:07:87:e1:5d:b5:f3:a7:bc:33:5f:f4:29:
|
cb:f4:f6:44:2f:02:75:17:a5:74:3e:26:b2:26:fd:1f:ab:3a:
|
||||||
a9:5f:87:33:df:e6:8e:bd:e2:f3:0a:c8:00:69:ae:3d:41:47:
|
df:d5:e3:05:14:08:d0:8c:1d:c9:3e:e1:59:6f:b3:38:5d:af:
|
||||||
03:ea:0b:4c:67:45:4b:ab:f3:39
|
78:60:e3:c5:6a:69:96:80:7d:00
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIC7zCCApmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBiTELMAkGA1UEBhMCVVMx
|
MIIC7zCCApmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBiTELMAkGA1UEBhMCVVMx
|
||||||
DzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxETAPBgNVBAoTCHNh
|
DzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxETAPBgNVBAoTCHNh
|
||||||
d3Rvb3RoMSQwIgYDVQQDExt3d3cuc2F3dG9vdGgtY29uc3VsdGluZy5jb20xHTAb
|
d3Rvb3RoMSQwIgYDVQQDExt3d3cuc2F3dG9vdGgtY29uc3VsdGluZy5jb20xHTAb
|
||||||
BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDExODIwMTIzMloXDTA3
|
BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDMwNzAzMTAxMVoXDTQ2
|
||||||
MTAxNTIwMTIzMlowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP
|
MDQwMTAzMTAxMVowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP
|
||||||
BgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290aDEkMCIGA1UEAxMbd3d3
|
BgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290aDEkMCIGA1UEAxMbd3d3
|
||||||
LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlh
|
LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlh
|
||||||
c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDPKxQAsDzfb56RQOzI9pCy
|
c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDvweOaPG5uyyZvBb7gy1eg
|
||||||
W7RwgKWkCnPHRPMqJsQv8Trxw8Ss/MPSw7/112o4Qq0iq8jES0wdFq8FNH15l17h
|
S2jmG/mV2wGSqm6mtS2xK1D92xPyxdi4T3UoU3Lo5RGdu8NPTwn9TOdG1R27NQKv
|
||||||
AgMBAAGjgekwgeYwHQYDVR0OBBYEFMsPH+midnHJ5ugjpsEYt8xEz7mEMIG2BgNV
|
AgMBAAGjgekwgeYwHQYDVR0OBBYEFB3vobiBeBJH6FcGCHQY99Oq2Pe9MIG2BgNV
|
||||||
HSMEga4wgauAFMsPH+midnHJ5ugjpsEYt8xEz7mEoYGPpIGMMIGJMQswCQYDVQQG
|
HSMEga4wgauAFB3vobiBeBJH6FcGCHQY99Oq2Pe9oYGPpIGMMIGJMQswCQYDVQQG
|
||||||
EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDERMA8GA1UE
|
EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDERMA8GA1UE
|
||||||
ChMIc2F3dG9vdGgxJDAiBgNVBAMTG3d3dy5zYXd0b290aC1jb25zdWx0aW5nLmNv
|
ChMIc2F3dG9vdGgxJDAiBgNVBAMTG3d3dy5zYXd0b290aC1jb25zdWx0aW5nLmNv
|
||||||
bTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb22CAQAwDAYDVR0TBAUwAwEB
|
bTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb22CAQAwDAYDVR0TBAUwAwEB
|
||||||
/zANBgkqhkiG9w0BAQQFAANBACf3Pfs5b3OkhvOgSCJghOlcPSg2BRZEmAeH4V21
|
/zANBgkqhkiG9w0BAQQFAANBANl34wfZLuwvm46eyrQAC+/HdMv09kQvAnUXpXQ+
|
||||||
86e8M1/0KalfhzPf5o694vMKyABprj1BRwPqC0xnRUur8zk=
|
JrIm/R+rOt/V4wUUCNCMHck+4Vlvszhdr3hg48VqaZaAfQA=
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
Binary file not shown.
@ -5,8 +5,8 @@ Certificate:
|
|||||||
Signature Algorithm: md5WithRSAEncryption
|
Signature Algorithm: md5WithRSAEncryption
|
||||||
Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@yassl.com
|
Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||||
Validity
|
Validity
|
||||||
Not Before: Jan 18 19:33:15 2005 GMT
|
Not Before: Mar 7 03:00:31 2005 GMT
|
||||||
Not After : Oct 15 19:33:15 2007 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: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||||
Subject Public Key Info:
|
Subject Public Key Info:
|
||||||
Public Key Algorithm: rsaEncryption
|
Public Key Algorithm: rsaEncryption
|
||||||
@ -29,15 +29,15 @@ Certificate:
|
|||||||
X509v3 Basic Constraints:
|
X509v3 Basic Constraints:
|
||||||
CA:TRUE
|
CA:TRUE
|
||||||
Signature Algorithm: md5WithRSAEncryption
|
Signature Algorithm: md5WithRSAEncryption
|
||||||
c5:82:26:0c:1f:61:01:14:b0:ce:18:99:64:91:0e:f1:f8:90:
|
59:19:ae:1b:4e:65:9e:ca:f1:b8:3d:ff:c7:5e:15:86:10:97:
|
||||||
3e:a3:0e:be:38:7c:97:ba:05:c9:2a:dc:dd:62:2d:12:61:79:
|
8c:3e:22:32:ab:4e:75:a7:70:83:f2:fb:2f:af:fe:26:28:e9:
|
||||||
7a:86:b1:97:5d:1e:e8:f7:e8:32:34:f7:8f:b1:08:3d:13:71:
|
4f:d4:c9:49:7c:6f:51:7e:2a:ff:a0:5b:25:45:2e:66:d9:0d:
|
||||||
a6:3c:15:91:85:12:35:6e:78:87
|
92:94:e5:b8:60:c6:67:1a:f3:03
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIICtzCCAmGgAwIBAgIBADANBgkqhkiG9w0BAQQFADB4MQswCQYDVQQGEwJVUzEP
|
MIICtzCCAmGgAwIBAgIBADANBgkqhkiG9w0BAQQFADB4MQswCQYDVQQGEwJVUzEP
|
||||||
MA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwGA1UEChMFeWFT
|
MA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwGA1UEChMFeWFT
|
||||||
U0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9A
|
U0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9A
|
||||||
eWFzc2wuY29tMB4XDTA1MDExODE5MzMxNVoXDTA3MTAxNTE5MzMxNVoweDELMAkG
|
eWFzc2wuY29tMB4XDTA1MDMwNzAzMDAzMVoXDTQ2MDQwMTAzMDAzMVoweDELMAkG
|
||||||
A1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxDjAM
|
A1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxDjAM
|
||||||
BgNVBAoTBXlhU1NMMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcN
|
BgNVBAoTBXlhU1NMMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcN
|
||||||
AQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDNH3hH
|
AQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDNH3hH
|
||||||
@ -47,6 +47,6 @@ wP/OtbStMIGiBgNVHSMEgZowgZeAFK4lXvpNo1srh97xKvVCwP/OtbStoXykejB4
|
|||||||
MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFu
|
MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFu
|
||||||
ZDEOMAwGA1UEChMFeWFTU0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkq
|
ZDEOMAwGA1UEChMFeWFTU0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkq
|
||||||
hkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZI
|
hkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZI
|
||||||
hvcNAQEEBQADQQDFgiYMH2EBFLDOGJlkkQ7x+JA+ow6+OHyXugXJKtzdYi0SYXl6
|
hvcNAQEEBQADQQBZGa4bTmWeyvG4Pf/HXhWGEJeMPiIyq051p3CD8vsvr/4mKOlP
|
||||||
hrGXXR7o9+gyNPePsQg9E3GmPBWRhRI1bniH
|
1MlJfG9Rfir/oFslRS5m2Q2SlOW4YMZnGvMD
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
@ -5,8 +5,8 @@ Certificate:
|
|||||||
Signature Algorithm: dsaWithSHA1
|
Signature Algorithm: dsaWithSHA1
|
||||||
Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@yassl.com
|
Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@yassl.com
|
||||||
Validity
|
Validity
|
||||||
Not Before: Jan 23 22:54:51 2005 GMT
|
Not Before: Mar 7 03:22:00 2005 GMT
|
||||||
Not After : Oct 20 22:54:51 2007 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: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@yassl.com
|
||||||
Subject Public Key Info:
|
Subject Public Key Info:
|
||||||
Public Key Algorithm: dsaEncryption
|
Public Key Algorithm: dsaEncryption
|
||||||
@ -43,14 +43,14 @@ Certificate:
|
|||||||
X509v3 Basic Constraints:
|
X509v3 Basic Constraints:
|
||||||
CA:TRUE
|
CA:TRUE
|
||||||
Signature Algorithm: dsaWithSHA1
|
Signature Algorithm: dsaWithSHA1
|
||||||
30:2b:02:14:74:46:9f:91:7b:24:17:3b:ee:0f:10:e3:76:62:
|
30:2c:02:14:7e:5e:94:fc:7f:ca:81:ab:b3:32:f7:21:83:48:
|
||||||
f4:dc:81:e6:fd:fe:02:13:08:f4:87:0a:ab:ba:9c:de:3a:69:
|
48:5f:0a:f1:13:ca:02:14:73:54:32:14:51:22:bf:0b:ec:d7:
|
||||||
72:59:b8:ec:e9:57:f4:bf:37
|
6a:6a:fa:a7:1d:46:b4:c2:a3:b5
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIDMTCCAvKgAwIBAgIBADAJBgcqhkjOOAQDMHgxCzAJBgNVBAYTAlVTMQ8wDQYD
|
MIIDMjCCAvKgAwIBAgIBADAJBgcqhkjOOAQDMHgxCzAJBgNVBAYTAlVTMQ8wDQYD
|
||||||
VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMRIwEAYDVQQKEwl5YVNTTCBE
|
VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMRIwEAYDVQQKEwl5YVNTTCBE
|
||||||
U0ExEjAQBgNVBAMTCXlhU1NMIERTQTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNz
|
U0ExEjAQBgNVBAMTCXlhU1NMIERTQTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNz
|
||||||
bC5jb20wHhcNMDUwMTIzMjI1NDUxWhcNMDcxMDIwMjI1NDUxWjB4MQswCQYDVQQG
|
bC5jb20wHhcNMDUwMzA3MDMyMjAwWhcNNDYwNDAxMDMyMjAwWjB4MQswCQYDVQQG
|
||||||
EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDESMBAGA1UE
|
EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDESMBAGA1UE
|
||||||
ChMJeWFTU0wgRFNBMRIwEAYDVQQDEwl5YVNTTCBEU0ExHTAbBgkqhkiG9w0BCQEW
|
ChMJeWFTU0wgRFNBMRIwEAYDVQQDEwl5YVNTTCBEU0ExHTAbBgkqhkiG9w0BCQEW
|
||||||
DmluZm9AeWFzc2wuY29tMIHwMIGoBgcqhkjOOAQBMIGcAkEAmSlpgMk8mGhFqYL+
|
DmluZm9AeWFzc2wuY29tMIHwMIGoBgcqhkjOOAQBMIGcAkEAmSlpgMk8mGhFqYL+
|
||||||
@ -63,6 +63,6 @@ IeRhRHPp4jCBogYDVR0jBIGaMIGXgBS++Yxd1hy07oHdNlYKIeRhRHPp4qF8pHow
|
|||||||
eDELMAkGA1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxh
|
eDELMAkGA1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxh
|
||||||
bmQxEjAQBgNVBAoTCXlhU1NMIERTQTESMBAGA1UEAxMJeWFTU0wgRFNBMR0wGwYJ
|
bmQxEjAQBgNVBAoTCXlhU1NMIERTQTESMBAGA1UEAxMJeWFTU0wgRFNBMR0wGwYJ
|
||||||
KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbYIBADAMBgNVHRMEBTADAQH/MAkGByqG
|
KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbYIBADAMBgNVHRMEBTADAQH/MAkGByqG
|
||||||
SM44BAMDLgAwKwIUdEafkXskFzvuDxDjdmL03IHm/f4CEwj0hwqrupzeOmlyWbjs
|
SM44BAMDLwAwLAIUfl6U/H/KgauzMvchg0hIXwrxE8oCFHNUMhRRIr8L7Ndqavqn
|
||||||
6Vf0vzc=
|
HUa0wqO1
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
@ -5,8 +5,8 @@ Certificate:
|
|||||||
Signature Algorithm: md5WithRSAEncryption
|
Signature Algorithm: md5WithRSAEncryption
|
||||||
Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||||
Validity
|
Validity
|
||||||
Not Before: Jan 18 20:50:59 2005 GMT
|
Not Before: Mar 8 03:00:47 2005 GMT
|
||||||
Not After : Oct 15 20:50:59 2007 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: C=US, ST=Oregon, L=Portland, O=taoSoftDev, CN=www.taosoftdev.com/emailAddress=info@yassl.com
|
||||||
Subject Public Key Info:
|
Subject Public Key Info:
|
||||||
Public Key Algorithm: rsaEncryption
|
Public Key Algorithm: rsaEncryption
|
||||||
@ -19,20 +19,20 @@ Certificate:
|
|||||||
f2:25:93:22:e7
|
f2:25:93:22:e7
|
||||||
Exponent: 65537 (0x10001)
|
Exponent: 65537 (0x10001)
|
||||||
Signature Algorithm: md5WithRSAEncryption
|
Signature Algorithm: md5WithRSAEncryption
|
||||||
08:36:07:8c:3a:7f:f9:91:0a:82:d1:6a:c1:34:be:bc:2d:b2:
|
36:72:12:3b:ac:e4:58:83:09:86:4f:71:2a:3a:0d:8a:05:27:
|
||||||
20:98:dc:45:50:53:9c:66:e6:26:71:bd:fa:d2:b4:91:d3:53:
|
75:f3:3e:62:4f:ab:b8:70:20:cd:ad:70:ab:91:11:68:f8:82:
|
||||||
c0:20:05:c0:b6:84:9a:5f:3f:61:75:f5:fd:c6:ec:e2:f6:9f:
|
33:e2:78:85:a8:16:f5:66:bd:68:2c:5a:26:15:12:1e:6e:83:
|
||||||
a2:13:17:a9:b7:83:60:cc:cb:eb
|
c7:6d:62:b9:c3:ff:e1:86:e4:e6
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIB9zCCAaECAQEwDQYJKoZIhvcNAQEEBQAwgYkxCzAJBgNVBAYTAlVTMQ8wDQYD
|
MIIB9zCCAaECAQEwDQYJKoZIhvcNAQEEBQAwgYkxCzAJBgNVBAYTAlVTMQ8wDQYD
|
||||||
VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290
|
VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290
|
||||||
aDEkMCIGA1UEAxMbd3d3LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZI
|
aDEkMCIGA1UEAxMbd3d3LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZI
|
||||||
hvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0wNTAxMTgyMDUwNTlaFw0wNzEwMTUy
|
hvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0wNTAzMDgwMzAwNDdaFw00NjA0MDIw
|
||||||
MDUwNTlaMIGCMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQH
|
MzAwNDdaMIGCMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQH
|
||||||
EwhQb3J0bGFuZDETMBEGA1UEChMKdGFvU29mdERldjEbMBkGA1UEAxMSd3d3LnRh
|
EwhQb3J0bGFuZDETMBEGA1UEChMKdGFvU29mdERldjEbMBkGA1UEAxMSd3d3LnRh
|
||||||
b3NvZnRkZXYuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0G
|
b3NvZnRkZXYuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0G
|
||||||
CSqGSIb3DQEBAQUAA0sAMEgCQQCkaLu8tydfPPV4xhqvuZX8fmEfqIEKykOImgPg
|
CSqGSIb3DQEBAQUAA0sAMEgCQQCkaLu8tydfPPV4xhqvuZX8fmEfqIEKykOImgPg
|
||||||
0KZ5cBY0uXx1VMpwGWY4vm4ofqX/azyDLzlCwxXzvfIlkyLnAgMBAAEwDQYJKoZI
|
0KZ5cBY0uXx1VMpwGWY4vm4ofqX/azyDLzlCwxXzvfIlkyLnAgMBAAEwDQYJKoZI
|
||||||
hvcNAQEEBQADQQAINgeMOn/5kQqC0WrBNL68LbIgmNxFUFOcZuYmcb360rSR01PA
|
hvcNAQEEBQADQQA2chI7rORYgwmGT3EqOg2KBSd18z5iT6u4cCDNrXCrkRFo+IIz
|
||||||
IAXAtoSaXz9hdfX9xuzi9p+iExept4NgzMvr
|
4niFqBb1Zr1oLFomFRIeboPHbWK5w//hhuTm
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
@ -23,13 +23,21 @@
|
|||||||
#ifndef yaSSL_LOCK_HPP
|
#ifndef yaSSL_LOCK_HPP
|
||||||
#define 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 {
|
namespace yaSSL {
|
||||||
|
|
||||||
|
|
||||||
#ifdef MULTI_THREADED
|
#ifdef YASSL_THREAD_SAFE
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
class Mutex {
|
class Mutex {
|
||||||
CRITICAL_SECTION cs_;
|
CRITICAL_SECTION cs_;
|
||||||
@ -69,7 +77,7 @@ namespace yaSSL {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
#else // MULTI_THREADED (WE'RE SINGLE)
|
#else // YASSL_THREAD_SAFE (WE'RE SINGLE)
|
||||||
|
|
||||||
class Mutex {
|
class Mutex {
|
||||||
public:
|
public:
|
||||||
@ -79,7 +87,7 @@ namespace yaSSL {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MULTI_THREADED
|
#endif // YASSL_THREAD_SAFE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
|
|||||||
handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.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
|
template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
|
||||||
EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
|
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@
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
namespace yaSSL {
|
namespace yaSSL {
|
||||||
|
|
||||||
|
|
||||||
#ifdef MULTI_THREADED
|
#ifdef YASSL_THREAD_SAFE
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
Mutex::Mutex()
|
Mutex::Mutex()
|
||||||
@ -79,7 +79,7 @@ namespace yaSSL {
|
|||||||
|
|
||||||
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
#endif // MULTI_THREADED
|
#endif // YASSL_THREAD_SAFE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL
|
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL
|
||||||
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include)
|
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include)
|
||||||
|
|
||||||
|
ADD_DEFINITIONS("-DYASSL_THREAD_SAFE")
|
||||||
|
|
||||||
SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp
|
SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp
|
||||||
src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp
|
src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp
|
||||||
src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp
|
src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp
|
||||||
|
@ -2,7 +2,7 @@ INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
|
|||||||
noinst_PROGRAMS = benchmark
|
noinst_PROGRAMS = benchmark
|
||||||
benchmark_SOURCES = benchmark.cpp
|
benchmark_SOURCES = benchmark.cpp
|
||||||
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
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
|
EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
|
@ -8,7 +8,8 @@ libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \
|
|||||||
random.cpp ripemd.cpp rsa.cpp sha.cpp template_instnt.cpp \
|
random.cpp ripemd.cpp rsa.cpp sha.cpp template_instnt.cpp \
|
||||||
tftables.cpp twofish.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)
|
EXTRA_DIST = $(wildcard ../include/*.hpp)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
|
|||||||
noinst_PROGRAMS = test
|
noinst_PROGRAMS = test
|
||||||
test_SOURCES = test.cpp
|
test_SOURCES = test.cpp
|
||||||
test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
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
|
EXTRA_DIST = make.bat
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
To use MemoryTracker merely add this file to your project
|
To use MemoryTracker merely add this file to your project
|
||||||
No need to instantiate anything
|
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/client/client.cpp ../examples/server/server.cpp \
|
||||||
../examples/echoclient/echoclient.cpp \
|
../examples/echoclient/echoclient.cpp \
|
||||||
../examples/echoserver/echoserver.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 \
|
testsuite_LDADD = $(top_builddir)/extra/yassl/src/libyassl.la \
|
||||||
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||||
EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat
|
EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat
|
||||||
|
@ -124,9 +124,6 @@ extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
|
|||||||
extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
|
extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
|
||||||
#undef bcmp
|
#undef bcmp
|
||||||
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
|
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
|
||||||
#define bzero_if_valgrind(A,B) bzero(A,B)
|
|
||||||
#else
|
|
||||||
#define bzero_if_valgrind(A,B)
|
|
||||||
#endif /* HAVE_valgrind */
|
#endif /* HAVE_valgrind */
|
||||||
|
|
||||||
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
|
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
|
||||||
|
@ -36,14 +36,14 @@ extern ulong my_time_to_wait_for_lock;
|
|||||||
#define ALARM_END VOID(signal(SIGALRM,alarm_signal)); \
|
#define ALARM_END VOID(signal(SIGALRM,alarm_signal)); \
|
||||||
VOID(alarm(alarm_old));
|
VOID(alarm(alarm_old));
|
||||||
#define ALARM_TEST my_have_got_alarm
|
#define ALARM_TEST my_have_got_alarm
|
||||||
#ifdef DONT_REMEMBER_SIGNAL
|
#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
|
||||||
#define ALARM_REINIT VOID(alarm(MY_HOW_OFTEN_TO_ALARM)); \
|
#define ALARM_REINIT VOID(alarm(MY_HOW_OFTEN_TO_ALARM)); \
|
||||||
VOID(signal(SIGALRM,my_set_alarm_variable));\
|
VOID(signal(SIGALRM,my_set_alarm_variable));\
|
||||||
my_have_got_alarm=0;
|
my_have_got_alarm=0;
|
||||||
#else
|
#else
|
||||||
#define ALARM_REINIT VOID(alarm((uint) MY_HOW_OFTEN_TO_ALARM)); \
|
#define ALARM_REINIT VOID(alarm((uint) MY_HOW_OFTEN_TO_ALARM)); \
|
||||||
my_have_got_alarm=0;
|
my_have_got_alarm=0;
|
||||||
#endif /* DONT_REMEMBER_SIGNAL */
|
#endif /* SIGNAL_HANDLER_RESET_ON_DELIVERY */
|
||||||
#else
|
#else
|
||||||
#define ALARM_VARIABLES long alarm_pos=0,alarm_end_pos=MY_HOW_OFTEN_TO_WRITE-1
|
#define ALARM_VARIABLES long alarm_pos=0,alarm_end_pos=MY_HOW_OFTEN_TO_WRITE-1
|
||||||
#define ALARM_INIT
|
#define ALARM_INIT
|
||||||
|
@ -272,17 +272,6 @@ enum ha_base_keytype {
|
|||||||
#define HA_USES_PARSER 16384 /* Fulltext index uses [pre]parser */
|
#define HA_USES_PARSER 16384 /* Fulltext index uses [pre]parser */
|
||||||
#define HA_USES_BLOCK_SIZE ((uint) 32768)
|
#define HA_USES_BLOCK_SIZE ((uint) 32768)
|
||||||
#define HA_SORT_ALLOWS_SAME 512 /* Intern bit when sorting records */
|
#define HA_SORT_ALLOWS_SAME 512 /* Intern bit when sorting records */
|
||||||
#if MYSQL_VERSION_ID < 0x50200
|
|
||||||
/*
|
|
||||||
Key has a part that can have end space. If this is an unique key
|
|
||||||
we have to handle it differently from other unique keys as we can find
|
|
||||||
many matching rows for one key (because end space are not compared)
|
|
||||||
*/
|
|
||||||
#define HA_END_SPACE_KEY 0 /* was: 4096 */
|
|
||||||
#else
|
|
||||||
#error HA_END_SPACE_KEY is obsolete, please remove it
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* These flags can be added to key-seg-flag */
|
/* These flags can be added to key-seg-flag */
|
||||||
|
|
||||||
|
@ -53,6 +53,8 @@ extern my_bool bitmap_is_overlapping(const MY_BITMAP *map1,
|
|||||||
extern my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit);
|
extern my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit);
|
||||||
extern my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit);
|
extern my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit);
|
||||||
extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit);
|
extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit);
|
||||||
|
extern my_bool bitmap_union_is_set_all(const MY_BITMAP *map1,
|
||||||
|
const MY_BITMAP *map2);
|
||||||
extern uint bitmap_set_next(MY_BITMAP *map);
|
extern uint bitmap_set_next(MY_BITMAP *map);
|
||||||
extern uint bitmap_get_first(const MY_BITMAP *map);
|
extern uint bitmap_get_first(const MY_BITMAP *map);
|
||||||
extern uint bitmap_get_first_set(const MY_BITMAP *map);
|
extern uint bitmap_get_first_set(const MY_BITMAP *map);
|
||||||
|
@ -45,10 +45,10 @@ struct my_option
|
|||||||
const char *name; /* Name of the option */
|
const char *name; /* Name of the option */
|
||||||
int id; /* unique id or short option */
|
int id; /* unique id or short option */
|
||||||
const char *comment; /* option comment, for autom. --help */
|
const char *comment; /* option comment, for autom. --help */
|
||||||
uchar **value; /* The variable value */
|
void *value; /* The variable value */
|
||||||
uchar **u_max_value; /* The user def. max variable value */
|
void *u_max_value; /* The user def. max variable value */
|
||||||
struct st_typelib *typelib; /* Pointer to possible values */
|
struct st_typelib *typelib; /* Pointer to possible values */
|
||||||
ulong var_type;
|
ulong var_type; /* Must match the variable type */
|
||||||
enum get_opt_arg_type arg_type;
|
enum get_opt_arg_type arg_type;
|
||||||
longlong def_value; /* Default value */
|
longlong def_value; /* Default value */
|
||||||
longlong min_value; /* Min allowed value */
|
longlong min_value; /* Min allowed value */
|
||||||
@ -58,8 +58,16 @@ struct my_option
|
|||||||
void *app_type; /* To be used by an application */
|
void *app_type; /* To be used by an application */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
|
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 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 char *disabled_my_option;
|
||||||
extern my_bool my_getopt_print_errors;
|
extern my_bool my_getopt_print_errors;
|
||||||
@ -71,8 +79,7 @@ extern int handle_options (int *argc, char ***argv,
|
|||||||
extern void my_cleanup_options(const struct my_option *options);
|
extern void my_cleanup_options(const struct my_option *options);
|
||||||
extern void my_print_help(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_print_variables(const struct my_option *options);
|
||||||
extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint,
|
extern void my_getopt_register_get_addr(my_getopt_value);
|
||||||
const struct my_option *, int *));
|
|
||||||
|
|
||||||
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
|
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
|
||||||
my_bool *fix);
|
my_bool *fix);
|
||||||
|
@ -55,6 +55,10 @@
|
|||||||
#define USE_PRAGMA_INTERFACE
|
#define USE_PRAGMA_INTERFACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__OpenBSD__) && (OpenBSD >= 200411)
|
||||||
|
#define HAVE_ERRNO_AS_DEFINE
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(i386) && !defined(__i386__)
|
#if defined(i386) && !defined(__i386__)
|
||||||
#define __i386__
|
#define __i386__
|
||||||
#endif
|
#endif
|
||||||
@ -548,8 +552,8 @@ extern "C" int madvise(void *addr, size_t len, int behav);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Does the system remember a signal handler after a signal ? */
|
/* Does the system remember a signal handler after a signal ? */
|
||||||
#ifndef HAVE_BSD_SIGNALS
|
#if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION)
|
||||||
#define DONT_REMEMBER_SIGNAL
|
#define SIGNAL_HANDLER_RESET_ON_DELIVERY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define void to stop lint from generating "null effekt" comments */
|
/* Define void to stop lint from generating "null effekt" comments */
|
||||||
|
@ -37,7 +37,7 @@ extern int NEAR my_errno; /* Last error in mysys */
|
|||||||
|
|
||||||
#define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; }
|
#define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; }
|
||||||
#define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;}
|
#define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;}
|
||||||
#define MY_INIT(name); { my_progname= name; my_init(); }
|
#define MY_INIT(name) { my_progname= name; my_init(); }
|
||||||
|
|
||||||
#define MY_FILE_ERROR ((size_t) -1)
|
#define MY_FILE_ERROR ((size_t) -1)
|
||||||
|
|
||||||
|
@ -24,15 +24,19 @@
|
|||||||
|
|
||||||
#if defined(HAVE_valgrind)&& defined(HAVE_VALGRIND_MEMCHECK_H)
|
#if defined(HAVE_valgrind)&& defined(HAVE_VALGRIND_MEMCHECK_H)
|
||||||
#include <valgrind/memcheck.h>
|
#include <valgrind/memcheck.h>
|
||||||
#else
|
#define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len)
|
||||||
#define VALGRIND_MAKE_MEM_DEFINED(addr, size) do { } while(0)
|
#define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len)
|
||||||
#define VALGRIND_MAKE_MEM_NOACCESS(addr, size) do { } while(0)
|
#define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len)
|
||||||
#ifdef SAFEMALLOC
|
#define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
|
||||||
#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size) bfill(addr, size, 0x8F)
|
#else /* HAVE_VALGRIND */
|
||||||
#else
|
# define MEM_UNDEFINED(a,len) ((void) 0)
|
||||||
#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size) do { } while(0)
|
# define MEM_NOACCESS(a,len) ((void) 0)
|
||||||
#endif /* SAFEMALLOC */
|
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
|
||||||
#endif /* HAVE_valgrind */
|
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
|
||||||
|
#endif /* HAVE_VALGRIND */
|
||||||
|
|
||||||
/* Compatibility with old source */
|
#ifdef SAFEMALLOC
|
||||||
#define TRASH(A,B) VALGRIND_MAKE_MEM_UNDEFINED(A, B)
|
#define TRASH(A,B) do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0)
|
||||||
|
#else
|
||||||
|
#define TRASH(A,B) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while (0)
|
||||||
|
#endif
|
||||||
|
@ -48,8 +48,6 @@ extern "C" {
|
|||||||
|
|
||||||
#define MI_NAME_IEXT ".MYI"
|
#define MI_NAME_IEXT ".MYI"
|
||||||
#define MI_NAME_DEXT ".MYD"
|
#define MI_NAME_DEXT ".MYD"
|
||||||
/* Max extra space to use when sorting keys */
|
|
||||||
#define MI_MAX_TEMP_LENGTH 2*1024L*1024L*1024L
|
|
||||||
|
|
||||||
/* Possible values for myisam_block_size (must be power of 2) */
|
/* Possible values for myisam_block_size (must be power of 2) */
|
||||||
#define MI_KEY_BLOCK_LENGTH 1024 /* default key block length */
|
#define MI_KEY_BLOCK_LENGTH 1024 /* default key block length */
|
||||||
|
@ -16,30 +16,31 @@
|
|||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
|
|
||||||
{"ssl", OPT_SSL_SSL,
|
{"ssl", OPT_SSL_SSL,
|
||||||
"Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl.",
|
"Enable SSL for connection (automatically enabled with other flags)."
|
||||||
(uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
"Disable with --skip-ssl.", &opt_use_ssl, &opt_use_ssl, 0, GET_BOOL,
|
||||||
0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"ssl-ca", OPT_SSL_CA,
|
{"ssl-ca", OPT_SSL_CA,
|
||||||
"CA file in PEM format (check OpenSSL docs, implies --ssl).",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"ssl-capath", OPT_SSL_CAPATH,
|
{"ssl-capath", OPT_SSL_CAPATH,
|
||||||
"CA directory (check OpenSSL docs, implies --ssl).",
|
"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).",
|
{"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},
|
0, 0, 0, 0, 0, 0},
|
||||||
#ifdef MYSQL_CLIENT
|
#ifdef MYSQL_CLIENT
|
||||||
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
|
{"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.",
|
"Verify server's \"Common Name\" in its cert against hostname used "
|
||||||
(uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_server_cert,
|
"when connecting. This option is disabled by default.",
|
||||||
|
&opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert,
|
||||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
#endif /* HAVE_OPENSSL */
|
#endif /* HAVE_OPENSSL */
|
||||||
|
@ -332,7 +332,7 @@ sig_handler
|
|||||||
my_pipe_sig_handler(int sig __attribute__((unused)))
|
my_pipe_sig_handler(int sig __attribute__((unused)))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info",("Hit by signal %d",sig));
|
DBUG_PRINT("info",("Hit by signal %d",sig));
|
||||||
#ifdef DONT_REMEMBER_SIGNAL
|
#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
|
||||||
(void) signal(SIGPIPE, my_pipe_sig_handler);
|
(void) signal(SIGPIPE, my_pipe_sig_handler);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -2447,7 +2447,12 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
|||||||
stmt->insert_id= mysql->insert_id;
|
stmt->insert_id= mysql->insert_id;
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, net);
|
/*
|
||||||
|
Don't set stmt error if stmt->mysql is NULL, as the error in this case
|
||||||
|
has already been set by mysql_prune_stmt_list().
|
||||||
|
*/
|
||||||
|
if (stmt->mysql)
|
||||||
|
set_stmt_errmsg(stmt, net);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
@ -2658,7 +2663,12 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
|
|||||||
buff, sizeof(buff), (uchar*) 0, 0,
|
buff, sizeof(buff), (uchar*) 0, 0,
|
||||||
1, stmt))
|
1, stmt))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, net);
|
/*
|
||||||
|
Don't set stmt error if stmt->mysql is NULL, as the error in this case
|
||||||
|
has already been set by mysql_prune_stmt_list().
|
||||||
|
*/
|
||||||
|
if (stmt->mysql)
|
||||||
|
set_stmt_errmsg(stmt, net);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if ((*mysql->methods->read_rows_from_cursor)(stmt))
|
if ((*mysql->methods->read_rows_from_cursor)(stmt))
|
||||||
@ -3339,7 +3349,12 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
|
|||||||
buff, sizeof(buff), (uchar*) data,
|
buff, sizeof(buff), (uchar*) data,
|
||||||
length, 1, stmt))
|
length, 1, stmt))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, &mysql->net);
|
/*
|
||||||
|
Don't set stmt error if stmt->mysql is NULL, as the error in this case
|
||||||
|
has already been set by mysql_prune_stmt_list().
|
||||||
|
*/
|
||||||
|
if (stmt->mysql)
|
||||||
|
set_stmt_errmsg(stmt, &mysql->net);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4774,7 +4789,12 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
|
|||||||
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
|
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
|
||||||
(uchar*) 0, 0, 1, stmt))
|
(uchar*) 0, 0, 1, stmt))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, net);
|
/*
|
||||||
|
Don't set stmt error if stmt->mysql is NULL, as the error in this case
|
||||||
|
has already been set by mysql_prune_stmt_list().
|
||||||
|
*/
|
||||||
|
if (stmt->mysql)
|
||||||
|
set_stmt_errmsg(stmt, net);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,8 @@ TEST_DIRS = t r include std_data std_data/parts collections \
|
|||||||
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
|
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
|
||||||
suite/vcol suite/vcol/t suite/vcol/r suite/vcol/inc \
|
suite/vcol suite/vcol/t suite/vcol/r suite/vcol/inc \
|
||||||
suite/oqgraph suite/oqgraph/t suite/oqgraph/r suite/oqgraph/include \
|
suite/oqgraph suite/oqgraph/t suite/oqgraph/r suite/oqgraph/include \
|
||||||
|
suite/innodb_plugin suite/innodb_plugin/t suite/innodb_plugin/r suite/innodb_plugin/include \
|
||||||
|
suite/percona \
|
||||||
suite/engines suite/engines/funcs suite/engines/iuds suite/engines/rr_trx \
|
suite/engines suite/engines/funcs suite/engines/iuds suite/engines/rr_trx \
|
||||||
suite/engines/funcs/r suite/engines/funcs/t suite/engines/iuds/r \
|
suite/engines/funcs/r suite/engines/funcs/t suite/engines/iuds/r \
|
||||||
suite/engines/iuds/t suite/engines/rr_trx/include suite/engines/rr_trx/r \
|
suite/engines/iuds/t suite/engines/rr_trx/include suite/engines/rr_trx/r \
|
||||||
|
@ -13,12 +13,15 @@ funcs_1.ndb* # joro : NDB tests marked as experiment
|
|||||||
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
|
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
|
||||||
|
|
||||||
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
||||||
|
main.func_str @solaris # joro: Bug#40928
|
||||||
main.plugin_load @solaris # Bug#42144
|
main.plugin_load @solaris # Bug#42144
|
||||||
|
main.sp @solaris # joro : Bug#54138
|
||||||
main.outfile_loaddata @solaris # joro : Bug #46895
|
main.outfile_loaddata @solaris # joro : Bug #46895
|
||||||
|
|
||||||
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||||
|
|
||||||
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
|
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
|
||||||
|
rpl.rpl_row_sp011 @solaris # Joro : Bug #54138
|
||||||
|
|
||||||
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||||
rpl_ndb.rpl_ndb_log # Bug#38998
|
rpl_ndb.rpl_ndb_log # Bug#38998
|
||||||
@ -39,3 +42,5 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
|
|||||||
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||||
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||||
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||||
|
main.mysqlhotcopy_myisam # horst: due to bug#54129
|
||||||
|
main.mysqlhotcopy_archive # horst: due to bug#54129
|
||||||
|
@ -41,13 +41,10 @@ while ($1)
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
commit;
|
commit;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
show binlog events in 'master-bin.000001' from 106;
|
--source include/show_binlog_events.inc
|
||||||
--replace_column 2 # 5 #
|
--let $binlog_file=
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
|
||||||
show binlog events in 'master-bin.000002' from 106;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#22540 - Incorrect value in column End_log_pos of
|
# Bug#22540 - Incorrect value in column End_log_pos of
|
||||||
@ -77,8 +74,7 @@ insert into t1 values (2);
|
|||||||
insert into t1 values (3);
|
insert into t1 values (3);
|
||||||
commit;
|
commit;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
--source include/show_binlog_events.inc
|
||||||
show binlog events from 0;
|
|
||||||
|
|
||||||
# now show that nothing breaks if we need to read from the cache more
|
# now show that nothing breaks if we need to read from the cache more
|
||||||
# than once, resulting in split event-headers
|
# than once, resulting in split event-headers
|
||||||
@ -100,8 +96,7 @@ while ($1)
|
|||||||
commit;
|
commit;
|
||||||
enable_query_log;
|
enable_query_log;
|
||||||
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
--source include/show_binlog_events.inc
|
||||||
show binlog events from 0;
|
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
@ -122,8 +117,7 @@ set @b= 14632475938453979136;
|
|||||||
execute stmt using @a, @b;
|
execute stmt using @a, @b;
|
||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
--source include/show_binlog_events.inc
|
||||||
show binlog events from 0;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -249,14 +243,15 @@ reset master;
|
|||||||
drop table if exists t3;
|
drop table if exists t3;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
|
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
|
||||||
show master status;
|
source include/show_master_status.inc;
|
||||||
let $it=4;
|
let $it=4;
|
||||||
while ($it)
|
while ($it)
|
||||||
{
|
{
|
||||||
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
|
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
|
||||||
dec $it;
|
dec $it;
|
||||||
}
|
}
|
||||||
show master status /* must show new binlog index after rotating */;
|
# must show new binlog index after rotating;
|
||||||
|
source include/show_master_status.inc;
|
||||||
drop table t3;
|
drop table t3;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -125,12 +125,7 @@ select * from t1;
|
|||||||
select * from t2;
|
select * from t2;
|
||||||
select * from t3;
|
select * from t3;
|
||||||
|
|
||||||
let $VERSION=`select version()`;
|
--source include/show_binlog_events.inc
|
||||||
--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 t1,t2,t3;
|
drop table t1,t2,t3;
|
||||||
|
|
||||||
@ -168,18 +163,21 @@ set autocommit=0;
|
|||||||
start transaction;
|
start transaction;
|
||||||
insert into t1 values(1);
|
insert into t1 values(1);
|
||||||
commit;
|
commit;
|
||||||
|
|
||||||
|
let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
start transaction;
|
start transaction;
|
||||||
insert into t1 values(2);
|
insert into t1 values(2);
|
||||||
rollback;
|
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;
|
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;
|
drop table if exists t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -214,7 +214,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
|
|||||||
|
|
||||||
# execute
|
# execute
|
||||||
--error ER_DUP_ENTRY
|
--error ER_DUP_ENTRY
|
||||||
UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
|
UPDATE t3,t4 SET t3.a = t4.a + bug27417(1) where t3.a = 1;
|
||||||
|
|
||||||
# check
|
# check
|
||||||
select count(*) from t1 /* must be 1 */;
|
select count(*) from t1 /* must be 1 */;
|
||||||
|
@ -61,7 +61,7 @@ sync_with_master;
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SELECT * FROM t3;
|
SELECT * FROM t3;
|
||||||
# Check that no error is reported
|
# Check that no error is reported
|
||||||
--source include/show_slave_status2.inc
|
source include/check_slave_is_running.inc;
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
# 2) Test lock wait timeout
|
# 2) Test lock wait timeout
|
||||||
@ -89,7 +89,7 @@ sync_with_master;
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SELECT * FROM t3;
|
SELECT * FROM t3;
|
||||||
# Check that no error is reported
|
# Check that no error is reported
|
||||||
--source include/show_slave_status2.inc
|
source include/check_slave_is_running.inc;
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
# 3) Test lock wait timeout and purged relay log
|
# 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
|
--source include/stop_slave.inc
|
||||||
DELETE FROM t2;
|
DELETE FROM t2;
|
||||||
# Set slave position to the BEGIN log event
|
# 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;
|
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
# Hold lock
|
# Hold lock
|
||||||
@ -119,7 +120,7 @@ sync_with_master;
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SELECT * FROM t3;
|
SELECT * FROM t3;
|
||||||
# Check that no error is reported
|
# Check that no error is reported
|
||||||
--source include/show_slave_status2.inc
|
source include/check_slave_is_running.inc;
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
@ -146,12 +146,7 @@ SELECT COUNT(*) FROM t1;
|
|||||||
--echo
|
--echo
|
||||||
SELECT * FROM t1 ORDER BY f3 LIMIT 20;
|
SELECT * FROM t1 ORDER BY f3 LIMIT 20;
|
||||||
|
|
||||||
--echo
|
--source include/check_slave_is_running.inc
|
||||||
--echo * Show Slave Status *
|
|
||||||
--echo
|
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
|
||||||
--query_vertical show slave status;
|
|
||||||
--echo
|
|
||||||
|
|
||||||
### Altering table def scenario
|
### Altering table def scenario
|
||||||
--echo
|
--echo
|
||||||
@ -431,16 +426,14 @@ connection master;
|
|||||||
delete from t4;
|
delete from t4;
|
||||||
delete from t31;
|
delete from t31;
|
||||||
|
|
||||||
--echo
|
|
||||||
--echo ** Check slave status **
|
|
||||||
--echo
|
|
||||||
#connection slave;
|
#connection slave;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
select * from t31;
|
select * from t31;
|
||||||
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--echo
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--echo ** Check slave status **
|
||||||
--query_vertical show slave status;
|
--echo
|
||||||
|
--source include/check_slave_is_running.inc
|
||||||
|
|
||||||
#### Clean Up ####
|
#### Clean Up ####
|
||||||
|
|
||||||
@ -493,16 +486,15 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
|||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1523 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo
|
--echo
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $slave_skip_counter= 2
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--let $show_slave_sql_error= 1
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo *** Drop t10 ***
|
--echo *** Drop t10 ***
|
||||||
@ -550,16 +542,15 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
|||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1523 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo
|
--echo
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $slave_skip_counter= 2
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--let $show_slave_sql_error= 1
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo *** Drop t11 ***
|
--echo *** Drop t11 ***
|
||||||
@ -697,10 +688,10 @@ SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
|
|||||||
# Remove below once fixed
|
# Remove below once fixed
|
||||||
#***************************
|
#***************************
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1091 = ER_CANT_DROP_FIELD_OR_KEY
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1091
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error.inc
|
||||||
#***************************
|
#***************************
|
||||||
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
@ -763,10 +754,10 @@ SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
|
|||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo
|
--echo
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1054 = ER_BAD_FIELD_ERROR
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1054
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error.inc
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
@ -840,10 +831,10 @@ SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
|
|||||||
--echo *****************
|
--echo *****************
|
||||||
--echo
|
--echo
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1072 = ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1072
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error.inc
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
|
@ -96,10 +96,9 @@ SELECT * FROM t2 ORDER BY a;
|
|||||||
--echo *** Start Slave ***
|
--echo *** Start Slave ***
|
||||||
connection slave;
|
connection slave;
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $show_slave_sql_error= 1
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--source include/wait_for_slave_sql_error.inc
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
@ -146,15 +145,13 @@ set @b1 = concat(@b1,@b1);
|
|||||||
INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING');
|
INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING');
|
||||||
|
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t3 ***
|
--echo *** Drop t3 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -191,15 +188,13 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
|||||||
(30000.22,4,'QA TESTING');
|
(30000.22,4,'QA TESTING');
|
||||||
|
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t4 ***
|
--echo *** Drop t4 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -236,15 +231,13 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
|||||||
(2,'JOE',300.01,0,'b2b2',1.0000009);
|
(2,'JOE',300.01,0,'b2b2',1.0000009);
|
||||||
|
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t5 ***
|
--echo *** Drop t5 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -282,13 +275,12 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
|||||||
(2,'JOE',300.01,0);
|
(2,'JOE',300.01,0);
|
||||||
|
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $show_slave_sql_error= 1
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--source include/wait_for_slave_sql_error.inc
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||||
#START SLAVE;
|
#START SLAVE;
|
||||||
|
|
||||||
@ -387,12 +379,10 @@ INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||||||
### Uncomment once bug is fixed
|
### Uncomment once bug is fixed
|
||||||
|
|
||||||
#connection slave;
|
#connection slave;
|
||||||
#wait_for_slave_to_stop;
|
#--let $slave_sql_errno= SOMETHING
|
||||||
#--replace_result $MASTER_MYPORT MASTER_PORT
|
#--let $slave_skip_counter= 2
|
||||||
#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
#--let $show_slave_sql_error= 1
|
||||||
#--query_vertical SHOW SLAVE STATUS
|
#--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
#START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t8 ***
|
--echo *** Drop t8 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -451,12 +441,10 @@ if (`SELECT $engine_type != 'NDB'`)
|
|||||||
# todo: fix Bug #43992 slave sql thread can't tune own sql_mode ...
|
# todo: fix Bug #43992 slave sql thread can't tune own sql_mode ...
|
||||||
# and add/restore waiting for stop test
|
# and add/restore waiting for stop test
|
||||||
|
|
||||||
#--source include/wait_for_slave_sql_to_stop.inc
|
#--let $slave_sql_errno= SOMETHING
|
||||||
#--replace_result $MASTER_MYPORT MASTER_PORT
|
#--let $slave_skip_counter= 2
|
||||||
#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
#--let $show_slave_sql_error= 1
|
||||||
#--query_vertical SHOW SLAVE STATUS
|
#--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
#START SLAVE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#--echo *** Drop t9 ***
|
#--echo *** Drop t9 ***
|
||||||
@ -491,15 +479,13 @@ set @b1 = concat(@b1,@b1);
|
|||||||
INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||||
|
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t10 ***
|
--echo *** Drop t10 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -535,15 +521,13 @@ set @b1 = concat(@b1,@b1);
|
|||||||
INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||||
|
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t11 ***
|
--echo *** Drop t11 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -810,12 +794,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
|
|||||||
--echo *** Expect slave to fail with Error 1060 ***
|
--echo *** Expect slave to fail with Error 1060 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1060
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 1
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Try to insert in master ****
|
--echo *** Try to insert in master ****
|
||||||
connection master;
|
connection master;
|
||||||
@ -918,15 +900,13 @@ connection master;
|
|||||||
INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
||||||
|
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo ** DROP table t17 ***
|
--echo ** DROP table t17 ***
|
||||||
connection master;
|
connection master;
|
||||||
|
@ -20,19 +20,15 @@ rename table t1 to t5, t2 to t1;
|
|||||||
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
|
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
|
||||||
flush no_write_to_binlog tables;
|
flush no_write_to_binlog tables;
|
||||||
# Check that it's not in the binlog.
|
# Check that it's not in the binlog.
|
||||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
let $binlog_start= $rename_event_pos;
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
|
|
||||||
# Check that the master is not confused.
|
# Check that the master is not confused.
|
||||||
select * from t3;
|
select * from t3;
|
||||||
# This FLUSH should go into the binlog to not confuse the slave.
|
# This FLUSH should go into the binlog to not confuse the slave.
|
||||||
flush tables;
|
flush tables;
|
||||||
# Check that it's in the binlog.
|
# Check that it's in the binlog.
|
||||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
let $wait_binlog_event= flush tables;
|
||||||
--replace_column 2 # 5 #
|
source include/wait_for_binlog_event.inc;
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
|
|
||||||
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
# Check that the slave is not confused.
|
# Check that the slave is not confused.
|
||||||
|
@ -68,19 +68,15 @@ eval SET DEBUG_SYNC=$debug_sync_action;
|
|||||||
|
|
||||||
# Show slave last IO errno
|
# Show slave last IO errno
|
||||||
connection slave;
|
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
|
--echo Check network error happened here
|
||||||
if (`SELECT '$last_io_errno' = '2013' || # CR_SERVER_LOST
|
# '2013' CR_SERVER_LOST
|
||||||
'$last_io_errno' = '2003' || # CR_CONN_HOST_ERROR
|
# '2003' CR_CONN_HOST_ERROR
|
||||||
'$last_io_errno' = '2002' || # CR_CONNECTION_ERROR
|
# '2002' CR_CONNECTION_ERROR
|
||||||
'$last_io_errno' = '2006' || # CR_SERVER_GONE_ERROR
|
# '2006' CR_SERVER_GONE_ERROR
|
||||||
'$last_io_errno' = '1040' || # ER_CON_COUNT_ERROR
|
# '1040' ER_CON_COUNT_ERROR
|
||||||
'$last_io_errno' = '1053' # ER_SERVER_SHUTDOWN
|
# '1053' ER_SERVER_SHUTDOWN
|
||||||
`)
|
let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013;
|
||||||
{
|
source include/wait_for_slave_io_error.inc;
|
||||||
--echo NETWORK ERROR
|
|
||||||
}
|
|
||||||
|
|
||||||
# deactivate the sync point of get_master_version_and_clock()
|
# deactivate the sync point of get_master_version_and_clock()
|
||||||
# now to avoid restarting IO-thread to re-enter it.
|
# now to avoid restarting IO-thread to re-enter it.
|
||||||
|
@ -90,7 +90,7 @@ connection master;
|
|||||||
# Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but
|
# Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but
|
||||||
# on the slave
|
# on the slave
|
||||||
#
|
#
|
||||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
if ($binlog_format_statement)
|
||||||
{
|
{
|
||||||
#flush the logs before the test
|
#flush the logs before the test
|
||||||
connection slave;
|
connection slave;
|
||||||
@ -103,22 +103,23 @@ CREATE TABLE t1(a int, UNIQUE(a));
|
|||||||
INSERT DELAYED IGNORE INTO t1 VALUES(1);
|
INSERT DELAYED IGNORE INTO t1 VALUES(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
|
flush table t1; # to wait for INSERT DELAYED to be done
|
||||||
|
if ($binlog_format_statement)
|
||||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
|
||||||
{
|
{
|
||||||
#must show two INSERT DELAYED
|
#must show two INSERT DELAYED
|
||||||
--replace_column 1 x 2 x 3 x 4 x 5 x
|
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
show binlog events in 'master-bin.000002' LIMIT 2,2;
|
--let $binlog_limit= 1,2
|
||||||
|
--source include/show_binlog_events.inc
|
||||||
}
|
}
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
echo On slave;
|
echo On slave;
|
||||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
if ($binlog_format_statement)
|
||||||
{
|
{
|
||||||
#must show two INSERT DELAYED
|
#must show two INSERT DELAYED
|
||||||
--replace_column 1 x 2 x 3 x 4 x 5 x
|
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
show binlog events in 'slave-bin.000002' LIMIT 2,2;
|
--let $binlog_limit= 1,2
|
||||||
|
--source include/show_binlog_events.inc
|
||||||
}
|
}
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
# (otherwise RESET MASTER may come too early).
|
# (otherwise RESET MASTER may come too early).
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
source include/stop_slave.inc;
|
source include/stop_slave.inc;
|
||||||
--source include/wait_for_slave_to_stop.inc
|
|
||||||
reset master;
|
reset master;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
source include/start_slave.inc;
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
|
|
||||||
let $VERSION=`select version()`;
|
let $VERSION=`select version()`;
|
||||||
|
|
||||||
@ -31,19 +29,17 @@ eval create table t1 (word char(20) not null)ENGINE=$engine_type;
|
|||||||
--replace_result $LOAD_FILE LOAD_FILE
|
--replace_result $LOAD_FILE LOAD_FILE
|
||||||
eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
|
eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
|
||||||
select count(*) from t1;
|
select count(*) from t1;
|
||||||
--replace_result $VERSION VERSION
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
let $binlog_limit= 1;
|
||||||
show binlog events;
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
let $binlog_limit= 2;
|
||||||
show binlog events from 106 limit 1;
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
let $binlog_limit= 2,1;
|
||||||
show binlog events from 106 limit 2;
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
let $binlog_limit=;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events from 106 limit 2,1;
|
|
||||||
flush logs;
|
flush logs;
|
||||||
|
|
||||||
# We need an extra update before doing save_master_pos.
|
# We need an extra update before doing save_master_pos.
|
||||||
@ -84,27 +80,24 @@ connection master;
|
|||||||
eval create table t2 (n int)ENGINE=$engine_type;
|
eval create table t2 (n int)ENGINE=$engine_type;
|
||||||
insert into t2 values (1);
|
insert into t2 values (1);
|
||||||
source include/show_binlog_events.inc;
|
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'/
|
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events in 'master-bin.000002';
|
|
||||||
--replace_column 2 #
|
--replace_column 2 #
|
||||||
show binary logs;
|
show binary logs;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
--replace_column 2 #
|
--replace_column 2 #
|
||||||
show binary logs;
|
show binary logs;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
|
||||||
--replace_column 2 # 5 #
|
let $binlog_file=;
|
||||||
--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /INFILE '.+'/INFILE 'words.dat'/
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events in 'slave-bin.000001' from 4;
|
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
let $binlog_file=;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events in 'slave-bin.000002' from 4;
|
source include/check_slave_is_running.inc;
|
||||||
source include/show_slave_status.inc;
|
|
||||||
|
|
||||||
# Need to recode the following
|
# 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;
|
select @@global.max_relay_log_size;
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
source include/show_slave_status2.inc;
|
--source include/check_slave_is_running.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 2
|
--echo # Test 2
|
||||||
@ -55,7 +55,7 @@ set global max_relay_log_size=(5*4096);
|
|||||||
query_vertical select @@global.max_relay_log_size;
|
query_vertical select @@global.max_relay_log_size;
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
source include/show_slave_status2.inc;
|
--source include/check_slave_is_running.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 3: max_relay_log_size = 0
|
--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;
|
query_vertical select @@global.max_relay_log_size;
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
source include/show_slave_status2.inc;
|
--source include/check_slave_is_running.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
--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
|
# test of relay log rotation when the slave is stopped
|
||||||
# (to make sure it does not crash).
|
# (to make sure it does not crash).
|
||||||
flush logs;
|
flush logs;
|
||||||
source include/show_slave_status2.inc;
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 5
|
--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.
|
# log we just closed. But a trick to achieve this is do an update on the master.
|
||||||
connection master;
|
connection master;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
--source include/check_slave_is_running.inc
|
||||||
sync_with_master;
|
|
||||||
source include/show_slave_status2.inc;
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
--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;
|
flush logs;
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
--source include/check_slave_is_running.inc
|
||||||
sync_with_master;
|
|
||||||
source include/show_slave_status2.inc;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
# test that the absence of relay logs does not make a master crash
|
# 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 # since insert is done with transactional engine, expect a BEGIN
|
||||||
--echo # at <start_pos>
|
--echo # at <start_pos>
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 5 #
|
--let $binlog_limit= 1
|
||||||
--eval show binlog events from $start_pos limit 1
|
--source include/show_binlog_events.inc
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo # Now the insert, one step after
|
--echo # Now the insert, one step after
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 2 # 5 #
|
--let $binlog_limit= 1,1
|
||||||
--eval show binlog events from $start_pos limit 1,1
|
--source include/show_binlog_events.inc
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo # and the COMMIT should be at <end_pos>
|
--echo # and the COMMIT should be at <end_pos>
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos> $end_pos <end_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 2 #
|
--let $binlog_limit= 2,1
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--source include/show_binlog_events.inc
|
||||||
--eval show binlog events from $start_pos limit 2,1
|
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
@ -89,18 +88,17 @@ commit;
|
|||||||
--source include/select_ndb_apply_status.inc
|
--source include/select_ndb_apply_status.inc
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
--replace_result $start_pos <start_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 5 #
|
--let $binlog_limit= 1
|
||||||
--eval show binlog events from $start_pos limit 1
|
--source include/show_binlog_events.inc
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 2 # 4 # 5 #
|
--let $binlog_limit= 1,2
|
||||||
--eval show binlog events from $start_pos limit 1,2
|
--source include/show_binlog_events.inc
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos> $end_pos <end_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 2 #
|
--let $binlog_limit= 3,1
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--source include/show_binlog_events.inc
|
||||||
--eval show binlog events from $start_pos limit 3,1
|
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
|
68
mysql-test/extra/rpl_tests/rpl_record_compare.test
Normal file
68
mysql-test/extra/rpl_tests/rpl_record_compare.test
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
#
|
||||||
|
# BUG#52868: Wrong handling of NULL value during update, replication out of sync
|
||||||
|
#
|
||||||
|
-- echo ## case #1 - last_null_bit_pos==0 in record_compare without X bit
|
||||||
|
|
||||||
|
-- source include/master-slave-reset.inc
|
||||||
|
-- connection master
|
||||||
|
|
||||||
|
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
|
||||||
|
|
||||||
|
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
|
||||||
|
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
|
||||||
|
-- disable_warnings
|
||||||
|
UPDATE t1 SET c5 = 'a';
|
||||||
|
-- enable_warnings
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
-- let $diff_table_1= master:test.t1
|
||||||
|
-- let $diff_table_2= slave:test.t1
|
||||||
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
|
--connection master
|
||||||
|
DROP TABLE t1;
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
-- echo ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
|
||||||
|
-- echo ## (1 column less and no varchar)
|
||||||
|
-- source include/master-slave-reset.inc
|
||||||
|
-- connection master
|
||||||
|
|
||||||
|
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
|
||||||
|
|
||||||
|
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
|
||||||
|
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
|
||||||
|
-- disable_warnings
|
||||||
|
UPDATE t1 SET c5 = 'a';
|
||||||
|
-- enable_warnings
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
-- let $diff_table_1= master:test.t1
|
||||||
|
-- let $diff_table_2= slave:test.t1
|
||||||
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
|
--connection master
|
||||||
|
DROP TABLE t1;
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
-- echo ## case #2 - X bit is wrongly set.
|
||||||
|
|
||||||
|
-- source include/master-slave-reset.inc
|
||||||
|
-- connection master
|
||||||
|
|
||||||
|
-- eval CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=$engine DEFAULT CHARSET= latin1
|
||||||
|
INSERT INTO t1(c1) VALUES (10);
|
||||||
|
INSERT INTO t1(c1) VALUES (NULL);
|
||||||
|
UPDATE t1 SET c1= 0;
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
-- let $diff_table_1= master:test.t1
|
||||||
|
-- let $diff_table_2= slave:test.t1
|
||||||
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
|
-- connection master
|
||||||
|
DROP TABLE t1;
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
|
@ -9,36 +9,32 @@
|
|||||||
# RESET SLAVE.
|
# RESET SLAVE.
|
||||||
|
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
connection master;
|
sync_slave_with_master;
|
||||||
save_master_pos;
|
let $status_items= Master_User, Master_Host;
|
||||||
connection slave;
|
source include/show_slave_status.inc;
|
||||||
sync_with_master;
|
|
||||||
source include/show_slave_status2.inc;
|
|
||||||
|
|
||||||
stop slave;
|
source include/stop_slave.inc;
|
||||||
change master to master_user='test';
|
change master to master_user='test';
|
||||||
source include/show_slave_status2.inc;
|
source include/show_slave_status.inc;
|
||||||
|
|
||||||
reset slave;
|
reset slave;
|
||||||
source include/show_slave_status2.inc;
|
source include/show_slave_status.inc;
|
||||||
|
|
||||||
start slave;
|
source include/start_slave.inc;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
source include/show_slave_status2.inc;
|
source include/show_slave_status.inc;
|
||||||
|
|
||||||
# test of crash with temp tables & RESET SLAVE
|
# test of crash with temp tables & RESET SLAVE
|
||||||
# (test to see if RESET SLAVE clears temp tables in memory and disk)
|
# (test to see if RESET SLAVE clears temp tables in memory and disk)
|
||||||
stop slave;
|
source include/stop_slave.inc;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
source include/start_slave.inc;
|
||||||
connection master;
|
connection master;
|
||||||
create temporary table t1 (a int);
|
create temporary table t1 (a int);
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
source include/stop_slave.inc;
|
||||||
sync_with_master;
|
|
||||||
stop slave;
|
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
source include/start_slave.inc;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
show status like 'slave_open_temp_tables';
|
show status like 'slave_open_temp_tables';
|
||||||
|
|
||||||
@ -47,10 +43,9 @@ show status like 'slave_open_temp_tables';
|
|||||||
#
|
#
|
||||||
|
|
||||||
# clearing the status
|
# clearing the status
|
||||||
stop slave;
|
source include/stop_slave.inc;
|
||||||
reset slave;
|
reset slave;
|
||||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
source include/check_slave_no_error.inc;
|
||||||
echo *** errno must be zero: $last_io_errno ***;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# verifying start slave resets Last_IO_Error and Last_IO_Errno.
|
# verifying start slave resets Last_IO_Error and Last_IO_Errno.
|
||||||
@ -58,19 +53,13 @@ echo *** errno must be zero: $last_io_errno ***;
|
|||||||
|
|
||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
|
let $slave_io_errno= 1045;
|
||||||
source include/wait_for_slave_io_error.inc;
|
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;
|
source include/stop_slave.inc;
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
source include/check_slave_no_error.inc;
|
||||||
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 ***
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# verifying reset slave resets Last_{IO,SQL}_Err{or,no}
|
# verifying reset slave resets Last_{IO,SQL}_Err{or,no}
|
||||||
@ -79,19 +68,9 @@ let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
|
|||||||
source include/stop_slave.inc;
|
source include/stop_slave.inc;
|
||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
|
let $slave_io_errno= 1045;
|
||||||
source include/wait_for_slave_io_error.inc;
|
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;
|
source include/stop_slave.inc;
|
||||||
reset slave;
|
reset slave;
|
||||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
source include/check_slave_no_error.inc;
|
||||||
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 ***
|
|
||||||
|
@ -259,10 +259,7 @@ DELETE FROM t1;
|
|||||||
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
set @@global.slave_exec_mode= default;
|
set @@global.slave_exec_mode= default;
|
||||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
source include/check_slave_is_running.inc;
|
||||||
disable_query_log;
|
|
||||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
|
||||||
enable_query_log;
|
|
||||||
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||||
|
|
||||||
# BUG#37076: TIMESTAMP/DATETIME values are not replicated correctly
|
# BUG#37076: TIMESTAMP/DATETIME values are not replicated correctly
|
||||||
@ -376,11 +373,10 @@ INSERT INTO t3 VALUES (1, "", 1);
|
|||||||
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
|
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
--let $slave_sql_errno= 1535
|
||||||
disable_query_log;
|
--let $show_slave_sql_error= 1
|
||||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
--source include/wait_for_slave_sql_error.inc
|
||||||
enable_query_log;
|
|
||||||
connection master;
|
connection master;
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
connection slave;
|
connection slave;
|
||||||
@ -405,11 +401,10 @@ INSERT INTO t5 VALUES (1, "", 1);
|
|||||||
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
--let $slave_sql_errno= 1535
|
||||||
disable_query_log;
|
--let $show_slave_sql_error= 1
|
||||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
--source include/wait_for_slave_sql_error.inc
|
||||||
enable_query_log;
|
|
||||||
connection master;
|
connection master;
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
connection slave;
|
connection slave;
|
||||||
@ -424,11 +419,10 @@ INSERT INTO t6 VALUES (1, "", 1);
|
|||||||
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
--let $slave_sql_errno= 1535
|
||||||
disable_query_log;
|
--let $show_slave_sql_error= 1
|
||||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
--source include/wait_for_slave_sql_error.inc
|
||||||
enable_query_log;
|
|
||||||
connection master;
|
connection master;
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
connection slave;
|
connection slave;
|
||||||
|
@ -138,9 +138,7 @@ SELECT * FROM t2;
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--echo **** On Slave ****
|
--echo **** On Slave ****
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--source include/check_slave_is_running.inc
|
||||||
--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
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t9 VALUES (4);
|
INSERT INTO t9 VALUES (4);
|
||||||
@ -149,12 +147,10 @@ sync_slave_with_master;
|
|||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t4 VALUES (4);
|
INSERT INTO t4 VALUES (4);
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_skip_counter= 2
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--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>
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t9 VALUES (5);
|
INSERT INTO t9 VALUES (5);
|
||||||
@ -163,12 +159,10 @@ sync_slave_with_master;
|
|||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t5 VALUES (5,10,25);
|
INSERT INTO t5 VALUES (5,10,25);
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_skip_counter= 2
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--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>
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t9 VALUES (6);
|
INSERT INTO t9 VALUES (6);
|
||||||
@ -177,19 +171,15 @@ sync_slave_with_master;
|
|||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t6 VALUES (6,12,36);
|
INSERT INTO t6 VALUES (6,12,36);
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_skip_counter= 2
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--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>
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t9 VALUES (6);
|
INSERT INTO t9 VALUES (6);
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
--source include/check_slave_is_running.inc
|
||||||
--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
|
|
||||||
|
|
||||||
# Testing some tables extra field that can be null and cannot be null
|
# Testing some tables extra field that can be null and cannot be null
|
||||||
# (but have default values)
|
# (but have default values)
|
||||||
|
96
mysql-test/include/check_concurrent_insert.inc
Normal file
96
mysql-test/include/check_concurrent_insert.inc
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
#
|
||||||
|
# SUMMARY
|
||||||
|
# Check if statement reading table '$table' allows concurrent
|
||||||
|
# inserts in it.
|
||||||
|
#
|
||||||
|
# PARAMETERS
|
||||||
|
# $table Table in which concurrent inserts should be allowed.
|
||||||
|
# $con_aux1 Name of the first auxiliary connection to be used by this
|
||||||
|
# script.
|
||||||
|
# $con_aux2 Name of the second auxiliary connection to be used by this
|
||||||
|
# script.
|
||||||
|
# $statement Statement to be checked.
|
||||||
|
# $restore_table Table which might be modified by statement to be checked
|
||||||
|
# and thus needs backing up before its execution and
|
||||||
|
# restoring after it (can be empty).
|
||||||
|
#
|
||||||
|
# EXAMPLE
|
||||||
|
# lock_sync.test
|
||||||
|
#
|
||||||
|
--disable_result_log
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
# Reset DEBUG_SYNC facility for safety.
|
||||||
|
set debug_sync= "RESET";
|
||||||
|
|
||||||
|
if (`SELECT '$restore_table' <> ''`)
|
||||||
|
{
|
||||||
|
--eval create temporary table t_backup select * from $restore_table;
|
||||||
|
}
|
||||||
|
|
||||||
|
connection $con_aux1;
|
||||||
|
set debug_sync='after_lock_tables_takes_lock SIGNAL parked WAIT_FOR go';
|
||||||
|
--send_eval $statement;
|
||||||
|
|
||||||
|
connection $con_aux2;
|
||||||
|
set debug_sync='now WAIT_FOR parked';
|
||||||
|
--send_eval insert into $table (i) values (0);
|
||||||
|
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
||||||
|
connection default;
|
||||||
|
# Wait until concurrent insert is successfully executed while
|
||||||
|
# statement being checked has its tables locked.
|
||||||
|
# We use wait_condition.inc instead of simply reaping
|
||||||
|
# concurrent insert here in order to avoid deadlocks if test
|
||||||
|
# fails and to time out gracefully instead.
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 0 from information_schema.processlist
|
||||||
|
where info = "insert into $table (i) values (0)";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--disable_result_log
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
if ($success)
|
||||||
|
{
|
||||||
|
# Apparently concurrent insert was successfully executed.
|
||||||
|
# To be safe against wait_condition.inc succeeding due to
|
||||||
|
# races let us first reap concurrent insert to ensure that
|
||||||
|
# it has really been successfully executed.
|
||||||
|
connection $con_aux2;
|
||||||
|
--reap
|
||||||
|
connection default;
|
||||||
|
set debug_sync= 'now SIGNAL go';
|
||||||
|
connection $con_aux1;
|
||||||
|
--reap
|
||||||
|
connection default;
|
||||||
|
--echo Success: '$statement' allows concurrent inserts into '$table'.
|
||||||
|
}
|
||||||
|
if (!$success)
|
||||||
|
{
|
||||||
|
# Waiting has timed out. Apparently concurrent insert was blocked.
|
||||||
|
# So to be able to continue we need to end our statement first.
|
||||||
|
set debug_sync= 'now SIGNAL go';
|
||||||
|
connection $con_aux1;
|
||||||
|
--reap
|
||||||
|
connection $con_aux2;
|
||||||
|
--reap
|
||||||
|
connection default;
|
||||||
|
--echo Error: '$statement' doesn't allow concurrent inserts into '$table'!
|
||||||
|
}
|
||||||
|
|
||||||
|
--eval delete from $table where i = 0;
|
||||||
|
|
||||||
|
if (`SELECT '$restore_table' <> ''`)
|
||||||
|
{
|
||||||
|
--eval truncate table $restore_table;
|
||||||
|
--eval insert into $restore_table select * from t_backup;
|
||||||
|
drop temporary table t_backup;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clean-up. Reset DEBUG_SYNC facility after use.
|
||||||
|
set debug_sync= "RESET";
|
||||||
|
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
81
mysql-test/include/check_no_concurrent_insert.inc
Normal file
81
mysql-test/include/check_no_concurrent_insert.inc
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
#
|
||||||
|
# SUMMARY
|
||||||
|
# Check that statement reading table '$table' doesn't allow concurrent
|
||||||
|
# inserts in it.
|
||||||
|
#
|
||||||
|
# PARAMETERS
|
||||||
|
# $table Table in which concurrent inserts should be disallowed.
|
||||||
|
# $con_aux1 Name of the first auxiliary connection to be used by this
|
||||||
|
# script.
|
||||||
|
# $con_aux2 Name of the second auxiliary connection to be used by this
|
||||||
|
# script.
|
||||||
|
# $statement Statement to be checked.
|
||||||
|
# $restore_table Table which might be modified by statement to be checked
|
||||||
|
# and thus needs backing up before its execution and
|
||||||
|
# restoring after it (can be empty).
|
||||||
|
#
|
||||||
|
# EXAMPLE
|
||||||
|
# lock_sync.test
|
||||||
|
#
|
||||||
|
--disable_result_log
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
# Reset DEBUG_SYNC facility for safety.
|
||||||
|
set debug_sync= "RESET";
|
||||||
|
|
||||||
|
if (`SELECT '$restore_table' <> ''`)
|
||||||
|
{
|
||||||
|
--eval create temporary table t_backup select * from $restore_table;
|
||||||
|
}
|
||||||
|
|
||||||
|
connection $con_aux1;
|
||||||
|
set debug_sync='after_lock_tables_takes_lock SIGNAL parked WAIT_FOR go';
|
||||||
|
--send_eval $statement;
|
||||||
|
|
||||||
|
connection $con_aux2;
|
||||||
|
set debug_sync='now WAIT_FOR parked';
|
||||||
|
--send_eval insert into $table (i) values (0);
|
||||||
|
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
||||||
|
connection default;
|
||||||
|
# Wait until concurrent insert is successfully blocked because
|
||||||
|
# of our statement.
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Locked" and info = "insert into $table (i) values (0)";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--disable_result_log
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
set debug_sync= 'now SIGNAL go';
|
||||||
|
connection $con_aux1;
|
||||||
|
--reap
|
||||||
|
connection $con_aux2;
|
||||||
|
--reap
|
||||||
|
connection default;
|
||||||
|
|
||||||
|
if ($success)
|
||||||
|
{
|
||||||
|
--echo Success: '$statement' doesn't allow concurrent inserts into '$table'.
|
||||||
|
}
|
||||||
|
if (!$success)
|
||||||
|
{
|
||||||
|
--echo Error: '$statement' allows concurrent inserts into '$table'!
|
||||||
|
}
|
||||||
|
|
||||||
|
--eval delete from $table where i = 0;
|
||||||
|
|
||||||
|
if (`SELECT '$restore_table' <> ''`)
|
||||||
|
{
|
||||||
|
--eval truncate table $restore_table;
|
||||||
|
--eval insert into $restore_table select * from t_backup;
|
||||||
|
drop temporary table t_backup;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clean-up. Reset DEBUG_SYNC facility after use.
|
||||||
|
set debug_sync= "RESET";
|
||||||
|
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
71
mysql-test/include/check_no_row_lock.inc
Normal file
71
mysql-test/include/check_no_row_lock.inc
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#
|
||||||
|
# SUMMARY
|
||||||
|
# Check if statement affecting or reading table '$table' doesn't
|
||||||
|
# take any kind of locks on its rows.
|
||||||
|
#
|
||||||
|
# PARAMETERS
|
||||||
|
# $table Table for which presence of row locks should be checked.
|
||||||
|
# $con_aux Name of auxiliary connection to be used by this script.
|
||||||
|
# $statement Statement to be checked.
|
||||||
|
#
|
||||||
|
# EXAMPLE
|
||||||
|
# innodb_mysql_lock2.test
|
||||||
|
#
|
||||||
|
--disable_result_log
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
begin;
|
||||||
|
--eval select * from $table for update;
|
||||||
|
|
||||||
|
connection $con_aux;
|
||||||
|
begin;
|
||||||
|
--send_eval $statement;
|
||||||
|
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
# Wait until statement is successfully executed while
|
||||||
|
# all rows in table are X-locked. This means that it
|
||||||
|
# does not acquire any row locks.
|
||||||
|
# We use wait_condition.inc instead of simply reaping
|
||||||
|
# statement here in order to avoid deadlocks if test
|
||||||
|
# fails and to time out gracefully instead.
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 0 from information_schema.processlist
|
||||||
|
where info = "$statement";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--disable_result_log
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
if ($success)
|
||||||
|
{
|
||||||
|
# Apparently statement was successfully executed and thus it
|
||||||
|
# has not required any row locks.
|
||||||
|
# To be safe against wait_condition.inc succeeding due to
|
||||||
|
# races let us first reap the statement being checked to
|
||||||
|
# ensure that it has been successfully executed.
|
||||||
|
connection $con_aux;
|
||||||
|
--reap
|
||||||
|
rollback;
|
||||||
|
connection default;
|
||||||
|
rollback;
|
||||||
|
--echo Success: '$statement' doesn't take row locks on '$table'.
|
||||||
|
}
|
||||||
|
if (!$success)
|
||||||
|
{
|
||||||
|
# Waiting has timed out. Apparently statement was blocked on
|
||||||
|
# some row lock. So to be able to continue we need to unlock
|
||||||
|
# rows first.
|
||||||
|
rollback;
|
||||||
|
connection $con_aux;
|
||||||
|
--reap
|
||||||
|
rollback;
|
||||||
|
connection default;
|
||||||
|
--echo Error: '$statement' takes some row locks on '$table'!
|
||||||
|
}
|
||||||
|
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
61
mysql-test/include/check_shared_row_lock.inc
Normal file
61
mysql-test/include/check_shared_row_lock.inc
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
#
|
||||||
|
# SUMMARY
|
||||||
|
# Check if statement reading table '$table' takes shared locks
|
||||||
|
# on some of its rows.
|
||||||
|
#
|
||||||
|
# PARAMETERS
|
||||||
|
# $table Table for which presence of row locks should be checked.
|
||||||
|
# $con_aux Name of auxiliary connection to be used by this script.
|
||||||
|
# $statement Statement to be checked.
|
||||||
|
# $wait_statement Sub-statement which is supposed to acquire locks (should
|
||||||
|
# be the same as $statement for ordinary statements).
|
||||||
|
#
|
||||||
|
# EXAMPLE
|
||||||
|
# innodb_mysql_lock2.test
|
||||||
|
#
|
||||||
|
--disable_result_log
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
begin;
|
||||||
|
--eval select * from $table for update;
|
||||||
|
|
||||||
|
connection $con_aux;
|
||||||
|
begin;
|
||||||
|
--send_eval $statement;
|
||||||
|
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
# Wait until statement is successfully blocked because
|
||||||
|
# all rows in table are X-locked. This means that at
|
||||||
|
# least it acquires S-locks on some of rows.
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state in ("Sending data","statistics", "preparing") and
|
||||||
|
info = "$wait_statement";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--disable_result_log
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
rollback;
|
||||||
|
|
||||||
|
connection $con_aux;
|
||||||
|
--reap
|
||||||
|
rollback;
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
if ($success)
|
||||||
|
{
|
||||||
|
--echo Success: '$statement' takes shared row locks on '$table'.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$success)
|
||||||
|
{
|
||||||
|
--echo Error: '$statement' hasn't taken shared row locks on '$table'!
|
||||||
|
}
|
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
|
@ -1,4 +1,4 @@
|
|||||||
disable_query_log;
|
disable_query_log;
|
||||||
--require r/true.require
|
--require r/true.require
|
||||||
SELECT (plugin_library LIKE 'ha_innodb_plugin%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
|
SELECT (plugin_library LIKE 'ha_innodb_plugin%' OR plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
|
||||||
enable_query_log;
|
enable_query_log;
|
||||||
|
4
mysql-test/include/have_real_innodb_plugin.inc
Normal file
4
mysql-test/include/have_real_innodb_plugin.inc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
disable_query_log;
|
||||||
|
--require r/true.require
|
||||||
|
SELECT (plugin_library LIKE 'ha_innodb_plugin%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
|
||||||
|
enable_query_log;
|
4
mysql-test/include/have_xtradb.inc
Normal file
4
mysql-test/include/have_xtradb.inc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
disable_query_log;
|
||||||
|
--require r/true.require
|
||||||
|
SELECT (plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
|
||||||
|
enable_query_log;
|
121
mysql-test/include/mysqlhotcopy.inc
Normal file
121
mysql-test/include/mysqlhotcopy.inc
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
# Test of mysqlhotcopy (perl script)
|
||||||
|
# Author: Horst Hunger
|
||||||
|
# Created: 2010-05-10
|
||||||
|
|
||||||
|
--source include/not_windows.inc
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
|
if ($MYSQLHOTCOPY)
|
||||||
|
{
|
||||||
|
die due to missing mysqlhotcopy tool;
|
||||||
|
}
|
||||||
|
|
||||||
|
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||||
|
--disable_warnings
|
||||||
|
DROP DATABASE IF EXISTS hotcopy_test;
|
||||||
|
--enable_warnings
|
||||||
|
CREATE DATABASE hotcopy_test;
|
||||||
|
USE hotcopy_test;
|
||||||
|
eval CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||||
|
eval CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||||
|
eval CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||||
|
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||||
|
INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||||
|
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_test
|
||||||
|
|
||||||
|
# backup into another database in the same directory
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||||
|
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||||
|
|
||||||
|
USE hotcopy_save;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
SELECT * FROM t2;
|
||||||
|
SELECT * FROM t3;
|
||||||
|
|
||||||
|
# restore data into the original database with mysqlhotcopy
|
||||||
|
if(`SELECT engine= 'MyISAM' FROM information_schema.tables WHERE table_name='t1'`)
|
||||||
|
{
|
||||||
|
USE hotcopy_test;
|
||||||
|
DELETE FROM t1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--exec $MYSQLHOTCOPY --quiet --addtodest -S $MASTER_MYSOCK -u root hotcopy_save hotcopy_test
|
||||||
|
|
||||||
|
USE hotcopy_save;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
SELECT * FROM t2;
|
||||||
|
SELECT * FROM t3;
|
||||||
|
}
|
||||||
|
|
||||||
|
USE hotcopy_test;
|
||||||
|
DROP TABLE t2;
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_test
|
||||||
|
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--exec $MYSQLHOTCOPY --quiet --addtodest -S $MASTER_MYSOCK -u root hotcopy_save hotcopy_test
|
||||||
|
|
||||||
|
FLUSH TABLES;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
SELECT * FROM t2;
|
||||||
|
SELECT * FROM t3;
|
||||||
|
|
||||||
|
# backup of db into a directory
|
||||||
|
USE hotcopy_test;
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test $MYSQLTEST_VARDIR/tmp
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--list_files $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||||
|
#--exec rm -rf $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||||
|
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/hotcopy_test *
|
||||||
|
--rmdir $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||||
|
|
||||||
|
# backup without full index files
|
||||||
|
# reproduction of bug#53556, "--list_files" shows MYI files, which is wrong.
|
||||||
|
DROP DATABASE hotcopy_save;
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--exec $MYSQLHOTCOPY --quiet --noindices -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||||
|
|
||||||
|
# test of option "allowold"
|
||||||
|
DROP DATABASE hotcopy_save;
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--error 9,2304
|
||||||
|
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||||
|
|
||||||
|
# test of option "keepold"
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--exec $MYSQLHOTCOPY --quiet --keepold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_save_old
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||||
|
|
||||||
|
# test of option "suffix"
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
|
--exec $MYSQLHOTCOPY --quiet --suffix=_cpy -S $MASTER_MYSOCK -u root hotcopy_test
|
||||||
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
|
--list_files $MYSQLD_DATADIR/hotcopy_test_cpy
|
||||||
|
DROP DATABASE hotcopy_test_cpy;
|
||||||
|
|
||||||
|
DROP DATABASE hotcopy_test;
|
||||||
|
DROP DATABASE hotcopy_save;
|
||||||
|
DROP DATABASE hotcopy_save_old;
|
||||||
|
|
95
mysql-test/include/percona_query_cache_with_comments.inc
Normal file
95
mysql-test/include/percona_query_cache_with_comments.inc
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
--source include/percona_query_cache_with_comments_clear.inc
|
||||||
|
let $query=/* with comment first */select * from t1;
|
||||||
|
eval $query;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=# with comment first
|
||||||
|
select * from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=-- with comment first
|
||||||
|
select * from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=/* with comment first and "quote" */select * from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=# with comment first and "quote"
|
||||||
|
select * from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=-- with comment first and "quote"
|
||||||
|
select * from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=
|
||||||
|
/* with comment and whitespaces first */select * from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=
|
||||||
|
# with comment and whitespaces first
|
||||||
|
select * from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=
|
||||||
|
-- with comment and whitespaces first
|
||||||
|
select * from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $internal=* internal comment *;
|
||||||
|
|
||||||
|
let $query=select * /$internal/ from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
let $query=select */$internal/ from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
let $query=select */$internal/from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $internal=* internal comment with "quote" *;
|
||||||
|
|
||||||
|
let $query=select * /$internal/ from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
let $query=select */$internal/ from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
let $query=select */$internal/from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1
|
||||||
|
;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1 ;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1 ;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1
|
||||||
|
/* comment in the end */;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1
|
||||||
|
/* *\/ */;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1
|
||||||
|
/* comment in the end */
|
||||||
|
;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1 #comment in the end;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1 #comment in the end
|
||||||
|
;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1 -- comment in the end;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select * from t1 -- comment in the end
|
||||||
|
;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
||||||
|
|
||||||
|
let $query=select ' \' ' from t1;
|
||||||
|
--source include/percona_query_cache_with_comments_eval.inc
|
@ -0,0 +1,12 @@
|
|||||||
|
-- source include/have_query_cache.inc
|
||||||
|
|
||||||
|
set GLOBAL query_cache_size=1355776;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
create table t1 (a int not null);
|
||||||
|
insert into t1 values (1),(2),(3);
|
||||||
|
|
||||||
|
--source include/percona_query_cache_with_comments_clear.inc
|
@ -0,0 +1,5 @@
|
|||||||
|
# Reset query cache variables.
|
||||||
|
flush query cache; # This crashed in some versions
|
||||||
|
flush query cache; # This crashed in some versions
|
||||||
|
reset query cache;
|
||||||
|
flush status;
|
@ -0,0 +1,3 @@
|
|||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL query_cache_size=default;
|
||||||
|
set global query_cache_strip_comments=OFF;
|
@ -0,0 +1,7 @@
|
|||||||
|
echo -----------------------------------------------------;
|
||||||
|
echo $query;
|
||||||
|
echo -----------------------------------------------------;
|
||||||
|
--source include/percona_query_cache_with_comments_show.inc
|
||||||
|
eval $query;
|
||||||
|
eval $query;
|
||||||
|
--source include/percona_query_cache_with_comments_show.inc
|
@ -0,0 +1,8 @@
|
|||||||
|
let $show=show status like "Qcache_queries_in_cache";
|
||||||
|
eval $show;
|
||||||
|
let $show=show status like "Qcache_inserts";
|
||||||
|
eval $show;
|
||||||
|
let $show=show status like "Qcache_hits";
|
||||||
|
eval $show;
|
||||||
|
|
||||||
|
|
@ -80,9 +80,8 @@ eval INSERT INTO t1 SET f1= $MAX + 1;
|
|||||||
SELECT MAX(f1) FROM t1;
|
SELECT MAX(f1) FROM t1;
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= master-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
@ -93,9 +92,8 @@ connection slave;
|
|||||||
SELECT MAX(f1) FROM t1;
|
SELECT MAX(f1) FROM t1;
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= slave-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
@ -111,9 +109,8 @@ let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT;
|
|||||||
SELECT MAX(f1) FROM t1;
|
SELECT MAX(f1) FROM t1;
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= master-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
@ -124,9 +121,8 @@ connection slave;
|
|||||||
SELECT MAX(f1) FROM t1;
|
SELECT MAX(f1) FROM t1;
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= slave-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
@ -150,9 +146,8 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ',
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= master-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
@ -171,9 +166,8 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ',
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= slave-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
|
@ -1,10 +1,45 @@
|
|||||||
# $binlog_start can be set by caller or take a default value
|
##############################################################################
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
if (!$binlog_start)
|
if (!$binlog_start)
|
||||||
{
|
{
|
||||||
let $binlog_start=106;
|
# 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 (`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_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
|
||||||
--replace_column 2 # 4 # 5 #
|
--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=#/
|
--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 from $binlog_start
|
--eval $_statement
|
||||||
|
@ -36,6 +36,7 @@ let $_con= $CURRENT_CONNECTION;
|
|||||||
--echo
|
--echo
|
||||||
--echo [on $_con]
|
--echo [on $_con]
|
||||||
--echo
|
--echo
|
||||||
|
SELECT NOW();
|
||||||
--echo **** SHOW SLAVE STATUS on $_con ****
|
--echo **** SHOW SLAVE STATUS on $_con ****
|
||||||
query_vertical SHOW SLAVE STATUS;
|
query_vertical SHOW SLAVE STATUS;
|
||||||
--echo
|
--echo
|
||||||
@ -70,6 +71,7 @@ if (`SELECT '$_master_con' != ''`)
|
|||||||
--echo [on $_master_con]
|
--echo [on $_master_con]
|
||||||
connection $_master_con;
|
connection $_master_con;
|
||||||
--echo
|
--echo
|
||||||
|
SELECT NOW();
|
||||||
--echo **** SHOW MASTER STATUS on $_master_con ****
|
--echo **** SHOW MASTER STATUS on $_master_con ****
|
||||||
query_vertical SHOW MASTER STATUS;
|
query_vertical SHOW MASTER STATUS;
|
||||||
--echo
|
--echo
|
||||||
|
@ -1,6 +1,25 @@
|
|||||||
# Include file to show the slave status, masking out some information
|
# Include file to show the slave status, masking out some information
|
||||||
# that varies depending on where the test is executed.
|
# that varies depending on where the test is executed.
|
||||||
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $_items=$status_items
|
||||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
|
if (`SELECT "XX$status_items" = "XX"`)
|
||||||
query_vertical SHOW SLAVE STATUS;
|
{
|
||||||
|
--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
|
|
||||||
--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;
|
connection slave;
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $show_slave_sql_error= 1
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--source include/wait_for_slave_sql_error.inc
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
|
|
||||||
# The following should be 0
|
# The following should be 0
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
|
@ -18,7 +18,7 @@ while (`SELECT INSTR("$_last_event","$wait_binlog_event") = 0`)
|
|||||||
dec $_loop_count;
|
dec $_loop_count;
|
||||||
if (!$_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
|
--die ERROR: failed while waiting for $wait_binlog_event in binlog
|
||||||
}
|
}
|
||||||
real_sleep 0.1;
|
real_sleep 0.1;
|
||||||
|
@ -1,23 +1,59 @@
|
|||||||
# ==== Purpose ====
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# Waits until the IO thread of the current connection has got an
|
# 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 ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
|
# # Wait several errors.
|
||||||
|
# let $slave_io_errno= 1, 2, 3;
|
||||||
# source include/wait_for_slave_io_error.inc;
|
# source include/wait_for_slave_io_error.inc;
|
||||||
#
|
#
|
||||||
# Parameters to this macro are $slave_timeout and
|
# # Print error message
|
||||||
# $slave_keep_connection. See wait_for_slave_param.inc for
|
# let $slave_io_errno= 1;
|
||||||
# descriptions.
|
# 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 $old_slave_param_comparison= $slave_param_comparison;
|
||||||
|
|
||||||
let $slave_param= Last_IO_Errno;
|
let $slave_param= Last_IO_Errno;
|
||||||
let $slave_param_comparison= !=;
|
let $slave_param_comparison= !=;
|
||||||
let $slave_param_value= 0;
|
let $slave_param_value= 0;
|
||||||
let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
|
let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
|
||||||
source include/wait_for_slave_param.inc;
|
source include/wait_for_slave_param.inc;
|
||||||
let $slave_error_message= ;
|
let $slave_error_message= ;
|
||||||
|
|
||||||
let $slave_param_comparison= $old_slave_param_comparison;
|
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;
|
||||||
|
}
|
||||||
|
@ -78,5 +78,5 @@ if (!$_slave_timeout_counter)
|
|||||||
--echo Current connection is '$CURRENT_CONNECTION'
|
--echo Current connection is '$CURRENT_CONNECTION'
|
||||||
echo Note: the following output may have changed since the failure was detected;
|
echo Note: the following output may have changed since the failure was detected;
|
||||||
source include/show_rpl_debug_info.inc;
|
source include/show_rpl_debug_info.inc;
|
||||||
exit;
|
die;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
# The expected SQL error number. This is required.
|
# The expected SQL error number. This is required.
|
||||||
# (After BUG#41956 has been fixed, this will be required to be a
|
# (After BUG#41956 has been fixed, this will be required to be a
|
||||||
# symbolic name instead of a number.)
|
# symbolic name instead of a number.)
|
||||||
|
#
|
||||||
|
# $show_slave_sql_error
|
||||||
|
# If set, will print the error to the query log.
|
||||||
#
|
#
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
# See wait_for_slave_param.inc for description.
|
# See wait_for_slave_param.inc for description.
|
||||||
@ -22,8 +25,7 @@
|
|||||||
# See wait_for_slave_param.inc for description.
|
# See wait_for_slave_param.inc for description.
|
||||||
|
|
||||||
if (`SELECT '$slave_sql_errno' = ''`) {
|
if (`SELECT '$slave_sql_errno' = ''`) {
|
||||||
--echo !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_fro_slave_sql_error.inc
|
--die !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_for_slave_sql_error.inc
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let $slave_param= Slave_SQL_Running;
|
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);
|
let $_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||||
if (`SELECT '$_error' != '$slave_sql_errno'`) {
|
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;
|
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
|
# $master_connection
|
||||||
# See wait_for_slave_param.inc for description.
|
# 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;
|
echo --source include/wait_for_slave_sql_error_and_skip.inc;
|
||||||
connection slave;
|
if (!$not_switch_connection)
|
||||||
source include/wait_for_slave_sql_error.inc;
|
|
||||||
if ($show_sql_error)
|
|
||||||
{
|
{
|
||||||
let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
connection slave;
|
||||||
echo Last_SQL_Error = $error;
|
|
||||||
}
|
}
|
||||||
|
source include/wait_for_slave_sql_error.inc;
|
||||||
|
|
||||||
# skip the erroneous statement
|
# 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;
|
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')`)
|
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 ****
|
--echo **** ERROR: Unknown type of variable status_type: allowed values are: SESSION or GLOBAL ****
|
||||||
exit;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
let $_status_timeout_counter= $status_timeout;
|
let $_status_timeout_counter= $status_timeout;
|
||||||
@ -61,7 +61,7 @@ while (`SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_va
|
|||||||
--echo **** Showing STATUS, PROCESSLIST ****
|
--echo **** Showing STATUS, PROCESSLIST ****
|
||||||
eval SHOW $status_type STATUS LIKE '$status_var';
|
eval SHOW $status_type STATUS LIKE '$status_var';
|
||||||
SHOW PROCESSLIST;
|
SHOW PROCESSLIST;
|
||||||
exit;
|
die;
|
||||||
}
|
}
|
||||||
dec $_status_timeout_counter;
|
dec $_status_timeout_counter;
|
||||||
sleep 0.1;
|
sleep 0.1;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user