Skip to content

Commit b82e89d

Browse files
author
hf@deer.(none)
committed
SCRUM
merged conflicts about my previous commit it seems there are some errors left - gonna check...
2 parents c4e3a62 + 3191245 commit b82e89d

Some content is hidden

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

82 files changed

+1525
-1104
lines changed

BitKeeper/etc/logging_ok

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ bar@gw.udmsearch.izhnet.ru
1717
bell@laptop.sanja.is.com.ua
1818
bell@sanja.is.com.ua
1919
bk@admin.bk
20+
carsten@tsort.bitbybit.dk
2021
davida@isil.mysql.com
2122
gluh@gluh.(none)
2223
gluh@gluh.mysql.r18.ru
@@ -76,6 +77,7 @@ nick@mysql.com
7677
nick@nick.leippe.com
7778
papa@gbichot.local
7879
paul@central.snake.net
80+
paul@ice.snake.net
7981
paul@teton.kitebird.com
8082
pem@mysql.com
8183
peter@linux.local

client/mysql.cc

+9-6
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,12 @@ static struct my_option my_long_options[] =
563563
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
564564
(gptr*) &current_prompt, (gptr*) &current_prompt, 0, GET_STR_ALLOC,
565565
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
566-
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)",
566+
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
567567
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
568568
{"quick", 'q',
569-
"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. ",
569+
"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.",
570570
(gptr*) &quick, (gptr*) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
571-
{"raw", 'r', "Write fields without conversion. Used with --batch",
571+
{"raw", 'r', "Write fields without conversion. Used with --batch.",
572572
(gptr*) &opt_raw_data, (gptr*) &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0,
573573
0, 0, 0},
574574
{"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default.",
@@ -577,7 +577,7 @@ static struct my_option my_long_options[] =
577577
0, 0},
578578
#ifdef HAVE_SMEM
579579
{"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME,
580-
"Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
580+
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
581581
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
582582
#endif
583583
{"socket", 'S', "Socket file to use for connection.",
@@ -601,7 +601,7 @@ static struct my_option my_long_options[] =
601601
{"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
602602
(gptr*) &safe_updates, (gptr*) &safe_updates, 0, GET_BOOL, OPT_ARG, 0, 0,
603603
0, 0, 0, 0},
604-
{"verbose", 'v', "Write more. (-v -v -v gives the table output format)", 0,
604+
{"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
605605
0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
606606
{"version", 'V', "Output version information and exit.", 0, 0, 0,
607607
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -1525,6 +1525,9 @@ static int com_server_help(String *buffer __attribute__((unused)),
15251525
char last_char;
15261526

15271527
int num_name, num_cat;
1528+
LINT_INIT(num_name);
1529+
LINT_INIT(num_cat);
1530+
15281531
if (num_fields == 2)
15291532
{
15301533
put_info("Many help items for your request exist", INFO_INFO);
@@ -1841,7 +1844,7 @@ print_table_data(MYSQL_RES *result)
18411844
separator.fill(separator.length()+length+2,'-');
18421845
separator.append('+');
18431846
}
1844-
tee_puts(separator.c_ptr(), PAGER);
1847+
tee_puts(separator.c_ptr_safe(), PAGER);
18451848
if (column_names)
18461849
{
18471850
mysql_field_seek(result,0);

client/mysqladmin.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,24 @@ static TYPELIB command_typelib=
113113
static struct my_option my_long_options[] =
114114
{
115115
{"count", 'c',
116-
"Number of iterations to make. This works with -i (--sleep) only",
116+
"Number of iterations to make. This works with -i (--sleep) only.",
117117
(gptr*) &nr_iterations, (gptr*) &nr_iterations, 0, GET_UINT,
118118
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
119-
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'",
119+
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
120120
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
121121
{"force", 'f',
122122
"Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs.",
123123
(gptr*) &option_force, (gptr*) &option_force, 0, GET_BOOL, NO_ARG, 0, 0,
124124
0, 0, 0, 0},
125-
{"compress", 'C', "Use compression in server/client protocol",
125+
{"compress", 'C', "Use compression in server/client protocol.",
126126
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
127127
0, 0, 0},
128128
{"character-sets-dir", OPT_CHARSETS_DIR,
129129
"Directory where character sets are.", (gptr*) &charsets_dir,
130130
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
131131
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
132132
NO_ARG, 0, 0, 0, 0, 0, 0},
133-
{"host", 'h', "Connect to host", (gptr*) &host, (gptr*) &host, 0, GET_STR,
133+
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR,
134134
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
135135
{"password", 'p',
136136
"Password to use when connecting to server. If password is not given it's asked from the tty.",
@@ -141,7 +141,7 @@ static struct my_option my_long_options[] =
141141
#endif
142142
{"port", 'P', "Port number to use for connection.", (gptr*) &tcp_port,
143143
(gptr*) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
144-
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)",
144+
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
145145
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
146146
{"relative", 'r',
147147
"Show difference between current and previous values when used with -i. Currently works only with extended-status.",
@@ -152,10 +152,10 @@ static struct my_option my_long_options[] =
152152
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
153153
#ifdef HAVE_SMEM
154154
{"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME,
155-
"Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
155+
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
156156
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
157157
#endif
158-
{"silent", 's', "Silently exit if one can't connect to server",
158+
{"silent", 's', "Silently exit if one can't connect to server.",
159159
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
160160
{"socket", 'S', "Socket file to use for connection.",
161161
(gptr*) &unix_port, (gptr*) &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
@@ -170,13 +170,13 @@ static struct my_option my_long_options[] =
170170
#endif
171171
{"verbose", 'v', "Write more information.", (gptr*) &opt_verbose,
172172
(gptr*) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
173-
{"version", 'V', "Output version information and exit", 0, 0, 0, GET_NO_ARG,
173+
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
174174
NO_ARG, 0, 0, 0, 0, 0, 0},
175175
{"vertical", 'E',
176176
"Print output vertically. Is similar to --relative, but prints output vertically.",
177177
(gptr*) &opt_vertical, (gptr*) &opt_vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0,
178178
0, 0, 0},
179-
{"wait", 'w', "Wait and retry if connection is down", 0, 0, 0, GET_UINT,
179+
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT,
180180
OPT_ARG, 0, 0, 0, 0, 0, 0},
181181
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", (gptr*) &opt_connect_timeout,
182182
(gptr*) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,

client/mysqlbinlog.cc

+14-14
Original file line numberDiff line numberDiff line change
@@ -199,38 +199,38 @@ static struct my_option my_long_options[] =
199199
{"debug", '#', "Output debug log.", (gptr*) &default_dbug_option,
200200
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
201201
#endif
202-
{"database", 'd', "List entries for just this database (local log only)",
202+
{"database", 'd', "List entries for just this database (local log only).",
203203
(gptr*) &database, (gptr*) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
204204
0, 0, 0, 0, 0, 0},
205-
{"force-read", 'f', "Force reading unknown binlog events",
205+
{"force-read", 'f', "Force reading unknown binlog events.",
206206
(gptr*) &force_opt, (gptr*) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
207207
0, 0},
208-
{"help", '?', "Display this help and exit",
208+
{"help", '?', "Display this help and exit.",
209209
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
210-
{"host", 'h', "Get the binlog from server", (gptr*) &host, (gptr*) &host,
210+
{"host", 'h', "Get the binlog from server.", (gptr*) &host, (gptr*) &host,
211211
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
212-
{"offset", 'o', "Skip the first N entries", (gptr*) &offset, (gptr*) &offset,
212+
{"offset", 'o', "Skip the first N entries.", (gptr*) &offset, (gptr*) &offset,
213213
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
214-
{"password", 'p', "Password to connect to remote server",
214+
{"password", 'p', "Password to connect to remote server.",
215215
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
216-
{"port", 'P', "Use port to connect to the remote server",
216+
{"port", 'P', "Use port to connect to the remote server.",
217217
(gptr*) &port, (gptr*) &port, 0, GET_INT, REQUIRED_ARG, MYSQL_PORT, 0, 0,
218218
0, 0, 0},
219-
{"position", 'j', "Start reading the binlog at position N",
219+
{"position", 'j', "Start reading the binlog at position N.",
220220
(gptr*) &position, (gptr*) &position, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0,
221221
0, 0},
222-
{"result-file", 'r', "Direct output to a given file", 0, 0, 0, GET_STR,
222+
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
223223
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
224-
{"short-form", 's', "Just show the queries, no extra info",
224+
{"short-form", 's', "Just show the queries, no extra info.",
225225
(gptr*) &short_form, (gptr*) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
226226
0, 0},
227-
{"table", 't', "Get raw table dump using COM_TABLE_DUMB", (gptr*) &table,
227+
{"table", 't', "Get raw table dump using COM_TABLE_DUMB.", (gptr*) &table,
228228
(gptr*) &table, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
229-
{"user", 'u', "Connect to the remote server as username",
229+
{"user", 'u', "Connect to the remote server as username.",
230230
(gptr*) &user, (gptr*) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
231231
0, 0},
232-
{"local-load", 'l', "Prepare files for local load in directory",
233-
(gptr*) &dirname_for_local_load, (gptr*) &dirname_for_local_load, 0,
232+
{"local-load", 'l', "Prepare files for local load in directory.",
233+
(gptr*) &dirname_for_local_load, (gptr*) &dirname_for_local_load, 0,
234234
GET_STR_ALLOC, OPT_ARG, 0, 0, 0, 0, 0, 0},
235235
{"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
236236
0, 0, 0, 0, 0},

client/mysqlcheck.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ static struct my_option my_long_options[] =
6767
(gptr*) &opt_auto_repair, (gptr*) &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
6868
0, 0, 0, 0, 0},
6969
{"character-sets-dir", OPT_CHARSETS_DIR,
70-
"Directory where character sets are", (gptr*) &charsets_dir,
70+
"Directory where character sets are.", (gptr*) &charsets_dir,
7171
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
72-
{"check", 'c', "Check table for errors", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
72+
{"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
7373
0, 0, 0, 0},
7474
{"check-only-changed", 'C',
7575
"Check only tables that have changed since last check or haven't been closed properly.",
@@ -81,12 +81,12 @@ static struct my_option my_long_options[] =
8181
"To check several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames.",
8282
(gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG,
8383
0, 0, 0, 0, 0, 0},
84-
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'",
84+
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
8585
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
8686
{"default-character-set", OPT_DEFAULT_CHARSET,
87-
"Set the default character set", (gptr*) &default_charset,
87+
"Set the default character set.", (gptr*) &default_charset,
8888
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
89-
{"fast",'F', "Check only tables that haven't been closed properly",
89+
{"fast",'F', "Check only tables that haven't been closed properly.",
9090
(gptr*) &opt_fast, (gptr*) &opt_fast, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
9191
0},
9292
{"force", 'f', "Continue even if we get an sql-error.",
@@ -115,7 +115,7 @@ static struct my_option my_long_options[] =
115115
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
116116
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
117117
0},
118-
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)",
118+
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
119119
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
120120
{"quick", 'q',
121121
"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.",
@@ -126,7 +126,7 @@ static struct my_option my_long_options[] =
126126
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
127127
#ifdef HAVE_SMEM
128128
{"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME,
129-
"Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
129+
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
130130
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
131131
#endif
132132
{"silent", 's', "Print only error messages.", (gptr*) &opt_silent,

client/mysqldump.c

+11-8
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
** XML by Gary Huntress <ghuntress@mediaone.net> 10/10/01, cleaned up
3535
** and adapted to mysqldump 05/11/01 by Jani Tolonen
3636
** Added --single-transaction option 06/06/2002 by Peter Zaitsev
37+
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
3738
*/
3839

3940
#define DUMP_VERSION "10.2"
@@ -131,7 +132,7 @@ static struct my_option my_long_options[] =
131132
"Allow creation of column names that are keywords.", (gptr*) &opt_keywords,
132133
(gptr*) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
133134
{"character-sets-dir", OPT_CHARSETS_DIR,
134-
"Directory where character sets are", (gptr*) &charsets_dir,
135+
"Directory where character sets are.", (gptr*) &charsets_dir,
135136
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
136137
{"compatible", OPT_COMPATIBLE,
137138
"Change the dump to be compatible with a given mode. By default tables are dumped without any restrictions. Legal modes are: mysql323, mysql40, postgresql, oracle, mssql, db2, sapdb, 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 does a no operation on earlier server versions.",
@@ -203,9 +204,9 @@ static struct my_option my_long_options[] =
203204
{"single-transaction", OPT_TRANSACTION,
204205
"Dump all tables in single transaction to get consistent snapshot. Mutually exclusive with --lock-tables.",
205206
(gptr*) &opt_single_transaction, (gptr*) &opt_single_transaction, 0,
206-
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
207+
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
207208
{"no-create-db", 'n',
208-
"'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given.}",
209+
"'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given.}.",
209210
(gptr*) &opt_create_db, (gptr*) &opt_create_db, 0, GET_BOOL, NO_ARG, 0, 0,
210211
0, 0, 0, 0},
211212
{"no-create-info", 't', "Don't write table creation info.",
@@ -226,25 +227,25 @@ static struct my_option my_long_options[] =
226227
"Password to use when connecting to server. If password is not given it's solicited on the tty.",
227228
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
228229
#ifdef __WIN__
229-
{"pipe", 'W', "Use named pipes to connect to server", 0, 0, 0, GET_NO_ARG,
230+
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
230231
NO_ARG, 0, 0, 0, 0, 0, 0},
231232
#endif
232233
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
233234
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
234235
0},
235-
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)",
236+
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
236237
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
237238
{"quick", 'q', "Don't buffer query, dump directly to stdout.",
238239
(gptr*) &quick, (gptr*) &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
239-
{"quote-names",'Q', "Quote table and column names with a `",
240+
{"quote-names",'Q', "Quote table and column names with backticks (`).",
240241
(gptr*) &opt_quoted, (gptr*) &opt_quoted, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
241242
0, 0},
242243
{"result-file", 'r',
243244
"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).",
244245
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
245246
#ifdef HAVE_SMEM
246247
{"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME,
247-
"Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
248+
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
248249
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
249250
#endif
250251
{"skip-opt", OPT_SKIP_OPTIMIZATION,
@@ -434,6 +435,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
434435
char buff[255];
435436

436437
opt_quoted= 1;
438+
opt_set_names= 1;
437439
opt_compatible_mode_str= argument;
438440
opt_compatible_mode= find_set(&compatible_mode_typelib,
439441
argument, strlen(argument),
@@ -563,7 +565,8 @@ static int dbConnect(char *host, char *user,char *passwd)
563565
if (shared_memory_base_name)
564566
mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
565567
#endif
566-
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
568+
if (!opt_set_names)
569+
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
567570
if (!(sock= mysql_real_connect(&mysql_connection,host,user,passwd,
568571
NULL,opt_mysql_port,opt_mysql_unix_port,
569572
0)))

0 commit comments

Comments
 (0)