From 9e8747ede40b2c717481eb70d3669837d892bb50 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 12 Jan 2022 21:11:51 -0800 Subject: [PATCH] Add extra check for wrong packet size https://forum.virtualmin.com/t/virtualmin-backup-truncates-part-of-mysql-dump-without-generating-error/113551/9 --- mysql/mysql-lib.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/mysql-lib.pl b/mysql/mysql-lib.pl index 10b9f9d5f..e2e5a4700 100755 --- a/mysql/mysql-lib.pl +++ b/mysql/mysql-lib.pl @@ -1493,7 +1493,7 @@ if (&shell_is_bash()) { $cmd = "set -o pipefail ; $cmd"; } local $out = &backquote_logged("($cmd) 2>&1"); -if ($? || !-s $file) { +if ($? || !-s $file || $out =~ /Aborted\s+connection|max_allowed_packet/i) { return $out; } return undef;