当前位置:Gxlcms > 数据库问题 > 降低mysql事务隔离级别

降低mysql事务隔离级别

时间:2021-07-01 10:21:17 帮助过:1人阅读

; try { conn = DBUtils.getConnection(); conn.setAutoCommit(false); conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
        ............

  然而,报错了

java.sql.SQLException: 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.

  于是看了下BINLOG_FORMAT : 

  技术分享

  于是:

  技术分享

  技术分享

  这样就可以了,或者据说换MIXED模式也可以,不过没测试。

降低mysql事务隔离级别

标签:

人气教程排行