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