forked from docker-library/mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make get_option() handle duplicate options in my_print_defaults output
get_option() was added by docker-library#53 to extract `socket` and `pid-file` from my_print_defaults. However if a custom mysql configuration file has been added, my_print_defaults returns duplicates (it merely lists all options specified in any config file and doesn't de-dupe). In these cases, `ret` would equal `/var/run/mysqld/mysqld.sock /var/lib/mysql/mysql.sock`, causing: `/entrypoint.sh: line 9: [: /var/run/mysqld/mysqld.sock: binary operator expected` As such, get_option() should just return the last matching option found in the my_print_defaults output - which should correspond to the one in the custom configuration file (rather than say the global default). Fixes docker-library#74.
- Loading branch information
Ed Morley
committed
Jun 11, 2015
1 parent
f1b05ac
commit f9fd52d
Showing
3 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters