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

Circular dependencies between computed fields crashs the engine [CORE1894] #2325

Closed
firebird-issue-importer opened this issue May 11, 2008 · 17 comments

Comments

@firebird-issue-importer

Submitted by: @asfernandes

Is related to QA345
Is duplicated by CORE4254

Votes: 3

Ability to alter computed fields introduced the possibility of circular dependencies between them.

create table t (
n integer,
n1 computed by (n),
n2 computed by (n1)
);

alter table t alter n1 computed by (n2);

select * from t;
-- segmentation fault (due to stack overflow in CMP/pass1)

Commits: 2197803 6a00b3a 6a5e1cc 12d3f61 FirebirdSQL/fbt-repository@658c77c FirebirdSQL/fbt-repository@5574673

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 11, 2008

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 13, 2008

Commented by: @asfernandes

This bug also affects V2.0.4 and V2.1.0 with below test case:

create database 't.fdb';

set autoddl off;

create table t (n integer, c1 computed by (1), c2 computed by (c1));

alter table t drop c1;
alter table t add c1 computed by (c2);

commit;

select * from t;

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 13, 2008

Modified by: @asfernandes

Version: 2.0.4 [ 10211 ]

Version: 2.1.0 [ 10041 ]

Version: 2.0.3 [ 10200 ]

Version: 2.0.2 [ 10130 ]

Version: 2.0.1 [ 10090 ]

Version: 2.0.0 [ 10091 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 8, 2008

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 23, 2011

Modified by: @pcisar

Link: This issue is related to QA345 [ QA345 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 21, 2011

Commented by: @pcisar

This issue is fixed only partially. While second test case (drop + add field with circular reference) is fixed, the originally reported case (alter field to create circular reference) still crash the server (2.5.0.26074).

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 21, 2011

Modified by: @pcisar

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

resolution: Fixed [ 1 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 21, 2011

Modified by: @pcisar

Version: 2.5.0 [ 10221 ]

Fix Version: 2.5.1 [ 10333 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 21, 2011

Commented by: @pmakowski

I confirm Pavel's statement, the original reported case still crash the server (2.5.1.26308)

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 15, 2011

Modified by: @dyemanov

Fix Version: 2.5.1 [ 10333 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 28, 2013

Modified by: @asfernandes

Link: This issue is duplicated by CORE4254 [ CORE4254 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 12, 2014

Modified by: @dyemanov

Fix Version: 2.5 Beta 1 [ 10251 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 31, 2015

Commented by: @pmakowski

This is still not fixed in 3.0 branch, and still crash the server.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 18, 2016

Modified by: @pavel-zotov

status: Reopened [ 4 ] => Reopened [ 4 ]

QA Status: Deferred

Test Details: NOTE: 3.0.2 and 4.0 still CRASHES when execute following script:

recreate table t (
n integer,
n1 computed by (n),
n2 computed by (n1)
);

recreate table t2 (
n integer,
c1 computed by (1),
c2 computed by (c1)
);

alter table t alter n1 computed by (n2);

set autoddl off;
alter table t2 drop c1;
alter table t2 add c1 computed by (c2);
commit;

select * from t;
select * from t2;

Please fix it if it is possible.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 19, 2016

Modified by: @asfernandes

Version: 3.0.1 [ 10730 ]

Version: 3.0.0 [ 10740 ]

Version: 4.0 Initial [ 10621 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 19, 2016

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

Fix Version: 3.0.2 [ 10785 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 19, 2016

Modified by: @pavel-zotov

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

QA Status: Deferred => Done successfully

Test Details: NOTE: 3.0.2 and 4.0 still CRASHES when execute following script:

recreate table t (
n integer,
n1 computed by (n),
n2 computed by (n1)
);

recreate table t2 (
n integer,
c1 computed by (1),
c2 computed by (c1)
);

alter table t alter n1 computed by (n2);

set autoddl off;
alter table t2 drop c1;
alter table t2 add c1 computed by (c2);
commit;

select * from t;
select * from t2;

Please fix it if it is possible.

=>

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