Bug #3031
FOR EACH can access shared transient records in case of broken transaction isolation
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
Related issues
History
#1 Updated by Ovidiu Maxiniuc over 10 years ago
In P4gl, if transaction isolation is broken, FOR EACH can access shared transient records that have fully matched their indexes.
I have added the uast/shared-dirty-records/leaking* procedures and data definition file to testcases repository. They are quite well documented and also contain the expected result from running them on 4GL.
leaking1.pcreates two records that will never be committed:- one (with
id = 'NEW-ID') that doesn't break the isolation by not matching the index; - and one (with
seq = 3) that gets shared among contexts.
- one (with
- the second procedure
leaking2.psearched for both records and iterates all accessible records from table. We can notice that if the first procedure is not finished:- the
NEW-IDrecord is isolated and I.e. not visible; - the
seq = 3record is visible in both directFINDstatement but also inFOR EACHlooping query.
- the
At this moment, P2J can see the second record by direct FIND -ing it, but will fail to retrieve the record in the FOR EACH loop. This is because the FOR EACH loop does not check the dirty database at all when creating the list of records to be processed.