Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
firebird-issue-importer opened this issue Sep 11, 2012 · 11 comments

Comments

@firebird-issue-importer

Submitted by: @dyemanov

Is related to CORE3399
Is duplicated by CORE3959
Is related to QA522

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.

Commits: 594bae4 f64a328 FirebirdSQL/fbt-repository@323b836

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 11, 2012

Modified by: @dyemanov

Link: This issue is related to CORE3399 [ CORE3399 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 11, 2012

Modified by: @dyemanov

description: 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 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.

=>

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.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 11, 2012

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 11, 2012

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 12, 2012

Modified by: @dyemanov

status: In Progress [ 3 ] => Open [ 1 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 12, 2012

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 2.5.3 [ 10461 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 12, 2012

Commented by: @pavel-zotov

> 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;

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 24, 2012

Modified by: @dyemanov

Link: This issue is duplicated by CORE3959 [ CORE3959 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 29, 2014

Modified by: @pcisar

Link: This issue is related to QA522 [ QA522 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 12, 2015

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 12, 2015

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment