Issue Details (XML | Word | Printable)

Key: CORE-3924
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Dmitry Yemanov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Bugcheck 291 (cannot find record back version) if GTT is modified concurrently using at least one read-committed read-only transaction

Created: 11/Sep/12 11:53 AM   Updated: 12/Jul/15 09:46 AM
Component/s: Engine
Affects Version/s: 3.0 Initial, 2.5.1, 2.5.2
Fix Version/s: 3.0 Alpha 1, 2.5.3

Issue Links:
Duplicate
 
Relate
 

QA Status: Done successfully


 Description  « Hide
It cannot be reproduced in ISQL as it requires two transactions per connection. Obviously, only connection-level GTTs (ON COMMIT PRESERVE ROWS) are affected.

create global temporary table t (col int) on commit preserve rows;
insert into t (col) values (0);
commit;

-- txn1 (read committed, read only):
update t set col = 1;
-- no commit here

- txn2 (snapshot):
delete from t;
-- BUGCHECK 291: cannot find record back version

An update conflict error is expected instead.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Zotov added a comment - 12/Sep/12 10:26 AM
> It cannot be reproduced in ISQL as it requires two transactions per connection.
> Obviously, only connection-level GTTs (ON COMMIT PRESERVE ROWS) are affected.

Dmitry, it can be reproduced in ISQL very easy.
The floowing script demonstrates different results (including that of this ticket) of two transactions in one connect:

set echo on;
recreate global temporary table gt(f01 int) on commit preserve rows;
commit;
insert into gt values(1);
commit;
set transaction read only read committed record_version; -- cannot find record back version (291)
--set transaction read only snapshot no wait; -- update conflicts with concurrent update
--set transaction read only snapshot wait; -- update conflicts with concurrent update
--set transaction read only read committed no record_version; -- deadlock
--set transaction read only read committed; -- deadlock
--set transaction read only read committed wait; -- deadlock
--set transaction read only read committed no wait; -- deadlock
delete from gt;
set term ^;
execute block as begin in autonomous transaction do update gt set f01=-1; end^
set term ;^
commit;