ALLBASE/SQL Reference Manual (36216-90216)

540 Chapter12
SQL Statements S - Z
SET SESSION
TRANSACTION, the whole transaction is aborted as a result of a timeout or deadlock.
When ON TIMEOUT ROLLBACK or DEADLOCK ROLLBACK is set to QUERY, only
the SQL statement which has timed out will be rolled back. This means rolling back
results of statements that modify the database and closing cursor for the cursor-related
statements. (Cursor-related statements change the cursor position, and are not
statements like UPDATE or DELETE WHERE CURRENT.)
In general, if a transaction with KEEP cursor(s) is committed, the new transaction
started on behalf of the user inherits the most recent transaction attributes of the old
transaction. The KEEP cursor(s) are an exception; they inherit the isolation level
attribute of the old transaction at the time the cursor(s) were opened. Note, however,
that session isolation level is
not
used for keep cursor transactions. Session isolation
level does not take effect until KEEP cursors are closed, the transaction is committed,
and the next transaction is begun. For example:
.
.
.
BEGIN WORK RC
.
.
.
OPEN C1 KEEP CURSOR
.
.
.
SET TRANSACTION ISOLATION LEVEL CS
.
.
.
OPEN C2 KEEP CURSOR
.
.
.
SET TRANSACTION ISOLATION LEVEL RU
.
.
.
SET SESSION ISOLATION LEVEL CS
.
.
.
COMMIT WORK
.
.
.
OPEN C3
Session isolation level does not take effect.
.
.
.
CLOSE C1
CLOSE C2
CLOSE C3
.
.
.