Comment 13 for bug 740489

Revision history for this message
Alexey Kopytov (akopytov) wrote :

I was considering a hack that would allow both --defaults-file and
--defaults-extra-file to be specified. Something along the following
lines in get_mysql_options() would allow both to be specified and solve
the problem for the mysql command line client:

if ($option_defaults_extra_file) {
  my $extra_options=`my_print_defaults -c $option_defaults_extra_file mysql client`;
  $extra_options =~ tr{\n}{ };
  $options .= $extra_options;
}

What I didn't like in this approach:

1. That would only work for specifying connection parameters for
innobackupex. The xtrabackup binary uses my_getopt() and thus, cannot
use both --defaults-file and --defaults-extra-file. Which also means
--defaults-extra-file would be a rather confusing option

2. Since we are going to get rid of innobackupex and merge it to the
xtrabackup binary, we would have to replicate the same hack
there. Knowing my_getopt, I agree it will be ugly and open a can of
worms.