summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorPhilip Stoev <philip.stoev@galeracluster.com>2014-12-15 04:45:58 -0800
committerNirbhay Choubey <nirbhay@mariadb.com>2015-05-08 17:41:05 -0400
commit7d550c76be13c58551e203f4eeb4f87ebd58ba4b (patch)
treea795e15b64d4d9297038201728103f34e6ef4187 /mysys
parent9d15689d1f529b493cd9f01fbd2271c3ff81497d (diff)
downloadmariadb-git-7d550c76be13c58551e203f4eeb4f87ebd58ba4b.tar.gz
LP1378355 - Pass the value of --defaults-group-suffix to xtrabackup during SST
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_default.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/mysys/my_default.c b/mysys/my_default.c
index d5ed1256f9c..a71a9c6fbcd 100644
--- a/mysys/my_default.c
+++ b/mysys/my_default.c
@@ -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;
}