MDEV-11610: Alter Debian log rotate to not rotate binary/relay logs

Rotating binary/relay logs can cause interuption to the processing
on the server. Binary and relay logs have their own mechanism already
for not getting out of control (expire_logs_days).

By no longer rotating binary and relay logs log rotation is limited to
the following logs:
* error log
* general log
* slow query log

Writing these to the binary log would cause any logrotation on the
slave to occur twice, once due to this and another due to the log-
rotate script on the slave. Now --local is passed to mysqladmin to
prevent this duplication.
This commit is contained in:
Daniel Black 2017-02-28 21:47:44 +11:00 committed by Sergey Vojtovich
parent 0af8b565f2
commit 156cf86def

View file

@ -14,7 +14,8 @@
if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
# If this fails, check debian.conf!
mysqladmin --defaults-file=/etc/mysql/debian.cnf flush-logs
mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
flush-engine-log flush-general-log flush-slow-log
fi
endscript
}