MDEV-16105: Mariabackup does not support SSL
The reason is the missing HAVE_OPENSSL define for mariabackup.
This commit is contained in:
parent
b62224e232
commit
f98496da96
@ -52,7 +52,7 @@ ELSE()
|
||||
SET(NT_SERVICE_SOURCE)
|
||||
ENDIF()
|
||||
|
||||
ADD_DEFINITIONS(-DPCRE_STATIC=1)
|
||||
ADD_DEFINITIONS(-DPCRE_STATIC=1 -DHAVE_OPENSSL=1)
|
||||
|
||||
MYSQL_ADD_EXECUTABLE(mariabackup
|
||||
xtrabackup.cc
|
||||
|
@ -91,7 +91,7 @@ time_t history_lock_time;
|
||||
|
||||
MYSQL *mysql_connection;
|
||||
|
||||
my_bool opt_ssl_verify_server_cert;
|
||||
extern my_bool opt_ssl_verify_server_cert, opt_use_ssl;
|
||||
|
||||
MYSQL *
|
||||
xb_mysql_connect()
|
||||
|
@ -203,6 +203,10 @@ static ulong max_buf_pool_modified_pct;
|
||||
/* Ignored option (--log) for MySQL option compatibility */
|
||||
char* log_ignored_opt = NULL;
|
||||
|
||||
|
||||
extern my_bool opt_use_ssl;
|
||||
my_bool opt_ssl_verify_server_cert;
|
||||
|
||||
/* === metadata of backup === */
|
||||
#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints"
|
||||
char metadata_type[30] = ""; /*[full-backuped|log-applied|
|
||||
@ -360,9 +364,6 @@ uint opt_safe_slave_backup_timeout = 0;
|
||||
|
||||
const char *opt_history = NULL;
|
||||
|
||||
#if defined(HAVE_OPENSSL)
|
||||
my_bool opt_ssl_verify_server_cert = FALSE;
|
||||
#endif
|
||||
|
||||
/* Whether xtrabackup_binlog_info should be created on recovery */
|
||||
static bool recover_binlog_info;
|
||||
@ -453,6 +454,7 @@ typedef struct {
|
||||
} data_thread_ctxt_t;
|
||||
|
||||
/* ======== for option and variables ======== */
|
||||
#include <../../client/client_priv.h>
|
||||
|
||||
enum options_xtrabackup
|
||||
{
|
||||
@ -528,8 +530,6 @@ enum options_xtrabackup
|
||||
OPT_INNODB_LOG_CHECKSUM_ALGORITHM,
|
||||
OPT_XTRA_INCREMENTAL_FORCE_SCAN,
|
||||
OPT_DEFAULTS_GROUP,
|
||||
OPT_OPEN_FILES_LIMIT,
|
||||
OPT_PLUGIN_DIR,
|
||||
OPT_PLUGIN_LOAD,
|
||||
OPT_INNODB_ENCRYPT_LOG,
|
||||
OPT_CLOSE_FILES,
|
||||
@ -915,9 +915,9 @@ struct my_option xb_client_options[] =
|
||||
{"secure-auth", OPT_XB_SECURE_AUTH, "Refuse client connecting to server if it"
|
||||
" uses old (pre-4.1.1) protocol.", &opt_secure_auth,
|
||||
&opt_secure_auth, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
|
||||
#define MYSQL_CLIENT
|
||||
#include "sslopt-longopts.h"
|
||||
|
||||
#undef MYSQL_CLIENT
|
||||
|
||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -1388,7 +1388,9 @@ xb_get_one_option(int optid,
|
||||
}
|
||||
}
|
||||
break;
|
||||
#define MYSQL_CLIENT
|
||||
#include "sslopt-case.h"
|
||||
#undef MYSQL_CLIENT
|
||||
|
||||
case '?':
|
||||
usage();
|
||||
|
9
mysql-test/suite/mariabackup/backup_ssl.result
Normal file
9
mysql-test/suite/mariabackup/backup_ssl.result
Normal file
@ -0,0 +1,9 @@
|
||||
GRANT ALL PRIVILEGES on *.* TO backup_user IDENTIFIED by 'x' REQUIRE SSL;
|
||||
FLUSH PRIVILEGES;
|
||||
# xtrabackup backup
|
||||
# xtrabackup prepare
|
||||
# shutdown server
|
||||
# remove datadir
|
||||
# xtrabackup move back
|
||||
# restart server
|
||||
DROP USER backup_user;
|
16
mysql-test/suite/mariabackup/backup_ssl.test
Normal file
16
mysql-test/suite/mariabackup/backup_ssl.test
Normal file
@ -0,0 +1,16 @@
|
||||
GRANT ALL PRIVILEGES on *.* TO backup_user IDENTIFIED by 'x' REQUIRE SSL;
|
||||
FLUSH PRIVILEGES;
|
||||
echo # xtrabackup backup;
|
||||
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --user=backup_user --password=x --ssl --backup --target-dir=$targetdir;
|
||||
--enable_result_log
|
||||
|
||||
echo # xtrabackup prepare;
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --prepare --target-dir=$targetdir;
|
||||
-- source include/restart_and_restore.inc
|
||||
--enable_result_log
|
||||
DROP USER backup_user;
|
||||
rmdir $targetdir;
|
||||
|
Loading…
x
Reference in New Issue
Block a user