change --defaults-file to --defaults-extra-file
Bug #1328296 reported by
Morgan Tocker
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-
Is it possible to change this to --defaults-
See also: http://
To post a comment you must log in.
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 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
$HOME/opt/
Here it is mysqldump that is not using the extra file.
I am open to suggestions that won't break the sandbox integrity