-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Comments
Commented by: Claudio Valderrama C. (robocop) The problem is not with UDFs. |
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. |
Modified by: Claudio Valderrama C. (robocop)assignee: Claudio Valderrama C. [ robocop ] |
Modified by: @pcisarWorkflow: jira [ 13817 ] => Firebird [ 14045 ] |
Modified by: Claudio Valderrama C. (robocop)status: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 Initial [ 10260 ] |
Modified by: Claudio Valderrama C. (robocop)Fix Version: 2.5 Alpha 1 [ 10224 ] Fix Version: 2.5 Initial [ 10260 ] => |
Commented by: @pcisar QA test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovQA Status: No test => Done successfully |
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]
+++
The text was updated successfully, but these errors were encountered: