File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,10 @@ function do_dump() {
125125 fi
126126 if [ -n " $DB_DUMP_BY_SCHEMA " -a " $DB_DUMP_BY_SCHEMA " = " true" ]; then
127127 if [[ -z " $DB_NAMES " ]]; then
128- DB_NAMES =$( mysql -h $DB_SERVER -P $DB_PORT $DBUSER $DBPASS -N -e ' show databases' )
128+ DB_LIST =$( mysql -h $DB_SERVER -P $DB_PORT $DBUSER $DBPASS -N -e ' show databases' )
129129 [ $? -ne 0 ] && return 1
130+ else
131+ DB_LIST=" $DB_NAMES "
130132 fi
131133 if [ -z " $DB_NAMES_EXCLUDE " ]; then
132134 DB_NAMES_EXCLUDE=" information_schema performance_schema mysql sys"
@@ -135,7 +137,7 @@ function do_dump() {
135137 for i in $DB_NAMES_EXCLUDE ; do
136138 exclude_list[$i ]=" true"
137139 done
138- for onedb in $DB_NAMES ; do
140+ for onedb in $DB_LIST ; do
139141 if [ -v exclude_list[$onedb ] ]; then
140142 # skip db if it is in the exclude list
141143 continue
@@ -468,7 +470,7 @@ function next_cron_expression() {
468470 else
469471 # if it is not a step function, just add the tmpvalid to the allvalid
470472 allvalid=" $allvalid $tmpvalid "
471- fi
473+ fi
472474 done
473475
474476 # sort for deduplication and ordering
You can’t perform that action at this time.
0 commit comments