mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
wsrep_sst_xtrabackup*: read all sections of config not nust mysqld
--mysqld parsed to parse_cnf aka my_print_defaults will parse all sections which the server read and not just mysqld.
This commit is contained in:
@ -469,15 +469,15 @@ read_cnf()
|
|||||||
# Pull the parameters needed for encrypt=4
|
# Pull the parameters needed for encrypt=4
|
||||||
ssl_ca=$(parse_cnf sst ssl-ca "")
|
ssl_ca=$(parse_cnf sst ssl-ca "")
|
||||||
if [[ -z "$ssl_ca" ]]; then
|
if [[ -z "$ssl_ca" ]]; then
|
||||||
ssl_ca=$(parse_cnf mysqld ssl-ca "")
|
ssl_ca=$(parse_cnf --mysqld ssl-ca "")
|
||||||
fi
|
fi
|
||||||
ssl_cert=$(parse_cnf sst ssl-cert "")
|
ssl_cert=$(parse_cnf sst ssl-cert "")
|
||||||
if [[ -z "$ssl_cert" ]]; then
|
if [[ -z "$ssl_cert" ]]; then
|
||||||
ssl_cert=$(parse_cnf mysqld ssl-cert "")
|
ssl_cert=$(parse_cnf --mysqld ssl-cert "")
|
||||||
fi
|
fi
|
||||||
ssl_key=$(parse_cnf sst ssl-key "")
|
ssl_key=$(parse_cnf sst ssl-key "")
|
||||||
if [[ -z "$ssl_key" ]]; then
|
if [[ -z "$ssl_key" ]]; then
|
||||||
ssl_key=$(parse_cnf mysqld ssl-key "")
|
ssl_key=$(parse_cnf --mysqld ssl-key "")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rlimit=$(parse_cnf sst rlimit "")
|
rlimit=$(parse_cnf sst rlimit "")
|
||||||
@ -667,8 +667,8 @@ check_extra()
|
|||||||
{
|
{
|
||||||
local use_socket=1
|
local use_socket=1
|
||||||
if [[ $uextra -eq 1 ]];then
|
if [[ $uextra -eq 1 ]];then
|
||||||
if $MY_PRINT_DEFAULTS --mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then
|
if [ $(parse_cnf --mysqld thread-handling) = 'pool-of-threads'];then
|
||||||
local eport=$($MY_PRINT_DEFAULTS --mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2)
|
local eport=$(parse_cnf --mysqld extra-port)
|
||||||
if [[ -n $eport ]];then
|
if [[ -n $eport ]];then
|
||||||
# Xtrabackup works only locally.
|
# Xtrabackup works only locally.
|
||||||
# Hence, setting host to 127.0.0.1 unconditionally.
|
# Hence, setting host to 127.0.0.1 unconditionally.
|
||||||
@ -901,7 +901,7 @@ then
|
|||||||
exit 93
|
exit 93
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $(parse_cnf mysqld tmpdir "") && -z $(parse_cnf xtrabackup tmpdir "") ]];then
|
if [[ -z $(parse_cnf --mysqld tmpdir "") && -z $(parse_cnf xtrabackup tmpdir "") ]];then
|
||||||
xtmpdir=$(mktemp -d)
|
xtmpdir=$(mktemp -d)
|
||||||
tmpopts=" --tmpdir=$xtmpdir "
|
tmpopts=" --tmpdir=$xtmpdir "
|
||||||
wsrep_log_info "Using $xtmpdir as xtrabackup temporary directory"
|
wsrep_log_info "Using $xtmpdir as xtrabackup temporary directory"
|
||||||
@ -1015,9 +1015,9 @@ then
|
|||||||
[[ -e $SST_PROGRESS_FILE ]] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE"
|
[[ -e $SST_PROGRESS_FILE ]] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE"
|
||||||
[[ -n $SST_PROGRESS_FILE ]] && touch $SST_PROGRESS_FILE
|
[[ -n $SST_PROGRESS_FILE ]] && touch $SST_PROGRESS_FILE
|
||||||
|
|
||||||
ib_home_dir=$(parse_cnf mysqld innodb-data-home-dir "")
|
ib_home_dir=$(parse_cnf --mysqld innodb-data-home-dir "")
|
||||||
ib_log_dir=$(parse_cnf mysqld innodb-log-group-home-dir "")
|
ib_log_dir=$(parse_cnf --mysqld innodb-log-group-home-dir "")
|
||||||
ib_undo_dir=$(parse_cnf mysqld innodb-undo-directory "")
|
ib_undo_dir=$(parse_cnf --mysqld innodb-undo-directory "")
|
||||||
|
|
||||||
stagemsg="Joiner-Recv"
|
stagemsg="Joiner-Recv"
|
||||||
|
|
||||||
@ -1079,7 +1079,7 @@ then
|
|||||||
wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories"
|
wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories"
|
||||||
find $ib_home_dir $ib_log_dir $ib_undo_dir $DATA -mindepth 1 -regex $cpat -prune -o -exec rm -rfv {} 1>&2 \+
|
find $ib_home_dir $ib_log_dir $ib_undo_dir $DATA -mindepth 1 -regex $cpat -prune -o -exec rm -rfv {} 1>&2 \+
|
||||||
|
|
||||||
tempdir=$(parse_cnf mysqld log-bin "")
|
tempdir=$(parse_cnf --mysqld log-bin "")
|
||||||
if [[ -n ${tempdir:-} ]];then
|
if [[ -n ${tempdir:-} ]];then
|
||||||
binlog_dir=$(dirname $tempdir)
|
binlog_dir=$(dirname $tempdir)
|
||||||
binlog_file=$(basename $tempdir)
|
binlog_file=$(basename $tempdir)
|
||||||
|
@ -377,8 +377,8 @@ check_extra()
|
|||||||
{
|
{
|
||||||
local use_socket=1
|
local use_socket=1
|
||||||
if [[ $uextra -eq 1 ]];then
|
if [[ $uextra -eq 1 ]];then
|
||||||
if $MY_PRINT_DEFAULTS --mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then
|
if [ $(parse_cnf --mysqld thread-handling) = 'pool-of-threads'];then
|
||||||
local eport=$($MY_PRINT_DEFAULTS --mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2)
|
local eport=$(parse_cnf --mysqld extra-port)
|
||||||
if [[ -n $eport ]];then
|
if [[ -n $eport ]];then
|
||||||
# Xtrabackup works only locally.
|
# Xtrabackup works only locally.
|
||||||
# Hence, setting host to 127.0.0.1 unconditionally.
|
# Hence, setting host to 127.0.0.1 unconditionally.
|
||||||
|
Reference in New Issue
Block a user