Details
Assignee
UnassignedUnassignedReporter
David RogersDavid RogersPriority
NewLabels
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
Details
Details
Assignee
Unassigned
UnassignedReporter
David Rogers
David RogersPriority
Labels
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
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.
transaction { transaction action="setSavepoint" savepoint="foo"; queryExecute("select 1") transaction action="rollback" savepoint="foo"; }
The above throws
"There are no savepoint with name [foo] set"
. But, the following runs without any apparent issue:transaction { queryExecute("select 1") transaction action="setSavepoint" savepoint="foo"; queryExecute("select 1") transaction action="rollback" savepoint="foo"; }
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 thesavepoint(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.