Skip to content

Commit

Permalink
Merge pull request outroll#1854 from anthonyrossbach/patch-1
Browse files Browse the repository at this point in the history
Fixes for dumps of large databases
  • Loading branch information
serghey-rodin authored May 14, 2019
2 parents 7726ed8 + 8f2fdfb commit e087a04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions func/db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ mysql_query() {

mysql_dump() {
err="/tmp/e.mysql"
mysqldump --defaults-file=$mycnf --single-transaction -r $1 $2 2> $err
mysqldump --defaults-file=$mycnf --single-transaction --max_allowed_packet=100M -r $1 $2 2> $err
if [ '0' -ne "$?" ]; then
rm -rf $tmpdir
if [ "$notify" != 'no' ]; then
echo -e "Can't dump database $database\n$(cat $err)" |\
$SENDMAIL -s "$subj" $email
fi
echo "Error: dump $database failed"
echo "Error: dump $database failed\n$(cat $err)"
log_event "$E_DB" "$ARGUMENTS"
exit $E_DB
fi
Expand Down

0 comments on commit e087a04

Please sign in to comment.