mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients. Postfix covering other mysql standard clients like mysql_upgrade, mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow and mysqlslap.
This commit is contained in:
@ -79,6 +79,8 @@ static char* host = 0;
|
||||
static int port= 0;
|
||||
static uint my_end_arg;
|
||||
static const char* sock= 0;
|
||||
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
static char *shared_memory_base_name= 0;
|
||||
#endif
|
||||
@ -1039,6 +1041,10 @@ static struct my_option my_long_options[] =
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
&debug_info_flag, &debug_info_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default_auth", OPT_DEFAULT_AUTH,
|
||||
"Default authentication client-side plugin to use.",
|
||||
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
|
||||
"enabled --to-last-log and are sending the output to the same MySQL server. "
|
||||
"This way you could avoid an endless loop. You would also like to use it "
|
||||
@ -1064,6 +1070,9 @@ static struct my_option my_long_options[] =
|
||||
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p', "Password to connect to remote server.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
|
||||
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 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 "
|
||||
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
|
||||
#if MYSQL_PORT_DEFAULT == 0
|
||||
@ -1381,6 +1390,12 @@ static Exit_status safe_connect()
|
||||
return ERROR_STOP;
|
||||
}
|
||||
|
||||
if (opt_plugin_dir && *opt_plugin_dir)
|
||||
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||
|
||||
if (opt_default_auth && *opt_default_auth)
|
||||
mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
|
||||
|
||||
if (opt_protocol)
|
||||
mysql_options(mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
|
||||
#ifdef HAVE_SMEM
|
||||
|
Reference in New Issue
Block a user