This repository was archived by the owner on Aug 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -486,10 +486,21 @@ function check_cli_parameters() {
486486 fi
487487 err " NOTICE: Switched to a new sub-directory in the temp path: $TMP_PATH "
488488
489+ if [[ ! -z ${DB_DUMP+x} ]]; then
490+ check_path DB_DUMP
491+ if [[ " $? " -ne " 0" ]]; then
492+ echo " $DB_DUMP " > $TMP_PATH /db_dump_tmp.sql
493+ DB_DUMP=" $TMP_PATH /db_dump_tmp.sql"
494+ fi
495+ DB_DUMP_FILENAME=$( basename $DB_DUMP )
496+ DB_DUMP_EXT=${DB_DUMP_FILENAME##* .}
497+ fi
498+
489499 workloads_count=0
490500 [[ ! -z ${WORKLOAD_BASIS+x} ]] && let workloads_count=$workloads_count +1
491501 [[ ! -z ${WORKLOAD_REAL+x} ]] && let workloads_count=$workloads_count +1
492502 [[ ! -z ${WORKLOAD_CUSTOM_SQL+x} ]] && let workloads_count=$workloads_count +1
503+ [[ ${DB_DUMP_EXT} = " pgbnch" ]] && let workloads_count=$workloads_count +1
493504
494505 if [[ -z ${DB_PREPARED_SNAPSHOT+x} ]] && [[ -z ${DB_DUMP+x} ]]; then
495506 err " ERROR: The object (database) is not defined."
@@ -512,16 +523,6 @@ function check_cli_parameters() {
512523 exit 1
513524 fi
514525
515- if [[ ! -z ${DB_DUMP+x} ]]; then
516- check_path DB_DUMP
517- if [[ " $? " -ne " 0" ]]; then
518- echo " $DB_DUMP " > $TMP_PATH /db_dump_tmp.sql
519- DB_DUMP=" $TMP_PATH /db_dump_tmp.sql"
520- fi
521- DB_DUMP_FILENAME=$( basename $DB_DUMP )
522- DB_DUMP_EXT=${DB_DUMP_FILENAME##* .}
523- fi
524-
525526 if [[ -z ${DB_NAME+x} ]]; then
526527 dbg " NOTICE: Database name is not given. Will use 'test'"
527528 DB_NAME=' test'
You can’t perform that action at this time.
0 commit comments