diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2009-11-18 21:36:17 +0100 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2009-11-18 21:36:17 +0100 |
commit | 27fca0ab1775a8c1dfe699c978b6448a7aa8f47b (patch) | |
tree | da43ca3bde045a25eabf88feed63db767557185a /scripts | |
parent | 6c832ee4bf4b0bc0bca769dcff10a994e202263b (diff) | |
download | mariadb-git-27fca0ab1775a8c1dfe699c978b6448a7aa8f47b.tar.gz |
Backport of the fix for BUG#40368 "mysqld_safe not honouring underscore same as dash on server options" from 6.0
(revision-id:guilhem@mysql.com-20090505113602-l12kxupeatve18dh).
Such bug led "mysqld_safe --core_file_size=#" to not work because mysqld_safe wouldn't recognize
that "ulimit -c" is needed; only --core-file-size=# worked. Same for --open_files_limit and other
options with _ where mysqld_safe needs to do something more than passing to mysqld.
Original fix by Erik Ljungstrom erik at ibiblio dot org ; slightly modified here.
Tested on all internally accessible Unix.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysqld_safe.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 95c4419273f..70b9b9f630e 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -160,7 +160,13 @@ parse_arguments() { fi for arg do - val=`echo "$arg" | sed -e "s;--[^=]*=;;"` + # the parameter after "=", or the whole $arg if no match + val=`echo "$arg" | sed -e 's;^--[^=]*=;;'` + # what's before "=", or the whole $arg if no match + optname=`echo "$arg" | sed -e 's/^\(--[^=]*\)=.*$/\1/'` + # replace "_" by "-" ; mysqld_safe must accept "_" like mysqld does. + optname_subst=`echo "$optname" | sed 's/_/-/g'` + arg=`echo $arg | sed "s/^$optname/$optname_subst/"` case "$arg" in # these get passed explicitly to mysqld --basedir=*) MY_BASEDIR_VERSION="$val" ;; |