Summary
The four transaction-marker database info items — isc_info_oldest_transaction (104), isc_info_oldest_active (105), isc_info_oldest_snapshot (106) and isc_info_next_transaction (107) — cannot be read through IAttachment.GetDBInformation at all: every accessor on the returned item raises EIBClientError: Invalid Request for Output Block Type.
Cause
TDBInformation.DoParseBuffer (client/FBOutputBlock.pas) has no case for tags 104–107, so they fall through to the catch-all AddSpecialItem branch. The clumplet is sized correctly (the overridden AddSpecialItem reads the 2-byte length), but the item is typed dtSpecial — and dtSpecial has no working accessor: getAsInteger, GetAsBytes, etc. all raise ibxeOutputBlockTypeError. The values are therefore unreachable even though the server sent them.
Reproduction
Against Firebird 6.0 (LI-T6.0.0.2076, Linux aarch64, fpc 3.2.2):
Info := Attachment.GetDBInformation([isc_info_oldest_transaction,
isc_info_oldest_active, isc_info_oldest_snapshot, isc_info_next_transaction]);
Info.GetItem(0).getAsInteger; // raises 'Invalid Request for Output Block Type'
Info.GetItem(0).GetAsBytes; // same exception
Found while writing the on-disk-structure companion sample for a Firebird architecture paper (https://github.com/mariuz/conceptual-architecture-for-firebird-paper, samples/fpc/ods_header.pas) — it wanted to show the TIP markers three ways (MON$DATABASE, GetDBInformation, raw page 0) and the middle way turned out to be impossible.
Fix
Add the four tags to the AddIntegerItem case — as variable-length integers (dtInteger), not dtIntegerFixed, since these markers are 4 bytes today but may be 8 bytes with 48-bit transaction ids, and dtInteger decodes with the clumplet-declared length. PR follows: with the fix, getAsInteger returns e.g. OIT=921, OAT=922, OST=922, Next=922 where every call raised before.
Summary
The four transaction-marker database info items —
isc_info_oldest_transaction(104),isc_info_oldest_active(105),isc_info_oldest_snapshot(106) andisc_info_next_transaction(107) — cannot be read throughIAttachment.GetDBInformationat all: every accessor on the returned item raisesEIBClientError: Invalid Request for Output Block Type.Cause
TDBInformation.DoParseBuffer(client/FBOutputBlock.pas) has no case for tags 104–107, so they fall through to the catch-allAddSpecialItembranch. The clumplet is sized correctly (the overriddenAddSpecialItemreads the 2-byte length), but the item is typeddtSpecial— anddtSpecialhas no working accessor:getAsInteger,GetAsBytes, etc. all raiseibxeOutputBlockTypeError. The values are therefore unreachable even though the server sent them.Reproduction
Against Firebird 6.0 (LI-T6.0.0.2076, Linux aarch64, fpc 3.2.2):
Found while writing the on-disk-structure companion sample for a Firebird architecture paper (https://github.com/mariuz/conceptual-architecture-for-firebird-paper,
samples/fpc/ods_header.pas) — it wanted to show the TIP markers three ways (MON$DATABASE, GetDBInformation, raw page 0) and the middle way turned out to be impossible.Fix
Add the four tags to the
AddIntegerItemcase — as variable-length integers (dtInteger), notdtIntegerFixed, since these markers are 4 bytes today but may be 8 bytes with 48-bit transaction ids, anddtIntegerdecodes with the clumplet-declared length. PR follows: with the fix,getAsIntegerreturns e.g. OIT=921, OAT=922, OST=922, Next=922 where every call raised before.