Skip to content

Nested transaction support via savepoints is broken in HSQLDB database #35564

@shddx

Description

@shddx

Description:

This appears to be related to PR #32992 (“Do not swallow exceptions on failing to release a savepoint”).

A very similar problem was already reported for Oracle in #33987.
However, a little biit different with HSQLDB: in JDBCConnection.rollback(Savepoint) it explicitly clears the JDBCSavepoint object (sets name = null, connection = null).

As a result, when Spring calls releaseSavepoint(..) immediately after rollbackToSavepoint(..) inside AbstractTransactionStatus.rollbackToHeldSavepoint(..), HSQLDB throws:.

org.hsqldb.HsqlException: Invalid argument in JDBC call: 3B001 savepoint exception: invalid specification

This worked prior to #32992 because the exception from releaseSavepoint(..) was swallowed.
Now the exception propagates and breaks all usages of PROPAGATION_NESTED with HSQLDB.

As far as I know there is no good way to handle this in application

Environment:
• Spring Framework: 6.2.9
• Spring Boot: 3.5.4
• HSQLDB: 2.7.4

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions