You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my database there is one table I am UPDATing (works fine),
and another table that has trigger referencing first table.
By mistake I run ALTER TRIGGER which referenced non existing exception,
which raised (as excpected) error:
Statement failed, SQLCODE = -104
invalid request BLR at offset 34
-exception ... not defined
However, since this moment I am not able to update the first table,
attempt to prepare the UPDATE will raise error
Statement failed, SQLCODE = -901
BLOB not found
Note 1 - there are no blobs in either of tables
Note 2 - the problem disappears after closing all connections (i.e. no permanent damage to the database)
Note 3 - tried with latest snapshots (FB2.5, FB3)
Note 4 - I was not able to create simple test script, however I will send database for testing (fresh/empty one)
I have a feeling that the problematic blob is either RDB$TRIGGER_BLR or even more likely RDB$DEBUG_INFO. That said, surely a BLR parsing exception should not affect existing attachments, so it smells like a bug. I need a test database to validate the issue deeper, please send it to me directly or make it available for download. I will report back once I have it confirmed and debugged.
Now I can confirm the problem. The origin of the issue is that somehow the new trigger definition (the invalid one, referencing non-existent exception) gets loaded into the metadata cache. When it's implicitly referenced by UPDATE, it gets compiled but fails when trying to read its debug info (blob was lost after rollback / backout so its blob id is no longer valid). The blob error is easy to fix but the issue persists, now the same error "exception ... not defined" is raised for UPDATE -- because the trigger is still invalid. The only solution is to disconnect (just current session for CS/SC or everybody for SS) and reconnect back.
I will post an update once the underlying caching issue is found and fixed.
summary: "BLOB not found" error caused by "exception not defined" exception => Creation/altering of trigger with invalid BLR leaves its definition in the metadata cache
As both tickets (CORE3305 and CORE4390) reference the same issue consisting of two independent bugs, I'm renaming CORE3305 to describe the "invalid BLOB ID" bug while CORE4390 will describe the metadata cache bug.
Submitted by: prenosil (prenosil)
Is related to CORE3305
In my database there is one table I am UPDATing (works fine),
and another table that has trigger referencing first table.
By mistake I run ALTER TRIGGER which referenced non existing exception,
which raised (as excpected) error:
Statement failed, SQLCODE = -104
invalid request BLR at offset 34
-exception ... not defined
However, since this moment I am not able to update the first table,
attempt to prepare the UPDATE will raise error
Statement failed, SQLCODE = -901
BLOB not found
Note 1 - there are no blobs in either of tables
Note 2 - the problem disappears after closing all connections (i.e. no permanent damage to the database)
Note 3 - tried with latest snapshots (FB2.5, FB3)
Note 4 - I was not able to create simple test script, however I will send database for testing (fresh/empty one)
Commits: 7b9be79 FirebirdSQL/fbt-repository@fab228f
The text was updated successfully, but these errors were encountered: