Comment 11 for bug 1065841

Revision history for this message
Tim Gokcen (hexetic) wrote : Re: Replication breaks with "You cannot 'ALTER' a log table if logging is enabled" on upgrade, even when logging to files

The issue seems to be that the debian startscript for MariaDB server runs mysql_upgrade *without* specifying --skip-write-binlog. As a result, although the slow-query log and the general log are disabled by mysql_system_tables_fix.sql, these SET statements are not replicated to the slave, so, when the slave tries to run the ALTER TABLE slow_query or ALTER TABLE general_log, it runs up against the log still being enabled.

The correct solution seems to be to modify debian/addtiions/debian-start, changing:
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
to
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --skip-write-binlog"