Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f98496da
Commit
f98496da
authored
May 08, 2018
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-16105: Mariabackup does not support SSL
The reason is the missing HAVE_OPENSSL define for mariabackup.
parent
b62224e2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
9 deletions
+36
-9
extra/mariabackup/CMakeLists.txt
extra/mariabackup/CMakeLists.txt
+1
-1
extra/mariabackup/backup_mysql.cc
extra/mariabackup/backup_mysql.cc
+1
-1
extra/mariabackup/xtrabackup.cc
extra/mariabackup/xtrabackup.cc
+9
-7
mysql-test/suite/mariabackup/backup_ssl.result
mysql-test/suite/mariabackup/backup_ssl.result
+9
-0
mysql-test/suite/mariabackup/backup_ssl.test
mysql-test/suite/mariabackup/backup_ssl.test
+16
-0
No files found.
extra/mariabackup/CMakeLists.txt
View file @
f98496da
...
@@ -52,7 +52,7 @@ ELSE()
...
@@ -52,7 +52,7 @@ ELSE()
SET
(
NT_SERVICE_SOURCE
)
SET
(
NT_SERVICE_SOURCE
)
ENDIF
()
ENDIF
()
ADD_DEFINITIONS
(
-DPCRE_STATIC=1
)
ADD_DEFINITIONS
(
-DPCRE_STATIC=1
-DHAVE_OPENSSL=1
)
MYSQL_ADD_EXECUTABLE
(
mariabackup
MYSQL_ADD_EXECUTABLE
(
mariabackup
xtrabackup.cc
xtrabackup.cc
...
...
extra/mariabackup/backup_mysql.cc
View file @
f98496da
...
@@ -91,7 +91,7 @@ time_t history_lock_time;
...
@@ -91,7 +91,7 @@ time_t history_lock_time;
MYSQL
*
mysql_connection
;
MYSQL
*
mysql_connection
;
my_bool
opt_ssl_verify_server_cert
;
extern
my_bool
opt_ssl_verify_server_cert
,
opt_use_ssl
;
MYSQL
*
MYSQL
*
xb_mysql_connect
()
xb_mysql_connect
()
...
...
extra/mariabackup/xtrabackup.cc
View file @
f98496da
...
@@ -203,6 +203,10 @@ static ulong max_buf_pool_modified_pct;
...
@@ -203,6 +203,10 @@ static ulong max_buf_pool_modified_pct;
/* Ignored option (--log) for MySQL option compatibility */
/* Ignored option (--log) for MySQL option compatibility */
char
*
log_ignored_opt
=
NULL
;
char
*
log_ignored_opt
=
NULL
;
extern
my_bool
opt_use_ssl
;
my_bool
opt_ssl_verify_server_cert
;
/* === metadata of backup === */
/* === metadata of backup === */
#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints"
#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints"
char
metadata_type
[
30
]
=
""
;
/*[full-backuped|log-applied|
char
metadata_type
[
30
]
=
""
;
/*[full-backuped|log-applied|
...
@@ -360,9 +364,6 @@ uint opt_safe_slave_backup_timeout = 0;
...
@@ -360,9 +364,6 @@ uint opt_safe_slave_backup_timeout = 0;
const
char
*
opt_history
=
NULL
;
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 */
/* Whether xtrabackup_binlog_info should be created on recovery */
static
bool
recover_binlog_info
;
static
bool
recover_binlog_info
;
...
@@ -453,6 +454,7 @@ typedef struct {
...
@@ -453,6 +454,7 @@ typedef struct {
}
data_thread_ctxt_t
;
}
data_thread_ctxt_t
;
/* ======== for option and variables ======== */
/* ======== for option and variables ======== */
#include <../../client/client_priv.h>
enum
options_xtrabackup
enum
options_xtrabackup
{
{
...
@@ -528,8 +530,6 @@ enum options_xtrabackup
...
@@ -528,8 +530,6 @@ enum options_xtrabackup
OPT_INNODB_LOG_CHECKSUM_ALGORITHM
,
OPT_INNODB_LOG_CHECKSUM_ALGORITHM
,
OPT_XTRA_INCREMENTAL_FORCE_SCAN
,
OPT_XTRA_INCREMENTAL_FORCE_SCAN
,
OPT_DEFAULTS_GROUP
,
OPT_DEFAULTS_GROUP
,
OPT_OPEN_FILES_LIMIT
,
OPT_PLUGIN_DIR
,
OPT_PLUGIN_LOAD
,
OPT_PLUGIN_LOAD
,
OPT_INNODB_ENCRYPT_LOG
,
OPT_INNODB_ENCRYPT_LOG
,
OPT_CLOSE_FILES
,
OPT_CLOSE_FILES
,
...
@@ -915,9 +915,9 @@ struct my_option xb_client_options[] =
...
@@ -915,9 +915,9 @@ struct my_option xb_client_options[] =
{
"secure-auth"
,
OPT_XB_SECURE_AUTH
,
"Refuse client connecting to server if it"
{
"secure-auth"
,
OPT_XB_SECURE_AUTH
,
"Refuse client connecting to server if it"
" uses old (pre-4.1.1) protocol."
,
&
opt_secure_auth
,
" uses old (pre-4.1.1) protocol."
,
&
opt_secure_auth
,
&
opt_secure_auth
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
&
opt_secure_auth
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
#define MYSQL_CLIENT
#include "sslopt-longopts.h"
#include "sslopt-longopts.h"
#undef MYSQL_CLIENT
{
0
,
0
,
0
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
}
{
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,
...
@@ -1388,7 +1388,9 @@ xb_get_one_option(int optid,
}
}
}
}
break
;
break
;
#define MYSQL_CLIENT
#include "sslopt-case.h"
#include "sslopt-case.h"
#undef MYSQL_CLIENT
case
'?'
:
case
'?'
:
usage
();
usage
();
...
...
mysql-test/suite/mariabackup/backup_ssl.result
0 → 100644
View file @
f98496da
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;
mysql-test/suite/mariabackup/backup_ssl.test
0 → 100644
View file @
f98496da
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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment