Adaptive Server Anywhere 9.0
ODBI=2 (READ_COMMITTED)LockTimeout=2 (X_DBMENV.DAT)
WITH_KEY IO access
Step
|
Action (User)
|
IO$STS
|
Message
|
1
|
Insert (1)
|
OK
|
IO Operation Succeeded
|
2
|
Insert (2)
|
VE
|
Record already exists
|
3
|
Delete (2)
|
ER
|
Record Locked
|
4
|
Commit (1)
|
|
|
5
|
Update (1)
|
OK
|
IO Operation Succeeded
|
6
|
Update (2)
|
ER
|
Record Locked
|
7
|
Fetch (1)
|
ER
|
Record Locked
|
8
|
Fetch (2)
|
ER
|
Record Locked
|
9
|
Commit (1)
|
|
|
10
|
Delete (1)
|
OK
|
IO Operation Succeeded
|
11
|
Insert (2)
|
ER
|
Record Locked
|
12
|
Update (2), Delete (2)
|
NR
|
Record not found
|
13
|
Commit (1)
|
|
|
|
Note that ASA is behaving as if it is seeing the uncommitted actions of the other user, even though the Transaction Isolation Level is set to READ_COMMITTED.
Last Record Read IO access
This is a different set of steps as there must be a record to read before the last record read can be updated or deleted! Hence when an error occurs, the record must be fetched again like in Step 13.
Step
|
Action (User)
|
IO$STS
|
Message
|
1
|
Insert (1)
|
OK
|
IO Operation Succeeded
|
2
|
Insert (2)
|
VE
|
Record already exists
|
3
|
Commit (1)
|
|
|
4
|
Fetch (1), Fetch (2)
|
OK
|
IO Operation Succeeded
|
5
|
Update (1)
|
OK
|
IO Operation Succeeded
|
6
|
Update (2)
|
ER
|
Record Locked
|
7
|
Fetch (1)
|
ER
|
Record Locked
|
8
|
Fetch (2)
|
ER
|
Record Locked
|
9
|
Commit (1)
|
|
|
10
|
Fetch (1), Fetch (2)
|
OK
|
IO Operation Succeeded
|
11
|
Delete (1)
|
OK
|
IO Operation Succeeded
|
12
|
Insert (2)
|
ER
|
Record Locked
|
13
|
Fetch (2) Update (2), Fetch (2) Delete (2)
|
NR
|
Record not found
|
14
|
Commit (1)
|
|
|
|
Note in Step 13 that the Update and Delete cannot proceed because the record is not found.