diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2019-06-13 13:59:54 +0200 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2019-06-13 13:59:54 +0200 |
commit | f9df3a341c42ae791c460851d4fc52b57841b24b (patch) | |
tree | c9b273c9e0ca9035312cd30765bf178561735a9f /scripts/mysqld_multi.sh | |
parent | e68d3e45572caa41bd167b7934e2b382a31e6cb5 (diff) | |
download | mariadb-git-bb-10.5-MDEV-18863.tar.gz |
MDEV-18863: Galera SST scripts can't read [mysqldN] option groupsbb-10.5-MDEV-18863
Some users and some scripts (for example, mysqld_multi.sh) use special
option groups with names like [mysqld1], [mysqld2], ..., [mysqldN].
But SST scripts can't currently fully support these option groups.
The only option group-related value it gets from the server is
--defaults-group-suffix from the server, if that option was set
for mysqld when the server was started.
However, the SST script does not get told by the server to read
these option groups, so this means that the SST script will fail to
read options like innodb-data-home-dir when it is in a option group
like [mysqld1]...[mysqldN].
Moreover, SST scripts ignore many parameters that can be passed
to them explicitly and cannot transfer them further, for example,
to the input of mariabackup utility. Ideally, we want to transfer
all the parameters of the original mysqld call to utilities such
as mariabackup, however the SST script does not receive these
parameters and therefore cannot transfer them to mariabackup.
To correct these shortcomings, we need to add a transfer to the
script of all the parameters of the original mysqld call, and in
the SST scripts themselves provide for the transfer of these
parameters to utilities such as mariabackup. To prevent these
parameters from mixing with the script's own parameters, they
should be transferred to SST script after the special option
"--mysqld-args", followed by the line of the original parameters,
as received by mysqld call at the time of launch (further all
these parameters will be passed to mariabackup, for example).
In addition, the SST scripts themselves must be refined so that
they can read the parameters from the user-selected group, not just
from the global mysqld configuration group. And also so that they
can receive the parameters (which important for their work) as
command-line arguments.
Diffstat (limited to 'scripts/mysqld_multi.sh')
-rw-r--r-- | scripts/mysqld_multi.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 7add8541d7a..a00fab433e8 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -308,7 +308,9 @@ sub report_mysqlds sub start_mysqlds() { - my (@groups, $com, $tmp, $i, @options, $j, $mysqld_found, $info_sent); + my (@groups, $com, $tmp, $i, @options, $j, $mysqld_found, $suffix_found, $info_sent); + + $suffix_found= 0; if (!$opt_no_log) { @@ -347,6 +349,10 @@ sub start_mysqlds() $options[$j]= quote_shell_word($options[$j]); $tmp.= " $options[$j]"; } + elseif ("--defaults-group-suffix=" eq substr($options[$j], 0, 24)) + { + $suffix_found= 1; + } else { $options[$j]= quote_shell_word($options[$j]); @@ -364,6 +370,11 @@ sub start_mysqlds() } $com.= $tmp; + if (!$suffix_found) + { + $com.= " --defaults-group-suffix=$i"; + } + if ($opt_wsrep_new_cluster) { $com.= " --wsrep-new-cluster"; } |