diff --git a/plugins/localdump/mysql.sh b/plugins/localdump/mysql.sh index 7c834a32b74fb28ca790c4beaadbf77208f5290f..4f69c2523f2753e312806687e2fdb31eae23a516 100755 --- a/plugins/localdump/mysql.sh +++ b/plugins/localdump/mysql.sh @@ -95,12 +95,13 @@ function mysql.db.dump(){ zgrep -iE "(CREATE|INSERT)" "$_dumpfile" >/dev/null typeset -i local _rc2=$? - test $_rc2 -ne 0 && echo "ERROR: the dump does not contain an insert statement." + test $_rc2 -ne 0 && echo "ERROR: the dump does not contain any CREATE or INSERT statement." - typeset -i local _rctotal=$?+$_rc2 - test $_rctotal -eq 0 && mysql_COUNT_DUMPS+=1 - test $_rctotal -eq 0 || mysql_COUNT_ERRORS+=1 - test $_rctotal -eq 0 + typeset -i local myrc+=$_rc2 + test $myrc -eq 0 && mysql_COUNT_DUMPS+=1 + test $myrc -eq 0 || mysql_COUNT_ERRORS+=1 + + test $myrc -eq 0 } # import [file] --> [database]