Could not execute JDBC batch update - SQL Error 1598, SQLState HY000
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
This error message appears on the screen:
1
2
Your request was unable to be processed
org.hibernate.exception.GenericJDBCException - Could not execute JDBC batch update
This message appears in the logs:
1
2
3
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
Cause
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
.
Resolution
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
:
1
binlog_format=row
Users have reported that the following also works:
1
binlog_format= mixed
Was this helpful?