Jump to content

MySQL complayning about prestashop database commands not beeing safe


alvesjc

Recommended Posts

Hi.

 

I've my syslog filled of messages like this:

Apr 25 17:44:59 server mysqld: 170425 18:44:59 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. Statement: UPDATE psdh_category
Apr 25 17:44:59 server mysqld: #011#011SET nleft = 107, nright = 108
Apr 25 17:44:59 server mysqld: #011#011WHERE id_category = 25 LIMIT 1

Is there a way to avoid this?

 

Thank you.

 

Regards

Link to comment
Share on other sites

Hi Bellini,

 

Thank you for coming to rescue.

 

I've no ideia about the statement behind, is there any log file with the commands beeing sent to database within prestashop?

 

Meanwhile, I've dropped the message from appearing by adding to mysql my.cnf file the statement:

binlog_format = MIXED

After this command it's not appearing anymore in the syslog file, but I'm not sure if this fix the issue or is just masking any problem.

 

I'm using prestashop 1.6.1.11

 

Any ideias?

Link to comment
Share on other sites

You can read more about what the binary log is and what it does here

https://dev.mysql.com/doc/refman/5.7/en/binary-log.html

 

If you are not replicating your server to a slave, then this is not necessary

If you are not attempting to use the binary log for recovery operations, then this is not necessary

 

If you determine the binary log is not necessary, then you should consider disabling it and save that performance overhead

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...