File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ get_option () {
55 local section=$1
66 local option=$2
77 local default=$3
8- ret=$( my_print_defaults $section | grep ' ^--' ${option} ' =' | cut -d= -f2-)
8+ # my_print_defaults can output duplicates, if an option exists both globally and in
9+ # a custom config file. We pick the last occurence, which is from the custom config.
10+ ret=$( my_print_defaults $section | grep ' ^--' ${option} ' =' | cut -d= -f2- | tail -n1)
911 [ -z $ret ] && ret=$default
1012 echo $ret
1113}
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ get_option () {
55 local section=$1
66 local option=$2
77 local default=$3
8- ret=$( my_print_defaults $section | grep ' ^--' ${option} ' =' | cut -d= -f2-)
8+ # my_print_defaults can output duplicates, if an option exists both globally and in
9+ # a custom config file. We pick the last occurence, which is from the custom config.
10+ ret=$( my_print_defaults $section | grep ' ^--' ${option} ' =' | cut -d= -f2- | tail -n1)
911 [ -z $ret ] && ret=$default
1012 echo $ret
1113}
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ get_option () {
55 local section=$1
66 local option=$2
77 local default=$3
8- ret=$( my_print_defaults $section | grep ' ^--' ${option} ' =' | cut -d= -f2-)
8+ # my_print_defaults can output duplicates, if an option exists both globally and in
9+ # a custom config file. We pick the last occurence, which is from the custom config.
10+ ret=$( my_print_defaults $section | grep ' ^--' ${option} ' =' | cut -d= -f2- | tail -n1)
911 [ -z $ret ] && ret=$default
1012 echo $ret
1113}
@@ -77,6 +79,7 @@ if [ "$1" = 'mysqld' ]; then
7779 echo ' FLUSH PRIVILEGES ;' >> " $tempSqlFile "
7880
7981 mysql -uroot < " $tempSqlFile "
82+
8083 rm -f " $tempSqlFile "
8184 kill $( cat $PIDFILE )
8285 for i in $( seq 30 -1 0) ; do
@@ -95,4 +98,3 @@ if [ "$1" = 'mysqld' ]; then
9598fi
9699
97100exec " $@ "
98-
You can’t perform that action at this time.
0 commit comments