Skip to content

Commit f4019b3

Browse files
Davi ArnautDavi Arnaut
authored andcommitted
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
--BZR-- revision-id: [email protected] property-branch-nick: mysql-trunk-merge testament3-sha1: a02833c64e8de2a14caf0f25a91f4328f852ee0f
2 parents 309c114 + b655011 commit f4019b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1018
-913
lines changed

client/mysql.cc

Lines changed: 96 additions & 80 deletions
Large diffs are not rendered by default.

client/mysql_upgrade.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,34 +69,34 @@ static struct my_option my_long_options[]=
6969
"Directory for character set files.", 0,
7070
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
7171
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
72-
(uchar**)&not_used, (uchar**)&not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
72+
&not_used, &not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
7373
{"datadir", 'd',
7474
"Not used by mysql_upgrade. Only for backward compatibility.",
7575
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
7676
#ifdef DBUG_OFF
7777
{"debug", '#', "This is a non-debug version. Catch this and exit.",
7878
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
7979
#else
80-
{"debug", '#', "Output debug log.", (uchar* *) & default_dbug_option,
81-
(uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
80+
{"debug", '#', "Output debug log.", &default_dbug_option,
81+
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
8282
#endif
8383
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
84-
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
84+
&debug_check_flag, &debug_check_flag, 0,
8585
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
86-
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
87-
(uchar**) &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
86+
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
87+
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
8888
{"default-character-set", OPT_DEFAULT_CHARSET,
8989
"Set the default character set.", 0,
9090
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
9191
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
9292
"has already been executed for the current version of MySQL.",
93-
(uchar**)&opt_force, (uchar**)&opt_force, 0,
93+
&opt_force, &opt_force, 0,
9494
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
9595
{"host",'h', "Connect to host.", 0,
9696
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
9797
{"password", 'p',
9898
"Password to use when connecting to server. If password is not given,"
99-
" it's solicited on the tty.", (uchar**) &opt_password,(uchar**) &opt_password,
99+
" it's solicited on the tty.", &opt_password,&opt_password,
100100
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
101101
#ifdef __WIN__
102102
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0,
@@ -124,17 +124,17 @@ static struct my_option my_long_options[]=
124124
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
125125
{"upgrade-system-tables", 's', "Only upgrade the system tables "
126126
"do not try to upgrade the data.",
127-
(uchar**)&opt_systables_only, (uchar**)&opt_systables_only, 0,
127+
&opt_systables_only, &opt_systables_only, 0,
128128
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
129-
{"user", 'u', "User for login if not current user.", (uchar**) &opt_user,
130-
(uchar**) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
129+
{"user", 'u', "User for login if not current user.", &opt_user,
130+
&opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
131131
{"verbose", 'v', "Display more output about the process.",
132-
(uchar**) &opt_verbose, (uchar**) &opt_verbose, 0,
132+
&opt_verbose, &opt_verbose, 0,
133133
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
134134
{"write-binlog", OPT_WRITE_BINLOG,
135135
"All commands including mysqlcheck are binlogged. Enabled by default;"
136136
"use --skip-write-binlog when commands should not be sent to replication slaves.",
137-
(uchar**) &opt_write_binlog, (uchar**) &opt_write_binlog, 0, GET_BOOL, NO_ARG,
137+
&opt_write_binlog, &opt_write_binlog, 0, GET_BOOL, NO_ARG,
138138
1, 0, 0, 0, 0, 0},
139139
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
140140
};

client/mysqladmin.cc

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -122,37 +122,38 @@ static struct my_option my_long_options[] =
122122
#endif
123123
{"count", 'c',
124124
"Number of iterations to make. This works with -i (--sleep) only.",
125-
(uchar**) &nr_iterations, (uchar**) &nr_iterations, 0, GET_UINT,
125+
&nr_iterations, &nr_iterations, 0, GET_UINT,
126126
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
127127
#ifndef DBUG_OFF
128128
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
129129
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
130130
#endif
131131
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
132-
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
132+
&debug_check_flag, &debug_check_flag, 0,
133133
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
134134
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
135-
(uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
135+
&debug_info_flag, &debug_info_flag,
136136
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
137137
{"force", 'f',
138-
"Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs.",
139-
(uchar**) &option_force, (uchar**) &option_force, 0, GET_BOOL, NO_ARG, 0, 0,
138+
"Don't ask for confirmation on drop database; with multiple commands, "
139+
"continue even if an error occurs.",
140+
&option_force, &option_force, 0, GET_BOOL, NO_ARG, 0, 0,
140141
0, 0, 0, 0},
141142
{"compress", 'C', "Use compression in server/client protocol.",
142-
(uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
143+
&opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
143144
0, 0, 0},
144145
{"character-sets-dir", OPT_CHARSETS_DIR,
145-
"Directory for character set files.", (uchar**) &charsets_dir,
146-
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
146+
"Directory for character set files.", &charsets_dir,
147+
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
147148
{"default-character-set", OPT_DEFAULT_CHARSET,
148-
"Set the default character set.", (uchar**) &default_charset,
149-
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
149+
"Set the default character set.", &default_charset,
150+
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
150151
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
151152
NO_ARG, 0, 0, 0, 0, 0, 0},
152-
{"host", 'h', "Connect to host.", (uchar**) &host, (uchar**) &host, 0, GET_STR,
153+
{"host", 'h', "Connect to host.", &host, &host, 0, GET_STR,
153154
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
154-
{"no-beep", 'b', "Turn off beep on error.", (uchar**) &opt_nobeep,
155-
(uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
155+
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
156+
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
156157
{"password", 'p',
157158
"Password to use when connecting to server. If password is not given it's asked from the tty.",
158159
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
@@ -166,47 +167,47 @@ static struct my_option my_long_options[] =
166167
"/etc/services, "
167168
#endif
168169
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
169-
(uchar**) &tcp_port,
170-
(uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
170+
&tcp_port, &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
171171
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
172172
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
173173
{"relative", 'r',
174-
"Show difference between current and previous values when used with -i. Currently only works with extended-status.",
175-
(uchar**) &opt_relative, (uchar**) &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
174+
"Show difference between current and previous values when used with -i. "
175+
"Currently only works with extended-status.",
176+
&opt_relative, &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
176177
0, 0, 0},
177178
#ifdef HAVE_SMEM
178179
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
179-
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
180+
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
180181
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
181182
#endif
182183
{"silent", 's', "Silently exit if one can't connect to server.",
183184
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
184185
{"socket", 'S', "The socket file to use for connection.",
185-
(uchar**) &unix_port, (uchar**) &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
186+
&unix_port, &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
186187
0, 0, 0},
187188
{"sleep", 'i', "Execute commands repeatedly with a sleep between.",
188-
(uchar**) &interval, (uchar**) &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0,
189+
&interval, &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0,
189190
0, 0},
190191
#include <sslopt-longopts.h>
191192
#ifndef DONT_ALLOW_USER_CHANGE
192-
{"user", 'u', "User for login if not current user.", (uchar**) &user,
193-
(uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
193+
{"user", 'u', "User for login if not current user.", &user,
194+
&user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
194195
#endif
195-
{"verbose", 'v', "Write more information.", (uchar**) &opt_verbose,
196-
(uchar**) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
196+
{"verbose", 'v', "Write more information.", &opt_verbose,
197+
&opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
197198
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
198199
NO_ARG, 0, 0, 0, 0, 0, 0},
199200
{"vertical", 'E',
200201
"Print output vertically. Is similar to --relative, but prints output vertically.",
201-
(uchar**) &opt_vertical, (uchar**) &opt_vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0,
202+
&opt_vertical, &opt_vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0,
202203
0, 0, 0},
203204
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT,
204205
OPT_ARG, 0, 0, 0, 0, 0, 0},
205-
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", (uchar**) &opt_connect_timeout,
206-
(uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
206+
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", &opt_connect_timeout,
207+
&opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
207208
3600*12, 0, 1, 0},
208-
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (uchar**) &opt_shutdown_timeout,
209-
(uchar**) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
209+
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout,
210+
&opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
210211
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
211212
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
212213
};

client/mysqlbinlog.cc

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -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 \
11381137
requested binlog but rather continue printing until the end of the last \
11391138
binlog of the MySQL server. If you send the output to the same MySQL server, \
11401139
that 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

Comments
 (0)