upmerge 52301
This commit is contained in:
commit
b9a3e71171
@ -193,6 +193,8 @@ static void init_re(void);
|
|||||||
static int match_re(my_regex_t *, char *);
|
static int match_re(my_regex_t *, char *);
|
||||||
static void free_re(void);
|
static void free_re(void);
|
||||||
|
|
||||||
|
static uint opt_protocol=0;
|
||||||
|
|
||||||
DYNAMIC_ARRAY q_lines;
|
DYNAMIC_ARRAY q_lines;
|
||||||
|
|
||||||
#include "sslopt-vars.h"
|
#include "sslopt-vars.h"
|
||||||
@ -5191,11 +5193,13 @@ void do_connect(struct st_command *command)
|
|||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
if (con_pipe)
|
if (con_pipe)
|
||||||
{
|
{
|
||||||
uint protocol= MYSQL_PROTOCOL_PIPE;
|
opt_protocol= MYSQL_PROTOCOL_PIPE;
|
||||||
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (opt_protocol)
|
||||||
|
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
if (con_shm)
|
if (con_shm)
|
||||||
{
|
{
|
||||||
@ -5929,6 +5933,8 @@ static struct my_option my_long_options[] =
|
|||||||
GET_INT, REQUIRED_ARG, 128, 8, 5120, 0, 0, 0},
|
GET_INT, REQUIRED_ARG, 128, 8, 5120, 0, 0, 0},
|
||||||
{"password", 'p', "Password to use when connecting to server.",
|
{"password", 'p', "Password to use when connecting to server.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
||||||
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"port", 'P', "Port number to use for connection or 0 for default to, in "
|
{"port", 'P', "Port number to use for connection or 0 for default to, in "
|
||||||
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
|
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
|
||||||
#if MYSQL_PORT_DEFAULT == 0
|
#if MYSQL_PORT_DEFAULT == 0
|
||||||
@ -6074,7 +6080,7 @@ void read_embedded_server_arguments(const char *name)
|
|||||||
|
|
||||||
|
|
||||||
static my_bool
|
static my_bool
|
||||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
get_one_option(int optid, const struct my_option *opt,
|
||||||
char *argument)
|
char *argument)
|
||||||
{
|
{
|
||||||
switch(optid) {
|
switch(optid) {
|
||||||
@ -6166,6 +6172,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
case 'V':
|
case 'V':
|
||||||
print_version();
|
print_version();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
case OPT_MYSQL_PROTOCOL:
|
||||||
|
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||||
|
opt->name);
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
usage();
|
usage();
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -7917,6 +7927,9 @@ int main(int argc, char **argv)
|
|||||||
mysql_options(&con->mysql, MYSQL_SET_CHARSET_DIR,
|
mysql_options(&con->mysql, MYSQL_SET_CHARSET_DIR,
|
||||||
opt_charsets_dir);
|
opt_charsets_dir);
|
||||||
|
|
||||||
|
if (opt_protocol)
|
||||||
|
mysql_options(&con->mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
|
|
||||||
if (opt_use_ssl)
|
if (opt_use_ssl)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user