@@ -1016,9 +1016,8 @@ static struct my_option my_long_options[] =
10161016 " events); 'always' prints base64 whenever possible. 'always' is for "
10171017 " debugging only and should not be used in a production system. If this "
10181018 " argument is not given, the default is 'auto'; if it is given with no "
1019- " argument, 'always' is used."
1020- ,(uchar**) &opt_base64_output_mode_str,
1021- (uchar**) &opt_base64_output_mode_str,
1019+ " argument, 'always' is used." ,
1020+ &opt_base64_output_mode_str, &opt_base64_output_mode_str,
10221021 0 , GET_STR, OPT_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10231022 /*
10241023 mysqlbinlog needs charsets knowledge, to be able to convert a charset
@@ -1027,43 +1026,43 @@ static struct my_option my_long_options[] =
10271026 SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
10281027 */
10291028 {" character-sets-dir" , OPT_CHARSETS_DIR,
1030- " Directory for character set files." , (uchar**) &charsets_dir,
1031- (uchar**) &charsets_dir, 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
1029+ " Directory for character set files." , &charsets_dir,
1030+ &charsets_dir, 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10321031 {" database" , ' d' , " List entries for just this database (local log only)." ,
1033- (uchar**) &database, (uchar**) &database, 0 , GET_STR_ALLOC, REQUIRED_ARG,
1032+ &database, &database, 0 , GET_STR_ALLOC, REQUIRED_ARG,
10341033 0 , 0 , 0 , 0 , 0 , 0 },
10351034#ifndef DBUG_OFF
1036- {" debug" , ' #' , " Output debug log." , (uchar**) &default_dbug_option,
1037- (uchar**) &default_dbug_option, 0 , GET_STR, OPT_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
1035+ {" debug" , ' #' , " Output debug log." , &default_dbug_option,
1036+ &default_dbug_option, 0 , GET_STR, OPT_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10381037#endif
10391038 {" debug-check" , OPT_DEBUG_CHECK, " Check memory and open file usage at exit ." ,
1040- (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0 ,
1039+ &debug_check_flag, &debug_check_flag, 0 ,
10411040 GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10421041 {" debug-info" , OPT_DEBUG_INFO, " Print some debug info at exit." ,
1043- (uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
1042+ &debug_info_flag, &debug_info_flag,
10441043 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10451044 {" disable-log-bin" , ' D' , " Disable binary log. This is useful, if you "
10461045 " enabled --to-last-log and are sending the output to the same MySQL server. "
10471046 " This way you could avoid an endless loop. You would also like to use it "
10481047 " when restoring after a crash to avoid duplication of the statements you "
10491048 " already have. NOTE: you will need a SUPER privilege to use this option." ,
1050- (uchar**) &disable_log_bin, (uchar**) &disable_log_bin, 0 , GET_BOOL,
1049+ &disable_log_bin, &disable_log_bin, 0 , GET_BOOL,
10511050 NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10521051 {" force-if-open" , ' F' , " Force if binlog was not closed properly." ,
1053- (uchar**) &force_if_open_opt, (uchar**) &force_if_open_opt, 0 , GET_BOOL, NO_ARG,
1052+ &force_if_open_opt, &force_if_open_opt, 0 , GET_BOOL, NO_ARG,
10541053 1 , 0 , 0 , 0 , 0 , 0 },
10551054 {" force-read" , ' f' , " Force reading unknown binlog events." ,
1056- (uchar**) &force_opt, (uchar**) &force_opt, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 ,
1055+ &force_opt, &force_opt, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 ,
10571056 0 , 0 },
10581057 {" hexdump" , ' H' , " Augment output with hexadecimal and ASCII event dump." ,
1059- (uchar**) &opt_hexdump, (uchar**) &opt_hexdump, 0 , GET_BOOL, NO_ARG,
1058+ &opt_hexdump, &opt_hexdump, 0 , GET_BOOL, NO_ARG,
10601059 0 , 0 , 0 , 0 , 0 , 0 },
1061- {" host" , ' h' , " Get the binlog from server." , (uchar**) &host, (uchar**) &host,
1060+ {" host" , ' h' , " Get the binlog from server." , &host, &host,
10621061 0 , GET_STR_ALLOC, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10631062 {" local-load" , ' l' , " Prepare local temporary files for LOAD DATA INFILE in the specified directory." ,
1064- (uchar**) &dirname_for_local_load, (uchar**) &dirname_for_local_load, 0 ,
1063+ &dirname_for_local_load, &dirname_for_local_load, 0 ,
10651064 GET_STR_ALLOC, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
1066- {" offset" , ' o' , " Skip the first N entries." , (uchar**) &offset, (uchar**) &offset,
1065+ {" offset" , ' o' , " Skip the first N entries." , &offset, &offset,
10671066 0 , GET_ULL, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10681067 {" password" , ' p' , " Password to connect to remote server." ,
10691068 0 , 0 , 0 , GET_STR, OPT_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
@@ -1073,50 +1072,50 @@ static struct my_option my_long_options[] =
10731072 " /etc/services, "
10741073#endif
10751074 " built-in default (" STRINGIFY_ARG (MYSQL_PORT) " )." ,
1076- (uchar**) &port, (uchar**) &port, 0 , GET_INT, REQUIRED_ARG,
1075+ &port, &port, 0 , GET_INT, REQUIRED_ARG,
10771076 0 , 0 , 0 , 0 , 0 , 0 },
10781077 {" protocol" , OPT_MYSQL_PROTOCOL,
10791078 " The protocol to use for connection (tcp, socket, pipe, memory)." ,
10801079 0 , 0 , 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10811080 {" read-from-remote-server" , ' R' , " Read binary logs from a MySQL server." ,
1082- (uchar**) &remote_opt, (uchar**) &remote_opt, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 ,
1081+ &remote_opt, &remote_opt, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 ,
10831082 0 , 0 },
10841083 {" result-file" , ' r' , " Direct output to a given file." , 0 , 0 , 0 , GET_STR,
10851084 REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10861085 {" server-id" , OPT_SERVER_ID,
10871086 " Extract only binlog entries created by the server having the given id." ,
1088- (uchar**) &server_id, (uchar**) &server_id, 0 , GET_ULONG,
1087+ &server_id, &server_id, 0 , GET_ULONG,
10891088 REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10901089 {" set-charset" , OPT_SET_CHARSET,
1091- " Add 'SET NAMES character_set' to the output." , (uchar**) &charset,
1092- (uchar**) &charset, 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
1090+ " Add 'SET NAMES character_set' to the output." , &charset,
1091+ &charset, 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10931092#ifdef HAVE_SMEM
10941093 {" shared-memory-base-name" , OPT_SHARED_MEMORY_BASE_NAME,
1095- " Base name of shared memory." , (uchar**) &shared_memory_base_name,
1096- (uchar**) &shared_memory_base_name,
1094+ " Base name of shared memory." , &shared_memory_base_name,
1095+ &shared_memory_base_name,
10971096 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
10981097#endif
10991098 {" short-form" , ' s' , " Just show regular queries: no extra info and no "
11001099 " row-based events. This is for testing only, and should not be used in "
11011100 " production systems. If you want to suppress base64-output, consider "
11021101 " using --base64-output=never instead." ,
1103- (uchar**) &short_form, (uchar**) &short_form, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 ,
1102+ &short_form, &short_form, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 ,
11041103 0 , 0 },
11051104 {" socket" , ' S' , " The socket file to use for connection." ,
1106- (uchar**) &sock, (uchar**) &sock, 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 ,
1105+ &sock, &sock, 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 ,
11071106 0 , 0 },
11081107 {" start-datetime" , OPT_START_DATETIME,
11091108 " Start reading the binlog at first event having a datetime equal or "
11101109 " posterior to the argument; the argument must be a date and time "
11111110 " in the local time zone, in any format accepted by the MySQL server "
11121111 " for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
11131112 " (you should probably use quotes for your shell to set it properly)." ,
1114- (uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
1113+ &start_datetime_str, &start_datetime_str,
11151114 0 , GET_STR_ALLOC, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
11161115 {" start-position" , ' j' ,
11171116 " Start reading the binlog at position N. Applies to the first binlog "
11181117 " passed on the command line." ,
1119- (uchar**) &start_position, (uchar**) &start_position, 0 , GET_ULL,
1118+ &start_position, &start_position, 0 , GET_ULL,
11201119 REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
11211120 /* COM_BINLOG_DUMP accepts only 4 bytes for the position */
11221121 (ulonglong)(~(uint32)0 ), 0 , 0 , 0 },
@@ -1126,22 +1125,22 @@ static struct my_option my_long_options[] =
11261125 " in the local time zone, in any format accepted by the MySQL server "
11271126 " for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
11281127 " (you should probably use quotes for your shell to set it properly)." ,
1129- (uchar**) &stop_datetime_str, (uchar**) &stop_datetime_str,
1128+ &stop_datetime_str, &stop_datetime_str,
11301129 0 , GET_STR_ALLOC, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
11311130 {" stop-position" , OPT_STOP_POSITION,
11321131 " Stop reading the binlog at position N. Applies to the last binlog "
11331132 " passed on the command line." ,
1134- (uchar**) &stop_position, (uchar**) &stop_position, 0 , GET_ULL,
1133+ &stop_position, &stop_position, 0 , GET_ULL,
11351134 REQUIRED_ARG, (ulonglong)(~(my_off_t )0 ), BIN_LOG_HEADER_SIZE,
11361135 (ulonglong)(~(my_off_t )0 ), 0 , 0 , 0 },
11371136 {" to-last-log" , ' t' , " Requires -R. Will not stop at the end of the \
11381137requested binlog but rather continue printing until the end of the last \
11391138binlog of the MySQL server. If you send the output to the same MySQL server, \
11401139that may lead to an endless loop." ,
1141- (uchar**) &to_last_remote_log, (uchar**) &to_last_remote_log, 0 , GET_BOOL,
1140+ &to_last_remote_log, &to_last_remote_log, 0 , GET_BOOL,
11421141 NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
11431142 {" user" , ' u' , " Connect to the remote server as username." ,
1144- (uchar**) &user, (uchar**) &user, 0 , GET_STR_ALLOC, REQUIRED_ARG, 0 , 0 , 0 , 0 ,
1143+ &user, &user, 0 , GET_STR_ALLOC, REQUIRED_ARG, 0 , 0 , 0 , 0 ,
11451144 0 , 0 },
11461145 {" verbose" , ' v' , " Reconstruct SQL statements out of row events. "
11471146 " -v -v adds comments on column data types." ,
@@ -1150,7 +1149,7 @@ that may lead to an endless loop.",
11501149 0 , 0 , 0 , 0 , 0 },
11511150 {" open_files_limit" , OPT_OPEN_FILES_LIMIT,
11521151 " Used to reserve file descriptors for use by this program." ,
1153- (uchar**) &open_files_limit, (uchar**) &open_files_limit, 0 , GET_ULONG,
1152+ &open_files_limit, &open_files_limit, 0 , GET_ULONG,
11541153 REQUIRED_ARG, MY_NFILE, 8 , OS_FILE_LIMIT, 0 , 1 , 0 },
11551154 {0 , 0 , 0 , 0 , 0 , 0 , GET_NO_ARG, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 }
11561155};
0 commit comments