Issue Details (XML | Word | Printable)

Key: CORE-3485
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Fábio Augusto Franzo
Votes: 0
Watchers: 0
Operations

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

Deleting records in the table rdb$dependencies

Created: 19/May/11 01:55 PM   Updated: 23/May/11 08:36 PM
Component/s: GBAK
Affects Version/s: 2.1.3, 2.1.4
Fix Version/s: None

Environment: Windows Seven


 Description  « Hide
There is a table that has a calculated field and it also has a trigger or a depending link with another table, and when you proceed a backup/restore, the registry of the calculated field is removed by the rdb$depencies table.

Data of the rdb$dependencies base's table before making a backup/restore
RDB$DEPENDENT_NAME RDB$DEPENDED_ON_NAME RDB$FIELD_NAME RDB$DEPENDENT_TYPE RDB$DEPENDED_ON_TYPE
RDB$10 CITY DESCRIPTION 3 0
CHECK_3 PERSON ID_CITY 2 0
CHECK_3 CITY ID 2 0
CHECK_3 PERSON 2 0
RDB$16 STREET DESCRIPTION 3 0

Data of the rdb$dependencies base's table after making a backup/restore (new base)
RDB$DEPENDENT_NAME RDB$DEPENDED_ON_NAME RDB$FIELD_NAME RDB$DEPENDENT_TYPE RDB$DEPENDED_ON_TYPE
CHECK_3 PERSON ID_CITY 2 0
CHECK_3 CITY ID 2 0
CHECK_3 PERSON 2 0

The registries "RDB$10 e RDB$16" of the system's "rdb$depencies" table refering to the calculated field of the tables "city" and "street" were removed after the execution of the backup/restore.
OBS.: This bug doens't happen in the version 2.5

Metadata

SET NAMES ISO8859_1;

SET CLIENTLIB 'C:\Program Files (x86)\Firebird\Firebird_2_1\bin\fbclient.dll';

CREATE DATABASE 'LOCALHOST/3050:c:\teste.fdb'
USER 'SYSDBA' PASSWORD 'masterkey'
PAGE_SIZE 8192
DEFAULT CHARACTER SET ISO8859_1;

CREATE TABLE CITY (
    ID INTEGER NOT NULL,
    DESCRIPTION VARCHAR(50),
    DESCRIPTION_UPPER COMPUTED BY (UPPER(DESCRIPTION))
);

CREATE TABLE PERSON (
    ID INTEGER NOT NULL,
    NAME VARCHAR(50),
    ID_CITY INTEGER
);

CREATE TABLE STREET (
    ID INTEGER NOT NULL,
    DESCRIPTION VARCHAR(50),
    DESCRIPTION_UPPER COMPUTED BY (UPPER(DESCRIPTION))
);

ALTER TABLE CITY ADD PRIMARY KEY (ID);
ALTER TABLE PERSON ADD PRIMARY KEY (ID);
ALTER TABLE STREET ADD PRIMARY KEY (ID);

ALTER TABLE PERSON ADD CONSTRAINT FK_PERSON_CITY FOREIGN KEY (ID_CITY) REFERENCES CITY (ID) ON UPDATE CASCADE;

SET TERM ^ ;

CREATE TRIGGER STREET_BI0 FOR STREET
ACTIVE BEFORE INSERT POSITION 0
AS
begin
  /* Trigger text */
end
^
SET TERM ; ^

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.