1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-15512 - Fix sh parse error when [sst] config value has spaces.

Merged https://github.com/MariaDB/server/pull/617 authored by
Colin Mollenhour.
This commit is contained in:
Jan Lindström
2018-08-29 19:30:03 +03:00
parent 6c588c92a9
commit 104089e182

View File

@@ -277,8 +277,8 @@ parse_cnf()
reval=$($MY_PRINT_DEFAULTS "${group}" | awk -v var="${var}" 'BEGIN { OFS=FS="=" } { gsub(/_/,"-",$1); if ( $1=="--"var) lastval=substr($0,length($1)+2) } END { print lastval}')
# use default if we haven't found a value
if [ -z $reval ]; then
[ -n $3 ] && reval=$3
if [ -z "$reval" ]; then
[ -n "$3" ] && reval=$3
fi
echo $reval
}