MailWatch
MailWatch copied to clipboard
Unsafe statement written to the binary log
Issue summary
Found this in /var/log/syslog.
Jun 1 09:08:10 antispam-dev mysqld[26125]: 2017-06-01 9:08:10 140583501175552 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave. Statement: DELETE FROM `user_filters` WHERE `username` NOT IN (SELECT `username` FROM `users`)
Installation
Version and method
- MailWatch Version: 1.2.4 develop (develop server)
Server configuration
- Operation System: Debian Jessie
- PHP version: 5.6
- Database: MariaDB version 10.1.24
- Mail Server: Exim 4.84.2
- Used web server: Apache version 2.4.10
Closing. No more the problem.
What was the cause / how did you solve this as I remember that I saw the too some time
The message is back !!
Issue summary
Found this in /var/log/syslog.
Apr 17 10:45:15 antispam mysqld[901]: 2020-04-17 10:45:15 140614973441792 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave. Statement: DELETE FROM `user_filters` WHERE `username` NOT IN (SELECT `username` FROM `users`)
Installation
Version and method
- MailWatch Version: 1.2.15
Server configuration
- Operation System: Debian stretch
- PHP version: 7.0.33
- Database: MariaDB version 10.1.44
- Mail Server: Posstfix 3.1.14
- Used web server: Apache version 2.4.25-3
Looks like a little refactor of that sql query is needed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Keeping open
this MariaDB doc page gives some advice on server config until we fix the query.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.