Support setting MySQL System Variable '--max-allowed-packet' at host configuration.
This commit is contained in:
		| @@ -154,6 +154,10 @@ if [ -z "$mysqldump" ]; then | ||||
|    mysqldump="/usr/local/mysql/bin/mysqldump" | ||||
| fi | ||||
|  | ||||
| if [[ -z "${mysql_max_allowed_packet}" ]] ; then | ||||
|    mysql_max_allowed_packet="512M" | ||||
| fi | ||||
|  | ||||
| # | ||||
| # ------------------ Ende Variable ------------------ # | ||||
| # --------------------------------------------------- # | ||||
| @@ -1167,7 +1171,7 @@ if $ARCHIVE ;then | ||||
|       b_timestamp=`$date +"%s"` | ||||
|  | ||||
|       ## - Like --opt but without --extended-insert. So  | ||||
|       mysqldump_flags="--protocol=SOCKET --max_allowed_packet=512M --skip-opt --add-drop-table --add-locks --create-options --quick --compress --set-charset --disable-keys --lock-tables --routines" | ||||
|       mysqldump_flags="--protocol=SOCKET --max-allowed-packet=${mysql_max_allowed_packet} --skip-opt --add-drop-table --add-locks --create-options --quick --compress --set-charset --disable-keys --lock-tables --routines" | ||||
|  | ||||
|       if [ "$i" = "information_schema" -o "$i" = "performance_schema" ];then | ||||
|          mysqldump_flags="$mysqldump_flags --single-transaction" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user