File tree Expand file tree Collapse file tree 1 file changed +9
-23
lines changed Expand file tree Collapse file tree 1 file changed +9
-23
lines changed Original file line number Diff line number Diff line change @@ -272,23 +272,6 @@ install_examples()
272272 ( cd " $EXAMPLEPROBDIR " && yes y | " $BINDIR " /import-contest )
273273}
274274
275- uninstall_helper ()
276- {
277- read_dbpasswords
278- remove_db_users
279- }
280-
281- create_db_users_helper ()
282- {
283- read_dbpasswords
284- create_db_users
285- verbose " Created empty database and users."
286- }
287-
288- create_database_dump () {
289- mysqldump $( mysql_options) --opt --skip-lock-tables " $DBNAME " | pv | gzip > " $DATABASEDUMPDIR /${1} .sql.gz"
290- }
291-
292275# ## Script starts here ###
293276
294277# Parse command-line options:
@@ -345,7 +328,8 @@ genpass)
345328 ;;
346329
347330uninstall)
348- uninstall_helper
331+ read_dbpasswords
332+ remove_db_users
349333 ;;
350334
351335install-examples)
@@ -364,7 +348,8 @@ install-loadtest)
364348 ;;
365349
366350create-db-users)
367- create_db_users_helper
351+ read_dbpasswords
352+ create_db_users
368353 ;;
369354
370355update-password)
@@ -413,7 +398,8 @@ dump)
413398 exit 1
414399 fi
415400
416- if [ -f " ${DATABASEDUMPDIR} /${DUMPNAME} .sql.gz" ]; then
401+ DUMPFILE=" ${DATABASEDUMPDIR} /${DUMPNAME} .sql.gz"
402+ if [ -f " $DUMPFILE " ]; then
417403 while true ; do
418404 printf " Overwrite existing database dump (y/N)? "
419405 read -r yn
@@ -423,7 +409,7 @@ dump)
423409 esac
424410 done
425411 fi
426- create_database_dump " $DUMPNAME "
412+ mysqldump $( mysql_options ) --opt --skip-lock-tables " $DBNAME " | pv | gzip > " $DUMPFILE "
427413 ;;
428414
429415load)
@@ -465,8 +451,8 @@ load)
465451 fi
466452
467453 read_dbpasswords
468- uninstall_helper
469- create_db_users_helper
454+ remove_db_users
455+ create_db_users
470456 pv " ${FILE} " | gunzip | mysql " $DBNAME "
471457 ;;
472458
You can’t perform that action at this time.
0 commit comments