From 07d4d3705b08ee3b65932ebaca64ef99c5f45243 Mon Sep 17 00:00:00 2001 From: Popa Adrian Marius Date: Tue, 21 Jul 2026 12:52:15 +0000 Subject: [PATCH] Decode the transaction-marker DB info items (tags 104-107) isc_info_oldest_transaction, isc_info_oldest_active, isc_info_oldest_snapshot and isc_info_next_transaction fell through to TDBInformation.DoParseBuffer's catch-all AddSpecialItem branch, which types the item as dtSpecial - so every accessor (getAsInteger, GetAsBytes, ...) raised 'Invalid Request for Output Block Type' and the values were unreachable through GetDBInformation, even though the clumplet length was parsed correctly. They are now added as variable-length integer items (dtInteger), which decodes with the clumplet-declared length - these markers are 4 bytes today but may be 8 bytes with 48-bit transaction ids, and dtInteger handles both. Verified against Firebird 6.0: GetDBInformation([104,105,106,107]) now returns e.g. OIT=921, OAT=922, OST=922, Next=922 via getAsInteger where every call raised before. --- client/FBOutputBlock.pas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/FBOutputBlock.pas b/client/FBOutputBlock.pas index a3e4edf..ca020ac 100644 --- a/client/FBOutputBlock.pas +++ b/client/FBOutputBlock.pas @@ -1064,6 +1064,14 @@ procedure TDBInformation.DoParseBuffer; fb_info_conn_flags: FItems[index] := AddIntegerItem(P); + {transaction markers can be 4 or 8 bytes (48-bit transaction ids), + so they are added as variable length integers} + isc_info_oldest_transaction, + isc_info_oldest_active, + isc_info_oldest_snapshot, + isc_info_next_transaction: + FItems[index] := AddIntegerItem(P,dtInteger); + isc_info_implementation, isc_info_base_level: FItems[index] := AddBytesItem(P);