Skip to content
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

Error at grants restore for renamed column [CORE3293] #3661

Open
firebird-automations opened this issue Dec 28, 2010 · 1 comment
Open

Error at grants restore for renamed column [CORE3293] #3661

firebird-automations opened this issue Dec 28, 2010 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: arni (arni)

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"

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant