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

'There are <n> dependencies' error message shows the wrong count of dependent objects. [CORE1689] #2115

Closed
firebird-issue-importer opened this issue Jan 13, 2008 · 11 comments

Comments

@firebird-issue-importer

Submitted by: Claudio Valderrama C. (robocop)

Assigned to: Claudio Valderrama C. (robocop)

Is related to QA334

Dependency tracking for UDFs is working. You can't drop an UDF until the last object that depends on it has been dropped. However, the message is incorrect. Full example follows:

SQL> create database 'depends4.fdb';
SQL> set term ^;
SQL> declare external function getExactTimestamp
CON> timestamp
CON> returns parameter 1
CON> entry_point 'getExactTimestamp' module_name 'fbudf'^
SQL> create table t(a int)^
SQL> create trigger tad for t after delete as declare dummy timestamp; begin dummy = getexacttimestamp(); end^
SQL> create view vudf(t) as select getexacttimestamp() from rdb$database^
SQL> create table tudf(a int, c computed by(getexacttimestamp()))^
SQL> create domain dud int check(value between extract(week from getexacttimestamp()) and 25)^
SQL> drop external function getexacttimestamp^
Statement failed, SQLCODE = -607
unsuccessful metadata update
-cannot delete
-UDF GETEXACTTIMESTAMP
-there are 1 dependencies

But the engine really tracked everything, as shown here:
SQL> show depend getexacttimestamp^
TAD:Trigger, RDB$2:Computed column, RDB$4:Computed column, DUD:Validation
[GETEXACTTIMESTAMP:User defined function]
+++

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 14, 2008

Commented by: Claudio Valderrama C. (robocop)

The problem is not with UDFs.
The problem is the current logic that shows the first partial count that it can find (corresponding to all objects of only one type that depend on the object the user was trying to drop).
Although the example made the problem visible with UDFs, the misleading result is produced for all kind of objects.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 14, 2008

Modified by: Claudio Valderrama C. (robocop)

summary: There are 1 dependencies is shown always when dropping UDF even if many objects depend on it. => 'There are <n> dependencies' error message shows the wrong count of dependent objects.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 14, 2008

Modified by: Claudio Valderrama C. (robocop)

assignee: Claudio Valderrama C. [ robocop ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2008

Modified by: @pcisar

Workflow: jira [ 13817 ] => Firebird [ 14045 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 6, 2008

Modified by: Claudio Valderrama C. (robocop)

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 Initial [ 10260 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 6, 2008

Modified by: Claudio Valderrama C. (robocop)

Fix Version: 2.5 Alpha 1 [ 10224 ]

Fix Version: 2.5 Initial [ 10260 ] =>

@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 QA334 [ QA334 ]

@firebird-issue-importer
Copy link
Author

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

Commented by: @pcisar

QA test added.

@firebird-issue-importer
Copy link
Author

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

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

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

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

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

Modified by: @pavel-zotov

QA Status: No test => Done successfully

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