Issues

Select view

Select search mode

 
19 of 19

transaction savepoint with no preceding queryExecute silently does nothing until failing at rollback

Description

It is useful to to have a transaction that starts off with a savepoint, e.g. in a transaction which is expected to be called nested within another, and for which failure should not rollback the outer transaction.

The above throws "There are no savepoint with name [foo] set". But, the following runs without any apparent issue:

It seems the queryExecute call initializes DataSourceManagerImpl#transConnsReg into a non-empty state and this has the side effect of not early-returning-without-doing-work from the savepoint(String savePointName) call, which registers save points. It would be nice if this “priming the pump” weren’t necessary, but if this isn’t a bug, users might appreciate a more actionable message, to the effect of "There are no savepoints with name [foo] set. See bug report <this-bug-report-url>; consider using the `queryExecute("select 1")` workaround.

Environment

None

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 15 February 2023 at 20:52
Updated 16 February 2023 at 10:10

Activity

Show:

Pothys - MitrahSoft16 February 2023 at 10:10

Related mailing list:

Zac Spitzer16 February 2023 at 00:22
Edited

I added a test case for both behaviours

Flag notifications