Usage of DTT can cause unexpected bugcheck when code can not be compiled because trivial error (eg missed 'USING....' in CRYPT_HASH() call, see below).
Consider script:
===========
set bail on;
set blob all;
set list on;
shell if exist r:\temp\tmp4test.fdb del r:\temp\tmp4test.fdb 2>nul;
create database 'localhost:r:\temp\tmp4test.fdb' user 'sysdba' password 'masterkey';
set autoterm on;
--set autoddl off; -- no matters
commit;
create or alter procedure sp_test returns(
id016 smallint
) as
declare temporary table tbase(
id016 smallint
);
begin
-- insert into gtt_base(
insert into tbase(
id016
) values(
-32768
) returning
id016
into
id016
;
suspend;
end;
--########################
-- MANDATORY to reproduce bug:
select p.* from sp_test p;
--########################
-- commit; -- [ 1 ] no error if this is UNcommented
execute block returns (execute_block_outcome varbinary(64)) as
declare id016 smallint;
begin
execute_block_outcome =
crypt_hash (
blob_append(
id016
)
-- missed 'USING sha512' here
)
;
suspend;
end;
===========
Its output will be:
=============
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 13, column 9
-)
=============
-- but firebird.log will contain after this:
=============
internal Firebird consistency check (record disappeared (186), file: Savepoint.cpp line: 281)
=============
No error will be if we use GTT instead of DTT.
No error if we UNcomment 'commit' marked as '[ 1 ]'.
Dump, stack trace and FB snapshot + firebird.conf + .log are
here.
(checked on 20260725_010828-6.0.0.2092-92bad46)