diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-08-21 17:16:12 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-08-21 17:16:12 +0000 |
commit | 9af7561eb44a7465a8a72789678546b37da96eb8 (patch) | |
tree | 405c32694187655c6cd0f10af0d70d516bb83732 /extra | |
parent | 06106c01481401b6d7ef4309391ca2f66242cc85 (diff) | |
download | mariadb-git-9af7561eb44a7465a8a72789678546b37da96eb8.tar.gz |
MDEV-13608 : set client plugin directory with mysql_options()
if plugin_dir is specified. Also, allow to specify protocol (e.g pipe)
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/backup_mysql.cc | 5 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 14 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.h | 2 |
3 files changed, 19 insertions, 2 deletions
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc index 00fed457304..6f425e9419f 100644 --- a/extra/mariabackup/backup_mysql.cc +++ b/extra/mariabackup/backup_mysql.cc @@ -112,6 +112,11 @@ xb_mysql_connect() (char *) &opt_secure_auth); } + if (xb_plugin_dir && *xb_plugin_dir){ + mysql_options(connection, MYSQL_PLUGIN_DIR, xb_plugin_dir); + } + mysql_options(connection, MYSQL_OPT_PROTOCOL, &opt_protocol); + msg_ts("Connecting to MySQL server host: %s, user: %s, password: %s, " "port: %s, socket: %s\n", opt_host ? opt_host : "localhost", opt_user ? opt_user : "not set", diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 6a373f0cfd6..c746b469329 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -123,6 +123,7 @@ my_bool xtrabackup_apply_log_only = FALSE; longlong xtrabackup_use_memory = 100*1024*1024L; my_bool xtrabackup_create_ib_logfile = FALSE; +uint opt_protocol; long xtrabackup_throttle = 0; /* 0:unlimited */ lint io_ticket; os_event_t wait_throttle = NULL; @@ -560,6 +561,7 @@ enum options_xtrabackup OPT_XTRA_TABLES_EXCLUDE, OPT_XTRA_DATABASES_EXCLUDE, + OPT_PROTOCOL }; struct my_option xb_client_options[] = @@ -799,6 +801,9 @@ struct my_option xb_client_options[] = 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"protocol", OPT_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"socket", 'S', "This option specifies the socket to use when " "connecting to the local database server with a UNIX domain socket. " "The option accepts a string argument. See mysql --help for details.", @@ -1364,8 +1369,13 @@ xb_get_one_option(int optid, start[1]=0 ; } break; - - + case OPT_PROTOCOL: + if (argument) + { + opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib, + opt->name); + } + break; #include "sslopt-case.h" case '?': diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h index 455b85c4abc..3b2a25d451b 100644 --- a/extra/mariabackup/xtrabackup.h +++ b/extra/mariabackup/xtrabackup.h @@ -55,6 +55,8 @@ extern char *xtrabackup_incremental_dir; extern char *xtrabackup_incremental_basedir; extern char *innobase_data_home_dir; extern char *innobase_buffer_pool_filename; +extern char *xb_plugin_dir; +extern uint opt_protocol; extern ds_ctxt_t *ds_meta; extern ds_ctxt_t *ds_data; |