History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CORE-282
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Claudio Valderrama C.
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

DOMAINs don't register their dependency on other objects

Created: 22/May/05 12:00 AM   Updated: 03/Dec/08 07:30 AM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 2.1 RC1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Depend
 
This issue block progress on:
QA-218 Test for CORE-282 Major Closed
CORE-770 More information about dependencies i... Major Resolved

SF_ID: 1206386
Resolution Date: 12/Jan/08


 Description  « Hide
SFID: 1206386#
Submitted By: robocop

Even if a domain has checks that depend on other
objects, such dependency is not tracked. Contrived example:

SQL> create database 'depend.fdb';
SQL> create table t(a int);
SQL> create domain d int check(value > (select max(a)
from t));
SQL> drop table t;

No error message, the table is dropped. The domain
becomes unusable:

SQL> create table u(a d);
Statement failed, SQLCODE = -104
invalid request BLR at offset 16
-table id 128 is not defined

Generally, the posibility of having subselects in many
parts introduces dependencies that never have been
acknowledged.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order:
Claudio Valderrama C. - [12/Jan/08 11:52 PM ]
The problem has been fixed by Adriano's changes to enhance domain-related operations. This is the result of the same script:

F:\fb2dev\fbbuild\firebird2\temp\debug\firebird\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'depend.fdb';
SQL> create table t(a int);
SQL> create domain d int check(value > (select max(a) from t));
SQL> commit;
SQL> drop table t;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-cannot delete
-COLUMN A
-there are 1 dependencies
SQL> create table u(a d);
SQL> ^Z

Since the report is from May-2005 only today I remembered to recheck it.

Philippe Makowski - [03/Dec/08 07:30 AM ]
Q/A test ok