FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.26k stars 216 forks source link

Firebird 4.0 procedure does not see data inserted in autonomous transaction in READ_COMMITED main transaction #6902

Closed andrewkip closed 3 years ago

andrewkip commented 3 years ago

Hello!

FB LI-V4.0.0.2496 transactions isc_tpb_read_committed isc_tpb_rec_version isc_tpb_nowait ( isc_tpb_norec_version the same result)

proc inserts in autonomus transaction records into TEMPORARY (PRESERVE ROWS) and regular table.

then selects this records for suspend and does not see them.

below example test_tr_fb4.zip run proc TEST_PROC.

By the way in the MON$TRANSACTIONS MON$ISOLATION_MODE =4 for isc_tpb_read_committed isc_tpb_rec_version isc_tpb_nowait

but in lang ref there is 3 max:

Isolation mode (level):

0 - consistency (snapshot table stability) 1 - concurrency (snapshot) 2 - read committed record version 3 - read committed no record version

mrotteveel commented 3 years ago

Have you tried this with ReadConsistency = 0 in firebird.conf? Otherwise it will always use the new read consistency mode of read committed.

mrotteveel commented 3 years ago

I'll add the new transaction isolation mode value 4 to the Firebird 4 Language Reference: https://github.com/FirebirdSQL/firebird-documentation/issues/156

andrewkip commented 3 years ago

ReadConsistency = 0 solved the problem

Thanks