Firebird and InterBase keep a compiled form of stored procedures and triggers in BLR (tokenized) format.
But I do not really know the structure of BLR.
Is field size the part of the BLR?
Would I get some problems when a stored procedure contains two fields (source and destination), and later I'll change the size of these two fields?
For example they were varchar(50)
long, but now I change them to varchar(100)
with system table updates. What will happen? Would it only copy 50 characters, or all (100)?
Or does BLR contains only object links (tables and fields)?
I will try to demonstrate with "pseudo" code:
begin
for select comp_id, comp_name from companies where ...
into :ci, :cn
do begin
-- somehow we're adding this to another table
insert into new_clients (id, name) values (:ci, :cn);
end
end;
This could be a trigger or stored procedure.
Comp_name
, andnew_clients.name
are initiallyvarchar(50)
.- I add this procedure or trigger. It is working fine for a day.
- Later I realize these fields are too short to fit my data.
- I use a GUI (for example IBExpert) to change these fields to
varchar(150)
. - It's ok, all of them are
varchar(150)
now.
Then what will happen?
- If BLR contains field sizes too, then it doesn't matter I changed the fields' sizes. The trigger copy on 50 characters, cos it has precompiled prior length.
- If BLR uses only relates/links/tokens to the tables and fields, we can change the fields without worrying of copy function.
The question is same: does BLR contains the related fields' sizes or not?