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
7d550c76
Commit
7d550c76
authored
Dec 15, 2014
by
Philip Stoev
Committed by
Nirbhay Choubey
May 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LP1378355 - Pass the value of --defaults-group-suffix to xtrabackup during SST
parent
9d15689d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
11 deletions
+33
-11
mysys/my_default.c
mysys/my_default.c
+17
-4
scripts/wsrep_sst_common.sh
scripts/wsrep_sst_common.sh
+4
-0
scripts/wsrep_sst_xtrabackup-v2.sh
scripts/wsrep_sst_xtrabackup-v2.sh
+3
-3
sql/wsrep_sst.cc
sql/wsrep_sst.cc
+8
-4
sql/wsrep_sst.h
sql/wsrep_sst.h
+1
-0
No files found.
mysys/my_default.c
View file @
7d550c76
...
...
@@ -89,10 +89,13 @@ static char my_defaults_extra_file_buffer[FN_REFLEN];
static
my_bool
defaults_already_read
=
FALSE
;
#ifdef WITH_WSREP
/* The only purpose of this global array is to hold full name of my.cnf
* which seems to be otherwise unavailable */
char
wsrep_defaults_file
[
FN_REFLEN
+
10
]
=
{
0
,};
#endif
/* WITH_WREP */
/*
The only purpose of this global array is to hold full name of my.cnf
which seems to be otherwise unavailable.
*/
char
wsrep_defaults_file
[
FN_REFLEN
+
10
]
=
{
0
,};
char
wsrep_defaults_group_suffix
[
FN_REFLEN
]
=
{
0
,};
#endif
/* WITH_WSREP */
/* Which directories are searched for options (and in which order) */
...
...
@@ -439,6 +442,16 @@ int get_defaults_options(int argc, char **argv,
if
(
!*
group_suffix
&&
is_prefix
(
*
argv
,
"--defaults-group-suffix="
))
{
*
group_suffix
=
*
argv
+
sizeof
(
"--defaults-group-suffix="
)
-
1
;
#ifdef WITH_WSREP
/* make sure we do this only once - for top-level file */
if
(
'\0'
==
wsrep_defaults_group_suffix
[
0
])
{
strncpy
(
wsrep_defaults_group_suffix
,
*
group_suffix
,
sizeof
(
wsrep_defaults_group_suffix
)
-
1
);
}
#endif
/* WITH_WSREP */
argc
--
;
continue
;
}
...
...
scripts/wsrep_sst_common.sh
View file @
7d550c76
...
...
@@ -44,6 +44,10 @@ case "$1" in
readonly
WSREP_SST_OPT_CONF
=
"
$2
"
shift
;;
'--defaults-group-suffix'
)
readonly
WSREP_SST_OPT_CONF_SUFFIX
=
"
$2
"
shift
;;
'--host'
)
readonly
WSREP_SST_OPT_HOST
=
"
$2
"
shift
...
...
scripts/wsrep_sst_xtrabackup-v2.sh
View file @
7d550c76
...
...
@@ -557,8 +557,8 @@ fi
INNOEXTRA
=
""
INNOAPPLY
=
"
${
INNOBACKUPEX_BIN
}
$disver
$iapts
--apply-log
\$
rebuildcmd
\$
{DATA} &>
\$
{DATA}/innobackup.prepare.log"
INNOMOVE
=
"
${
INNOBACKUPEX_BIN
}
--defaults-file=
${
WSREP_SST_OPT_CONF
}
$disver
$impts
--move-back --force-non-empty-directories
\$
{DATA} &>
\$
{DATA}/innobackup.move.log"
INNOBACKUP
=
"
${
INNOBACKUPEX_BIN
}
--defaults-file=
${
WSREP_SST_OPT_CONF
}
$disver
$iopts
\$
tmpopts
\$
INNOEXTRA --galera-info --stream=
\$
sfmt
\$
itmpdir 2>
\$
{DATA}/innobackup.backup.log"
INNOMOVE
=
"
${
INNOBACKUPEX_BIN
}
--defaults-file=
${
WSREP_SST_OPT_CONF
}
--defaults-group=mysqld
${
WSREP_SST_OPT_CONF_SUFFIX
}
$disver
$impts
--move-back --force-non-empty-directories
\$
{DATA} &>
\$
{DATA}/innobackup.move.log"
INNOBACKUP
=
"
${
INNOBACKUPEX_BIN
}
--defaults-file=
${
WSREP_SST_OPT_CONF
}
--defaults-group=mysqld
${
WSREP_SST_OPT_CONF_SUFFIX
}
$disver
$iopts
\$
tmpopts
\$
INNOEXTRA --galera-info --stream=
\$
sfmt
\$
itmpdir 2>
\$
{DATA}/innobackup.backup.log"
if
[
"
$WSREP_SST_OPT_ROLE
"
=
"donor"
]
then
...
...
@@ -879,7 +879,7 @@ then
if
[[
$incremental
-eq
1
]]
;
then
# Added --ibbackup=xtrabackup_55 because it fails otherwise citing connection issues.
INNOAPPLY
=
"
${
INNOBACKUPEX_BIN
}
$disver
--defaults-file=
${
WSREP_SST_OPT_CONF
}
\
INNOAPPLY
=
"
${
INNOBACKUPEX_BIN
}
$disver
--defaults-file=
${
WSREP_SST_OPT_CONF
}
--defaults-group=mysqld
${
WSREP_SST_OPT_CONF_SUFFIX
}
\
--ibbackup=xtrabackup_56 --apply-log
$rebuildcmd
--redo-only
$BDATA
--incremental-dir=
${
DATA
}
&>>
${
BDATA
}
/innobackup.prepare.log"
fi
...
...
sql/wsrep_sst.cc
View file @
7d550c76
...
...
@@ -30,6 +30,7 @@
#include <cstdlib>
extern
const
char
wsrep_defaults_file
[];
extern
const
char
wsrep_defaults_group_suffix
[];
const
char
*
wsrep_sst_method
=
WSREP_SST_DEFAULT
;
const
char
*
wsrep_sst_receive_address
=
WSREP_SST_ADDRESS_AUTO
;
...
...
@@ -462,11 +463,12 @@ static ssize_t sst_prepare_other (const char* method,
WSREP_SST_OPT_AUTH
" '%s' "
WSREP_SST_OPT_DATA
" '%s' "
WSREP_SST_OPT_CONF
" '%s' "
WSREP_SST_OPT_CONF_SUFFIX
" '%s' "
WSREP_SST_OPT_PARENT
" '%d'"
" %s '%s' "
,
method
,
addr_in
,
(
sst_auth_real
)
?
sst_auth_real
:
""
,
sst_dir
,
wsrep_defaults_file
,
(
int
)
getpid
()
,
binlog_opt
,
binlog_opt_val
);
sst_dir
,
wsrep_defaults_file
,
wsrep_defaults_group_suffix
,
(
int
)
getpid
(),
binlog_opt
,
binlog_opt_val
);
my_free
(
binlog_opt_val
);
if
(
ret
<
0
||
ret
>=
(
int
)
sizeof
(
cmd_str
))
...
...
@@ -761,10 +763,11 @@ static int sst_donate_mysqldump (const char* addr,
WSREP_SST_OPT_LPORT
" '%u' "
WSREP_SST_OPT_SOCKET
" '%s' "
WSREP_SST_OPT_CONF
" '%s' "
WSREP_SST_OPT_CONF_SUFFIX
" '%s' "
WSREP_SST_OPT_GTID
" '%s:%lld'"
"%s"
,
user
,
pswd
,
host
,
port
,
mysqld_port
,
mysqld_unix_port
,
wsrep_defaults_file
,
uuid_str
,
wsrep_defaults_file
,
wsrep_defaults_group_suffix
,
uuid_str
,
(
long
long
)
seqno
,
bypass
?
" "
WSREP_SST_OPT_BYPASS
:
""
);
WSREP_DEBUG
(
"Running: '%s'"
,
cmd_str
);
...
...
@@ -1034,12 +1037,13 @@ static int sst_donate_other (const char* method,
WSREP_SST_OPT_SOCKET
" '%s' "
WSREP_SST_OPT_DATA
" '%s' "
WSREP_SST_OPT_CONF
" '%s' "
WSREP_SST_OPT_CONF_SUFFIX
" '%s' "
" %s '%s' "
WSREP_SST_OPT_GTID
" '%s:%lld'"
"%s"
,
method
,
addr
,
sst_auth_real
,
mysqld_unix_port
,
mysql_real_data_home
,
wsrep_defaults_file
,
binlog_opt
,
binlog_opt_val
,
wsrep_defaults_group_suffix
,
binlog_opt
,
binlog_opt_val
,
uuid
,
(
long
long
)
seqno
,
bypass
?
" "
WSREP_SST_OPT_BYPASS
:
""
);
my_free
(
binlog_opt_val
);
...
...
sql/wsrep_sst.h
View file @
7d550c76
...
...
@@ -24,6 +24,7 @@
#define WSREP_SST_OPT_AUTH "--auth"
#define WSREP_SST_OPT_DATA "--datadir"
#define WSREP_SST_OPT_CONF "--defaults-file"
#define WSREP_SST_OPT_CONF_SUFFIX "--defaults-group-suffix"
#define WSREP_SST_OPT_PARENT "--parent"
#define WSREP_SST_OPT_BINLOG "--binlog"
...
...
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