Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging

 

 1665 - Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. 
InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

 

 

 

surroundings

tomcat 6.x

jdk 1.6

mysql5.5

 

abnormal

An exception is thrown when executing a query jdbc:

Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

 

Causes and Solutions

This is required by MySQL:

Statement based binlogging does not work in isolation level
READ UNCOMMITTED and READ COMMITTED since the necessary
locks cannot be taken.

According to tomcat throw an exception, suggesting that the transaction level when the read committed and read uncommitted must be set to the binlog row format.

This is a limitation set java, java default transaction level is read committed, and binlog_format mysql default settings = statement.

The binlog_format set mixed

set global binlog_format=mixed;

Over time, the abnormal is still!

Set row

set global binlog_format=row;

problem solved!

or:

mysql> SET SESSION binlog_format = 'ROW';

mysql> SET GLOBAL binlog_format = 'ROW';

Note: If the manual modification /etc/my.cnf linux following: binlog_format = row, need to restart mysql.

 

 https://www.iteye.com/blog/javawangbaofeng-2243306

 

Guess you like

Origin www.cnblogs.com/softidea/p/11429225.html