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
"BLOB not found" error after creation/altering of the invalid trigger [CORE3305] #3672
Comments
Commented by: @helebor The first exception is correct. You can't assign to NEW.anything in an AFTER trigger. |
Commented by: @dyemanov Error "BLOB not found" here means the missing RDB$DEBUG_INFO blob which has been destroyed after a rollback. But even if the debug info would not be a problem, then the "attempted update of read-only column" error would be thrown once more. So the actual problem is that the new trigger gets loaded into the metadata cache before its body is validated, and it's never released from the cache once it's proven to be invalid. |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovsummary: 'BLOB not found' error in insert statement => "BLOB not found" error after creation/altering of the invalid trigger |
Modified by: @dyemanovVersion: 3.0 Alpha 2 [ 10560 ] Version: 3.0 Alpha 1 [ 10331 ] Version: 2.5.2 Update 1 [ 10521 ] Version: 2.1.5 Update 1 [ 10522 ] Version: 2.5.2 [ 10450 ] Version: 2.1.5 [ 10420 ] |
Modified by: @dyemanovFix Version: 2.5.3 [ 10461 ] |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 1 [ 10332 ] |
Submitted by: Dzirt (dzirt)
Relate to CORE4390
Relate to CORE4678
Is related to QA602
Database in dialect 3, ODS 11.2. In isql execute next command:
C:\>isql localhost:test3 -user SYSDBA -pass masterkey
Database: localhost:test3, User: SYSDBA
SQL> recreate table H( VAL Integer );
SQL> commit;
SQL>
SQL> set TERM ^ ;
SQL>
SQL> create or alter trigger H_AI for H
CON> active after insert position 0
CON> as
CON> begin
CON> NEW.VAL = 1;
CON> end^
Statement failed, SQLSTATE = 42000
attempted update of read-only column
SQL>
SQL> set TERM ; ^
SQL>
SQL> rollback;
SQL>
SQL> insert into H( VAL ) values( 123 );
Statement failed, SQLSTATE = HY000
BLOB not found
SQL>
In this and any other connection established before the execution of the statement 'create or alter trigger ...', can not insert data into a table H.
Commits: 17978f5 bfc9a9c 7b9be79 FirebirdSQL/fbt-repository@921f014 FirebirdSQL/fbt-repository@60e6051 FirebirdSQL/fbt-repository@fab228f
The text was updated successfully, but these errors were encountered: