'There are <n> dependencies' error message shows the wrong count of dependent objects. [CORE1689] #2115
Labels
affect-version: 2.0.0
affect-version: 2.0.1
affect-version: 2.0.2
affect-version: 2.0.3
affect-version: 2.0.4
affect-version: 2.1 Alpha 1
affect-version: 2.1 Beta 1
affect-version: 2.1 Beta 2
affect-version: 2.1 RC1
component: engine
fix-version: 2.5 Alpha 1
priority: minor
qa: done successfully
type: bug
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: