Skip to content

Commit

Permalink
check db_database is set
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-silva committed Dec 22, 2023
1 parent 12bef92 commit 861a498
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ mysql_exec_initial_dump() {

mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -e 'RESET MASTER;'

databases=("mysql" "$DB_DATABASE")
databases=("mysql")

if [ -n "$DB_DATABASE" ]; then
databases+=("$DB_DATABASE")
fi

for DB in "${databases[@]}"; do
info "Start dump process database $DB"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ mysql_exec_initial_dump() {

mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -e 'RESET MASTER;'

databases=("mysql" "$DB_DATABASE")
databases=("mysql")

if [ -n "$DB_DATABASE" ]; then
databases+=("$DB_DATABASE")
fi

for DB in "${databases[@]}"; do
info "Start dump process database $DB"
Expand Down

0 comments on commit 861a498

Please sign in to comment.