MailWatch icon indicating copy to clipboard operation
MailWatch copied to clipboard

Unsafe statement written to the binary log

Open stefaweb opened this issue 7 years ago • 9 comments

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

stefaweb avatar Jun 01 '17 07:06 stefaweb

Closing. No more the problem.

stefaweb avatar Jun 05 '17 12:06 stefaweb

What was the cause / how did you solve this as I remember that I saw the too some time

Skywalker-11 avatar Jun 05 '17 14:06 Skywalker-11

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

stefaweb avatar Apr 17 '20 09:04 stefaweb

Looks like a little refactor of that sql query is needed.

shawniverson avatar Apr 19 '20 05:04 shawniverson

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.

stale[bot] avatar Jun 20 '20 17:06 stale[bot]

Keeping open

shawniverson avatar Jun 21 '20 15:06 shawniverson

this MariaDB doc page gives some advice on server config until we fix the query.

endelwar avatar Jun 22 '20 08:06 endelwar

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.

stale[bot] avatar Aug 22 '20 20:08 stale[bot]

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.

stale[bot] avatar Dec 19 '20 08:12 stale[bot]