change --defaults-file to --defaults-extra-file

Bug #1328296 reported by Morgan Tocker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Sandbox
Won't Fix
Undecided
Unassigned

Bug Description

With the 'my' program included in MySQL sandbox, the --defaults-file flag prevents all other --defaults-file / --defaults-extra-file arguments being sent to utilities.

Is it possible to change this to --defaults-extra-file ?

See also: http://bugs.mysql.com/bug.php?id=72924

Revision history for this message
Giuseppe Maxia (giuseppe-maxia) wrote :

It is not possible to change --defaults-file with --defaults-extra-file. Although the two options seem to achieve the same result, there is a substantial difference.

When you use --defaults-file, the sandbox ignores any options file in the defaults locations:
/etc/my.cnf
/etc/mysql/my.cnf
$BASEDIR/my.cnf

If we use --defaults-extra-file, the above files are read before the given file. If they contain options that are not overwritten by the sandbox options file, strange things will happen.

When I designed the "my" script, I came across the inconsistent behavior when using multiple --defaults*-file options, and I decided that --defaults-file is the safest choice. I think this is more a bug in mysql tools than MySQL Sandbox.

Right now, if you add --defaults-extra-file to 'my', it passes it to the upstream tool:

./my sqldump --defaults-extra-file=./mysqldump.cnf --no-data mysql user
$HOME/opt/mysql/5.7.4/bin/mysqldump --defaults-file=$HOME/sandboxes/msb_5_7_4/my.sandbox.cnf --defaults-extra-file=./mysqldump.cnf --no-data mysql user

Here it is mysqldump that is not using the extra file.

I am open to suggestions that won't break the sandbox integrity

Changed in mysql-sandbox:
status: New → Won't Fix
Revision history for this message
Morgan Tocker (morgo) wrote :

Makes sense - thank you for the response.

In the case of --defaults-extra-file, it will be passed but ignored by the downstream MySQL tool as per bug #72924.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.