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
2f0e7f66
Commit
2f0e7f66
authored
Jun 14, 2024
by
Julius Goryavsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
galera: syncing SST scripts code with the following versions
parent
1001dae1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
24 deletions
+15
-24
scripts/wsrep_sst_common.sh
scripts/wsrep_sst_common.sh
+12
-17
scripts/wsrep_sst_mariabackup.sh
scripts/wsrep_sst_mariabackup.sh
+1
-3
scripts/wsrep_sst_mysqldump.sh
scripts/wsrep_sst_mysqldump.sh
+2
-4
No files found.
scripts/wsrep_sst_common.sh
View file @
2f0e7f66
...
...
@@ -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
readonly
WSREP_SST_OPT_USER
readonly
WSREP_SST_OPT_PSWD
readonly
WSREP_SST_OPT_AUTH
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 ':'
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
=
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
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
...
...
scripts/wsrep_sst_mariabackup.sh
View file @
2f0e7f66
...
...
@@ -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
...
...
scripts/wsrep_sst_mysqldump.sh
View file @
2f0e7f66
...
...
@@ -40,17 +40,15 @@ then
fi
# Check client version
if
!
$MYSQL_CLIENT
--version
|
grep
-q
-E
'
Distrib 10\.[1-9]
'
;
then
if
!
$MYSQL_CLIENT
--version
|
grep
-q
-E
'
(Distrib 10\.[1-9])|( from 1[1-9]\.)
'
;
then
$MYSQL_CLIENT
--version
>
&2
wsrep_log_error
"this operation requires MySQL client version 10.1 or newer"
exit
$EINVAL
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
...
...
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