Issue Details (XML | Word | Printable)

Key: CORE-3293
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: arni
Votes: 0
Watchers: 2
Operations

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

Error at grants restore for renamed column

Created: 27/Dec/10 10:08 PM   Updated: 27/Dec/10 10:39 PM
Component/s: Engine, GBAK
Affects Version/s: 2.5.0
Fix Version/s: None


 Description  « Hide
CREATE TABLE TABLE1(
  FIELD1 INTEGER,
  FIELD2 INTEGER
);

SET TERM ^ ;
CREATE TRIGGER TABLE1_BIU FOR TABLE1
ACTIVE BEFORE INSERT OR UPDATE POSITION 0
AS
begin
  new.FIELD1 = 0;
end
^
SET TERM ; ^

GRANT UPDATE (FIELD1, FIELD2) ON TABLE1 TO TRIGGER TABLE1_BIU;

ALTER TABLE TABLE1 ALTER COLUMN FIELD2 TO FIELD3;


Then try b/r and get exception: "Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
action cancelled by trigger (1) to preserve data integrity.
could not find column for GRANT"

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 27/Dec/10 10:39 PM
The bug is that RDB$USER_PRIVILEGES still contains row for FIELD2 after last statement (renaming FIELD2 into FIELD3).
At restore time this row can't be inserted back to the RDB$USER_PRIVILEGES.