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

Problem with dependencies with views [CORE2923] #3306

Closed
firebird-issue-importer opened this issue Mar 15, 2010 · 14 comments
Closed

Problem with dependencies with views [CORE2923] #3306

firebird-issue-importer opened this issue Mar 15, 2010 · 14 comments

Comments

@firebird-issue-importer

Submitted by: @dyemanov

Is related to QA435

Test case:

recreate procedure p_deps returns (i int) as begin suspend; end
commit;

recreate view v_deps as select i from p_deps
commit;

alter procedure p_deps returns (i int) as begin suspend; end
commit;

unsuccessful metadata update.
cannot delete.
DOMAIN RDB$73.
there are 1 dependencies.

System generated domain is shared between the procedure output parameter and the view column, but ALTER PROCEDURE tries to recreate that domain.

Commits: 47bcd0d f2dcf72 7b1c7db FirebirdSQL/fbt-repository@cb09ff9

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 15, 2010

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 15, 2010

Commented by: @asfernandes

Also, DROP VIEW v_deps drops the shared domain.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 19, 2010

Commented by: @asfernandes

This is 2.1:

SQL> create table t (n integer);
SQL> create view v as select * from t;
SQL> alter table t alter n type integer;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-Column N from table T is referenced in V

Above commands seem to work in 2.1, but below ones doesn't, and the cause is the same:

SQL> create table t (n integer);
SQL> create domain d integer;
SQL> create view v as select * from t;
SQL> alter table t alter n type d;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-cannot delete
-DOMAIN RDB$3
-there are 1 dependencies

It may be possible (but not trivial) to fix what you reported in 2.5, but same thing using domains in parameters (as this last example) requires some redesign on how view fields works.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 19, 2010

Commented by: @dyemanov

I'm afraid we have to fix it somehow, at least the originally reported issue. We offer a new feature (procedures inside views) but a requirement that prohibits any alteration of such procedures makes this feature very problematic to use.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 21, 2010

Commented by: @asfernandes

I've did basic change to make the test case work in 2.5. In HEAD, the solution applied works with domains too.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 21, 2010

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC3 [ 10381 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 24, 2011

Modified by: @pcisar

Link: This issue is related to QA435 [ QA435 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 15, 2011

Modified by: @pmakowski

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

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 26, 2015

Modified by: @pmakowski

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

resolution: Fixed [ 1 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Nov 9, 2015

Modified by: @dyemanov

Fix Version: 3.0.0 [ 10048 ]

Fix Version: 3.0 Alpha 1 [ 10331 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 11, 2016

Modified by: @asfernandes

summary: Problem with dependencies between a procedure and a view using that procedure => Problem with dependencies with views

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 11, 2016

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 12, 2016

Modified by: @pavel-zotov

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

QA Status: Done successfully

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