Search code examples
hsqldbrollback

Why did HSQLDB 2.5.x drop support for `ROLLBACK ON DEADLOCK`?


I use HSQLDB 2.4 with a database setup script that contains

SET DATABASE TRANSACTION ROLLBACK ON DEADLOCK TRUE

After I updated to 2.5, this now fails with:

error in script file line: X org.hsqldb.HsqlException:
unexpected token: DEADLOCK required: CONFLICT

The release notes do not contain a single word about it.

Was the removal of this syntax without a migration period an intentional decision, or a bug – and why isn't it documented anywhere?


Solution

  • In 2012, CONFLICT became the default token and was persisted in the database .script files. This token has been used in the Guide since that year.

    The older token DEADLOCK was still accepted for a number of years as a synonym. It was finally removed in 2019. So there was a seven year migration period.