JDBC Statement leaks after exceptions other than SQLException during insert/update/...

Description

See

Essentially, it seems we release batched statements after a certain type of exception happens during an insert/update/etc., but for some strange reason we only do that for SQLException, and sometimes JDBC exception. See for example this:

As a result, any other exception (such as StaleStateException) will lead to batched statements not being released: that’s a leak, and while Agroal for example will catch that and release the statement, it will also log pesky warnings. It would be better to release statements correctly ourselves.

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created February 17, 2022 at 1:37 PM
Updated March 9, 2022 at 3:20 AM
Resolved February 18, 2022 at 8:39 PM