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(177) for MERGE with multiple matches [CORE4369] #4691

Closed
firebird-issue-importer opened this issue Mar 21, 2014 · 9 comments
Closed

Comments

@firebird-issue-importer

Submitted by: Alex Bekhtin (afgm)

CREATE TABLE T1 (
ID INTEGER,
VAL INTEGER
);

CREATE TABLE T2 (
ID INTEGER,
VAL INTEGER
);

execute block as
begin
delete from t1;
delete from t2;
insert into t1 (id, val)
select row_number() over(), 10000000 from rdb$types rows 100;
insert into t2
select * from t1;
end

commit;

merge into t2 as trg
using (select * from t1) as src
on 1=1 --trg.id = http://src.id
when matched then update set trg.val = src.val

-----------------------
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements.
internal Firebird consistency check (applied differences will not fit in record (177), file: sqz.cpp line: 147).

Commits: 8744b80 FirebirdSQL/fbt-repository@63488cd

====== Test Details ======

Confirmed result in WI-T3.0.0.31374 Beta-1: message in firebird.log
"internal Firebird consistency check (applied differences will not fit in record (177), file: sqz.cpp line: 147)"

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 14, 2014

Modified by: @asfernandes

description: CREATE TABLE T1 (
ID INTEGER,
VAL INTEGER
);

CREATE TABLE T2 (
ID INTEGER,
VAL INTEGER
);

execute block as
begin
delete from t1;
delete from t2;
insert into t1 (id, val)
select row_number() over(), 10000000 from rdb$types rows 100;
insert into t2
select * from t1;
end

merge into t2 as trg
using (select * from t1) as src
on 1=1 --trg.id = http://src.id
when matched then update set trg.val = src.val

-----------------------
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements.
internal Firebird consistency check (applied differences will not fit in record (177), file: sqz.cpp line: 147).

=>

CREATE TABLE T1 (
ID INTEGER,
VAL INTEGER
);

CREATE TABLE T2 (
ID INTEGER,
VAL INTEGER
);

execute block as
begin
delete from t1;
delete from t2;
insert into t1 (id, val)
select row_number() over(), 10000000 from rdb$types rows 100;
insert into t2
select * from t1;
end

commit;

merge into t2 as trg
using (select * from t1) as src
on 1=1 --trg.id = http://src.id
when matched then update set trg.val = src.val

-----------------------
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements.
internal Firebird consistency check (applied differences will not fit in record (177), file: sqz.cpp line: 147).

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 15, 2014

Commented by: @aafemt

I've found that minimal number of rows (updates) when the bug appear is 5. At this moment record unexpectedly gets rpb_delta flag.

Something must be broken in record retrival mechanic because instead of normal (as if changes were performed by single updates) sequence update->update_in_place->update_in_place->update_in_place MERGE produces sequence update->update->update_in_place->update->update_in_place.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Nov 9, 2014

Modified by: @dyemanov

Regression: 3.0 Alpha 2 [ 10560 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jan 22, 2015

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 2, 2015

Modified by: @dyemanov

assignee: Vlad Khorsun [ hvlad ] => Dmitry Yemanov [ dimitr ]

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 2, 2015

Modified by: @dyemanov

summary: consistency check in MERGE with more data => BUGCHECK for MERGE with multiple matches

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 2, 2015

Modified by: @dyemanov

summary: BUGCHECK for MERGE with multiple matches => BUGCHECK(177) for MERGE with multiple matches

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 3, 2015

Modified by: @pavel-zotov

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

QA Status: Done successfully

Test Details: Confirmed result in WI-T3.0.0.31374 Beta-1: message in firebird.log
"internal Firebird consistency check (applied differences will not fit in record (177), file: sqz.cpp line: 147)"

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 3, 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
Projects
None yet
Development

No branches or pull requests

2 participants