942
942
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
944
944
{"character-sets-dir", OPT_CHARSETS_DIR,
945
"Directory where character sets are.", (uchar**) &charsets_dir,
946
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
945
"Directory where character sets are.", (char**) &charsets_dir,
946
(char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
947
947
{"database", 'd', "List entries for just this database (local log only).",
948
(uchar**) &database, (uchar**) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
948
(char**) &database, (char**) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
949
949
0, 0, 0, 0, 0, 0},
951
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
952
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
951
{"debug", '#', "Output debug log.", (char**) &default_dbug_option,
952
(char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
954
954
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
955
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
955
(char**) &debug_check_flag, (char**) &debug_check_flag, 0,
956
956
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
957
957
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
958
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
958
(char**) &debug_info_flag, (char**) &debug_info_flag,
959
959
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
960
960
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
961
961
"enabled --to-last-log and are sending the output to the same MySQL server. "
962
962
"This way you could avoid an endless loop. You would also like to use it "
963
963
"when restoring after a crash to avoid duplication of the statements you "
964
964
"already have. NOTE: you will need a SUPER privilege to use this option.",
965
(uchar**) &disable_log_bin, (uchar**) &disable_log_bin, 0, GET_BOOL,
965
(char**) &disable_log_bin, (char**) &disable_log_bin, 0, GET_BOOL,
966
966
NO_ARG, 0, 0, 0, 0, 0, 0},
967
967
{"force-if-open", 'F', "Force if binlog was not closed properly.",
968
(uchar**) &force_if_open_opt, (uchar**) &force_if_open_opt, 0, GET_BOOL, NO_ARG,
968
(char**) &force_if_open_opt, (char**) &force_if_open_opt, 0, GET_BOOL, NO_ARG,
969
969
1, 0, 0, 0, 0, 0},
970
970
{"force-read", 'f', "Force reading unknown binlog events.",
971
(uchar**) &force_opt, (uchar**) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
971
(char**) &force_opt, (char**) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
973
973
{"hexdump", 'H', "Augment output with hexadecimal and ASCII event dump.",
974
(uchar**) &opt_hexdump, (uchar**) &opt_hexdump, 0, GET_BOOL, NO_ARG,
974
(char**) &opt_hexdump, (char**) &opt_hexdump, 0, GET_BOOL, NO_ARG,
975
975
0, 0, 0, 0, 0, 0},
976
{"host", 'h', "Get the binlog from server.", (uchar**) &host, (uchar**) &host,
976
{"host", 'h', "Get the binlog from server.", (char**) &host, (char**) &host,
977
977
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
978
978
{"local-load", 'l', "Prepare local temporary files for LOAD DATA INFILE in the specified directory.",
979
(uchar**) &dirname_for_local_load, (uchar**) &dirname_for_local_load, 0,
979
(char**) &dirname_for_local_load, (char**) &dirname_for_local_load, 0,
980
980
GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
981
{"offset", 'o', "Skip the first N entries.", (uchar**) &offset, (uchar**) &offset,
981
{"offset", 'o', "Skip the first N entries.", (char**) &offset, (char**) &offset,
982
982
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
983
983
{"password", 'p', "Password to connect to remote server.",
984
984
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
999
999
"The protocol of connection (tcp,socket,pipe,memory).",
1000
1000
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1001
1001
{"read-from-remote-server", 'R', "Read binary logs from a MySQL server",
1002
(uchar**) &remote_opt, (uchar**) &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
1002
(char**) &remote_opt, (char**) &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
1004
1004
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
1005
1005
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1006
1006
{"server-id", OPT_SERVER_ID,
1007
1007
"Extract only binlog entries created by the server having the given id.",
1008
(uchar**) &server_id, (uchar**) &server_id, 0, GET_ULONG,
1008
(char**) &server_id, (char**) &server_id, 0, GET_ULONG,
1009
1009
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1010
1010
{"set-charset", OPT_SET_CHARSET,
1011
"Add 'SET NAMES character_set' to the output.", (uchar**) &charset,
1012
(uchar**) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1011
"Add 'SET NAMES character_set' to the output.", (char**) &charset,
1012
(char**) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1013
1013
{"short-form", 's', "Just show regular queries: no extra info and no "
1014
1014
"row-based events. This is for testing only, and should not be used in "
1015
1015
"production systems. If you want to suppress base64-output, consider "
1016
1016
"using --base64-output=never instead.",
1017
(uchar**) &short_form, (uchar**) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
1017
(char**) &short_form, (char**) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
1019
1019
{"socket", 'S', "Socket file to use for connection.",
1020
(uchar**) &sock, (uchar**) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
1020
(char**) &sock, (char**) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
1022
1022
{"start-datetime", OPT_START_DATETIME,
1023
1023
"Start reading the binlog at first event having a datetime equal or "
1025
1025
"in the local time zone, in any format accepted by the MySQL server "
1026
1026
"for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
1027
1027
"(you should probably use quotes for your shell to set it properly).",
1028
(uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
1028
(char**) &start_datetime_str, (char**) &start_datetime_str,
1029
1029
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1030
1030
{"start-position", OPT_START_POSITION,
1031
1031
"Start reading the binlog at position N. Applies to the first binlog "
1032
1032
"passed on the command line.",
1033
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
1033
(char**) &start_position, (char**) &start_position, 0, GET_ULL,
1034
1034
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
1035
1035
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
1036
1036
(ulonglong)(~(uint32)0), 0, 0, 0},
1040
1040
"in the local time zone, in any format accepted by the MySQL server "
1041
1041
"for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
1042
1042
"(you should probably use quotes for your shell to set it properly).",
1043
(uchar**) &stop_datetime_str, (uchar**) &stop_datetime_str,
1043
(char**) &stop_datetime_str, (char**) &stop_datetime_str,
1044
1044
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1045
1045
{"stop-position", OPT_STOP_POSITION,
1046
1046
"Stop reading the binlog at position N. Applies to the last binlog "
1047
1047
"passed on the command line.",
1048
(uchar**) &stop_position, (uchar**) &stop_position, 0, GET_ULL,
1048
(char**) &stop_position, (char**) &stop_position, 0, GET_ULL,
1049
1049
REQUIRED_ARG, (ulonglong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE,
1050
1050
(ulonglong)(~(my_off_t)0), 0, 0, 0},
1051
1051
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \
1052
1052
requested binlog but rather continue printing until the end of the last \
1053
1053
binlog of the MySQL server. If you send the output to the same MySQL server, \
1054
1054
that may lead to an endless loop.",
1055
(uchar**) &to_last_remote_log, (uchar**) &to_last_remote_log, 0, GET_BOOL,
1055
(char**) &to_last_remote_log, (char**) &to_last_remote_log, 0, GET_BOOL,
1056
1056
NO_ARG, 0, 0, 0, 0, 0, 0},
1057
1057
{"user", 'u', "Connect to the remote server as username.",
1058
(uchar**) &user, (uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
1058
(char**) &user, (char**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
1060
1060
{"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
1061
1061
0, 0, 0, 0, 0},
1062
1062
{"open_files_limit", OPT_OPEN_FILES_LIMIT,
1063
1063
"Used to reserve file descriptors for usage by this program",
1064
(uchar**) &open_files_limit, (uchar**) &open_files_limit, 0, GET_ULONG,
1064
(char**) &open_files_limit, (char**) &open_files_limit, 0, GET_ULONG,
1065
1065
REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0},
1066
1066
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}