Fixes for dumps of large databases

This commit is contained in:
Anthony Rossbach 2019-04-08 21:47:22 -07:00 committed by GitHub
parent 576a0003da
commit 8f2fdfb8d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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