mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge remote-tracking branch 'origin/11.2' into 11.4
This commit is contained in:
@@ -233,6 +233,7 @@ ELSE()
|
||||
SET(sysconfdir "/etc")
|
||||
ENDIF()
|
||||
SET(bindir ${INSTALL_BINDIRABS})
|
||||
SET(sbindir ${INSTALL_SBINDIRABS})
|
||||
SET(libexecdir ${INSTALL_SBINDIRABS})
|
||||
SET(scriptdir ${INSTALL_BINDIRABS})
|
||||
SET(datadir ${INSTALL_MYSQLSHAREDIRABS})
|
||||
|
@@ -17,6 +17,11 @@ SET NAMES utf8;
|
||||
SET @sql_log_bin = @@sql_log_bin;
|
||||
SET sql_log_bin = 0;
|
||||
|
||||
CREATE DATABASE IF NOT EXISTS sys DEFAULT CHARACTER SET utf8;
|
||||
CREATE DATABASE IF NOT EXISTS sys DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci;
|
||||
|
||||
-- If the database had existed, let's recreate its db.opt:
|
||||
-- * to fix it if it contained unexpected charset/collation values
|
||||
-- * to create it if it was removed in a mistake
|
||||
ALTER DATABASE sys CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci;
|
||||
|
||||
USE sys;
|
||||
|
@@ -152,7 +152,6 @@ WSREP_SST_OPT_DATA=""
|
||||
WSREP_SST_OPT_AUTH="${WSREP_SST_OPT_AUTH:-}"
|
||||
WSREP_SST_OPT_USER="${WSREP_SST_OPT_USER:-}"
|
||||
WSREP_SST_OPT_PSWD="${WSREP_SST_OPT_PSWD:-}"
|
||||
WSREP_SST_OPT_REMOTE_AUTH="${WSREP_SST_OPT_REMOTE_AUTH:-}"
|
||||
WSREP_SST_OPT_DEFAULT=""
|
||||
WSREP_SST_OPT_DEFAULTS=""
|
||||
WSREP_SST_OPT_EXTRA_DEFAULT=""
|
||||
@@ -1008,11 +1007,6 @@ in_config()
|
||||
echo $found
|
||||
}
|
||||
|
||||
wsrep_auth_not_set()
|
||||
{
|
||||
[ -z "$WSREP_SST_OPT_AUTH" ]
|
||||
}
|
||||
|
||||
# Get rid of incorrect values resulting from substitution
|
||||
# in programs external to the script:
|
||||
if [ "$WSREP_SST_OPT_USER" = '(null)' ]; then
|
||||
@@ -1028,12 +1022,12 @@ fi
|
||||
# Let's read the value of the authentication string from the
|
||||
# configuration file so that it does not go to the command line
|
||||
# and does not appear in the ps output:
|
||||
if wsrep_auth_not_set; then
|
||||
if [ -z "$WSREP_SST_OPT_AUTH" ]; then
|
||||
WSREP_SST_OPT_AUTH=$(parse_cnf 'sst' 'wsrep-sst-auth')
|
||||
fi
|
||||
|
||||
# Splitting WSREP_SST_OPT_AUTH as "user:password" pair:
|
||||
if ! wsrep_auth_not_set; then
|
||||
if [ -n "$WSREP_SST_OPT_AUTH" ]; then
|
||||
# Extract username as shortest prefix up to first ':' character:
|
||||
WSREP_SST_OPT_AUTH_USER="${WSREP_SST_OPT_AUTH%%:*}"
|
||||
if [ -z "$WSREP_SST_OPT_USER" ]; then
|
||||
@@ -1057,19 +1051,20 @@ if ! wsrep_auth_not_set; then
|
||||
fi
|
||||
fi
|
||||
|
||||
WSREP_SST_OPT_REMOTE_AUTH="${WSREP_SST_OPT_REMOTE_AUTH:-}"
|
||||
WSREP_SST_OPT_REMOTE_USER=
|
||||
WSREP_SST_OPT_REMOTE_PSWD=
|
||||
if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then
|
||||
# Split auth string at the last ':'
|
||||
WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}"
|
||||
WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}"
|
||||
fi
|
||||
|
||||
readonly WSREP_SST_OPT_USER
|
||||
readonly WSREP_SST_OPT_PSWD
|
||||
readonly WSREP_SST_OPT_AUTH
|
||||
|
||||
if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then
|
||||
# Split auth string at the last ':'
|
||||
readonly WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}"
|
||||
readonly WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}"
|
||||
else
|
||||
readonly WSREP_SST_OPT_REMOTE_USER=
|
||||
readonly WSREP_SST_OPT_REMOTE_PSWD=
|
||||
fi
|
||||
|
||||
readonly WSREP_SST_OPT_REMOTE_USER
|
||||
readonly WSREP_SST_OPT_REMOTE_PSWD
|
||||
readonly WSREP_SST_OPT_REMOTE_AUTH
|
||||
|
||||
if [ -n "$WSREP_SST_OPT_DATA" ]; then
|
||||
|
@@ -1100,15 +1100,13 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
|
||||
|
||||
wsrep_log_info "Using '$itmpdir' as mariadb-backup working directory"
|
||||
|
||||
usrst=0
|
||||
if [ -n "$WSREP_SST_OPT_USER" ]; then
|
||||
INNOEXTRA="$INNOEXTRA --user='$WSREP_SST_OPT_USER'"
|
||||
usrst=1
|
||||
fi
|
||||
|
||||
if [ -n "$WSREP_SST_OPT_PSWD" ]; then
|
||||
export MYSQL_PWD="$WSREP_SST_OPT_PSWD"
|
||||
elif [ $usrst -eq 1 ]; then
|
||||
elif [ -n "$WSREP_SST_OPT_USER" ]; then
|
||||
# Empty password, used for testing, debugging etc.
|
||||
unset MYSQL_PWD
|
||||
fi
|
||||
|
@@ -47,10 +47,8 @@ if ! $MYSQL_CLIENT --version | grep -q -E '(Distrib 10\.[1-9])|( from 1[1-9]\.)'
|
||||
fi
|
||||
|
||||
AUTH=""
|
||||
usrst=0
|
||||
if [ -n "$WSREP_SST_OPT_USER" ]; then
|
||||
AUTH="-u$WSREP_SST_OPT_USER"
|
||||
usrst=1
|
||||
fi
|
||||
|
||||
# Refs https://github.com/codership/mysql-wsrep/issues/141
|
||||
@@ -64,7 +62,7 @@ fi
|
||||
# word, it is arguably more secure than passing password on the command line.
|
||||
if [ -n "$WSREP_SST_OPT_PSWD" ]; then
|
||||
export MYSQL_PWD="$WSREP_SST_OPT_PSWD"
|
||||
elif [ $usrst -eq 1 ]; then
|
||||
elif [ -n "$WSREP_SST_OPT_USER" ]; then
|
||||
# Empty password, used for testing, debugging etc.
|
||||
unset MYSQL_PWD
|
||||
fi
|
||||
|
Reference in New Issue
Block a user