Could not execute JDBC batch update - SQL Error 1598, SQLState HY000

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

This error message appears on the screen:

Your request was unable to be processed
org.hibernate.exception.GenericJDBCException - Could not execute JDBC batch update

This message appears in the logs:

2012-05-16 14:27:30,937 WARN  [btpool0-10 ] org.hibernate.util.JDBCExceptionReporter org.hibernate.util.JDBCExceptionReporter-logExceptions - SQL Error: 1598, SQLState: HY000
2012-05-16 14:27:30,938 ERROR [btpool0-10 ] org.hibernate.util.JDBCExceptionReporter org.hibernate.util.JDBCExceptionReporter-logExceptions - Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
2012-05-16 14:27:30,939 ERROR [btpool0-10 ] org.hibernate.event.def.AbstractFlushingEventListener org.hibernate.event.def.AbstractFlushingEventListener-performExecutions - Could not synchronize database state with session

原因

There is an incompatibility between using InnoDB with transaction isolation level READ-COMMITED and the binlog format STATEMENT because READ-COMMITED only supports row-based binary logging.

Background: 
  • Atlassian products were created  to use a transaction isolation level of READ-COMMITED when utilizing a MySQL database because of a known MySQL bug.
  • Atlassian recommends using InnoDB as the default storage engine instead of MyISAM (which is the MySQL default) because MyISAM doesn't support foreign key constraints (read more about this known issue).
  • MySQL changed the default binlog format for 5.1 to STATEMENT.

ソリューション

Use binlog_format=ROW instead of binlog_format=STATEMENT. In order to change to row-based binary logging set the following in /etc/my.cnf:

binlog_format=row

Users have reported that the following also works:

binlog_format= mixed
最終更新日: 2013 年 2 月 14 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.