I developing a tests using two transactions in the same attachments and found this bug.
Below is log of my test :
DDL: CREATE GLOBAL TEMPORARY TABLE T2 (ID INT) ON COMMIT PRESERVE ROWS
DDL: CREATE UNIQUE INDEX T2_UQ ON T2 (ID)
tx1: SET TRANSACTION READ COMMITTED NO VERSION NO WAIT
Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, column 35
tx1: INSERT INTO T2 VALUES (1)
invalid transaction handle (expecting explicit transaction start)
tx2: SET TRANSACTION SNAPSHOT NO WAIT
tx2: INSERT INTO T2 VALUES (1)
tx2: INSERT INTO T2 VALUES (2)
tx1: SELECT COUNT(*) FROM T2
internal Firebird consistency check (invalid block type encountered (147), file: exe.cpp line: 1015)
It was expected to got "invalid transaction handle" error there, not a bugcheck.
Note, i wrongly used "NO VERSION" instead of "NO RECORD_VERSION" therefore start of tx1 failed.