Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.7.0
Description
The change of the default transaction isolation level for MySQL in Stash 2.7 to READ_COMMITTED can prevent Stash from starting, because READ_COMMITTED is not compatible with MySQL's binary logging at the STATEMENT level.
When binary logging is enabled, STATEMENT level is the default level in MySQL 5.1.11 and earlier, MySQL 5.1.29 and later, and MySQL 5.5 (5.1 documentation, 5.5 documentation):
If you are using InnoDB tables and the transaction isolation level is READ COMMITTED or READ UNCOMMITTED, only row-based logging can be used.
The exception generated by Stash on startup is:
Caused by: liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL UPDATE `stash`.`DATABASECHANGELOGLOCK` SET `LOCKED` = 1, `LOCKEDBY` = 'fe80:0:0:0:250:56ff:feaa:7715%14 (fe80:0:0:0:250:56ff:feaa:7715%14)', `LOCKGRANTED` = '2013-09-16 20:33:46.125' WHERE `ID` = 1 AND `LOCKED` = 0: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' at liquibase.lockservice.LockService.acquireLock(LockService.java:121) ~[liquibase-core-2.0.5.jar:na] at liquibase.lockservice.LockService.waitForLock(LockService.java:61) ~[liquibase-core-2.0.5.jar:na] at liquibase.Liquibase.update(Liquibase.java:102) ~[liquibase-core-2.0.5.jar:na] at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:262) ~[liquibase-core-2.0.5.jar:na] at liquibase.database.DefaultingSchemaLiquibase.performUpdate(DefaultingSchemaLiquibase.java:57) ~[stash-dao-impl-2.7.1.jar:na] at liquibase.database.DefaultingSchemaLiquibase.afterPropertiesSet(DefaultingSchemaLiquibase.java:87) ~[stash-dao-impl-2.7.1.jar:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE] ... 85 common frames omitted Caused by: liquibase.exception.DatabaseException: Error executing SQL UPDATE `stash`.`DATABASECHANGELOGLOCK` SET `LOCKED` = 1, `LOCKEDBY` = 'fe80:0:0:0:250:56ff:feaa:7715%14 (fe80:0:0:0:250:56ff:feaa:7715%14)', `LOCKGRANTED` = '2013-09-16 20:33:46.125' WHERE `ID` = 1 AND `LOCKED` = 0: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) ~[liquibase-core-2.0.5.jar:na] at liquibase.executor.jvm.JdbcExecutor.update(JdbcExecutor.java:229) ~[liquibase-core-2.0.5.jar:na] at liquibase.executor.jvm.JdbcExecutor.update(JdbcExecutor.java:206) ~[liquibase-core-2.0.5.jar:na] at liquibase.lockservice.LockService.acquireLock(LockService.java:103) ~[liquibase-core-2.0.5.jar:na] ... 92 common frames omitted Caused by: java.sql.SQLException: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078) ~[mysql-connector-java-5.1.25-bin.jar:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187) ~[mysql-connector-java-5.1.25-bin.jar:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119) ~[mysql-connector-java-5.1.25-bin.jar:na] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570) ~[mysql-connector-java-5.1.25-bin.jar:na] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731) ~[mysql-connector-java-5.1.25-bin.jar:na] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2809) ~[mysql-connector-java-5.1.25-bin.jar:na] at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1811) ~[mysql-connector-java-5.1.25-bin.jar:na] at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1725) ~[mysql-connector-java-5.1.25-bin.jar:na] at com.jolbox.bonecp.StatementHandle.executeUpdate(StatementHandle.java:536) ~[bonecp-0.7.1.RELEASE.jar:0.7.1.RELEASE] at liquibase.executor.jvm.JdbcExecutor$1UpdateStatementCallback.doInStatement(JdbcExecutor.java:221) ~[liquibase-core-2.0.5.jar:na] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) ~[liquibase-core-2.0.5.jar:na] ... 95 common frames omitted
Workaround has been documented here.
Attachments
Issue Links
- is caused by
-
BSERV-3588 Synchronising a directory fails on MySQL
- Closed
- Wiki Page
-
Wiki Page Loading...