Skip to content

Commit

Permalink
[#1950] Adds support for TRANSACTION_CURSOR_STABILITY and TRANSACTION…
Browse files Browse the repository at this point in the history
…_LAST_COMMITTED (#1952)

TRANSACTION_LAST_COMMITTED - This allows a readonly user to access a row and read the last commited data while Informix has an open lock against the data.
Unlike TRANSACTION_READ_UNCOMMITTED which would also accomplish the same but would end up allowing dirty reads. This would lead to us reading data that's potentially either rolledback or never actually commited.

TRANSACTION_CURSOR_STABILITY - Cursor stability will place a lock on a row as it's fetched which ensures that the data doesn't change while the program reads the data.
Documentation for cursor stability can be found here https://www.ibm.com/docs/en/informix-servers/12.10?topic=level-informix-cursor-stability-isolation

Documentation on Informix transaction isolation levels are here https://www.ibm.com/docs/en/informix-servers/12.10?topic=database-informix-environment-variables-informix-jdbc-driver

Co-authored-by: Liam Sorsby <liam.sorsby@skybettingandgaming.com>
  • Loading branch information
liamsorsby and Liam Sorsby committed Sep 15, 2023
1 parent 43d5231 commit d15560e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/zaxxer/hikari/util/IsolationLevel.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ public enum IsolationLevel
TRANSACTION_NONE(0),
TRANSACTION_READ_UNCOMMITTED(1),
TRANSACTION_READ_COMMITTED(2),
TRANSACTION_CURSOR_STABILITY(3),
TRANSACTION_REPEATABLE_READ(4),
TRANSACTION_LAST_COMMITTED(5),
TRANSACTION_SERIALIZABLE(8),
TRANSACTION_SQL_SERVER_SNAPSHOT_ISOLATION_LEVEL(4096);

Expand Down

0 comments on commit d15560e

Please sign in to comment.