mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@@ -5963,6 +5963,7 @@ void do_connect(struct st_command *command)
|
||||
int read_timeout= 0;
|
||||
int write_timeout= 0;
|
||||
int connect_timeout= 0;
|
||||
char *csname=0;
|
||||
struct st_connection* con_slot;
|
||||
|
||||
static DYNAMIC_STRING ds_connection_name;
|
||||
@@ -6065,6 +6066,11 @@ void do_connect(struct st_command *command)
|
||||
{
|
||||
connect_timeout= atoi(con_options + sizeof("connect_timeout=")-1);
|
||||
}
|
||||
else if (strncasecmp(con_options, "CHARSET=",
|
||||
sizeof("CHARSET=") - 1) == 0)
|
||||
{
|
||||
csname= strdup(con_options + sizeof("CHARSET=") - 1);
|
||||
}
|
||||
else
|
||||
die("Illegal option to connect: %.*s",
|
||||
(int) (end - con_options), con_options);
|
||||
@@ -6102,7 +6108,7 @@ void do_connect(struct st_command *command)
|
||||
mysql_options(con_slot->mysql, MYSQL_OPT_COMPRESS, NullS);
|
||||
mysql_options(con_slot->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
|
||||
mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_NAME,
|
||||
charset_info->csname);
|
||||
csname?csname: charset_info->csname);
|
||||
if (opt_charsets_dir)
|
||||
mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_DIR,
|
||||
opt_charsets_dir);
|
||||
@@ -6194,6 +6200,7 @@ void do_connect(struct st_command *command)
|
||||
dynstr_free(&ds_sock);
|
||||
dynstr_free(&ds_options);
|
||||
dynstr_free(&ds_default_auth);
|
||||
free(csname);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user