Skip to content

Decode the transaction-marker DB info items (tags 104-107) as integers#6

Open
mariuz wants to merge 1 commit into
MWASoftware:mainfrom
mariuz:fix-dbinfo-tx-markers
Open

Decode the transaction-marker DB info items (tags 104-107) as integers#6
mariuz wants to merge 1 commit into
MWASoftware:mainfrom
mariuz:fix-dbinfo-tx-markers

Conversation

@mariuz

@mariuz mariuz commented Jul 21, 2026

Copy link
Copy Markdown

Fixes #4.

isc_info_oldest_transaction / isc_info_oldest_active / isc_info_oldest_snapshot / isc_info_next_transaction (tags 104–107) had no case in TDBInformation.DoParseBuffer, so they landed in the catch-all AddSpecialItem branch as dtSpecial items — a type with no working accessor, making the values unreachable through GetDBInformation (getAsInteger and even GetAsBytes raise Invalid Request for Output Block Type).

This adds the four tags as variable-length integer items (AddIntegerItem(P, dtInteger)), which decodes with the clumplet-declared length — the markers are 4-byte values today but can be 8 bytes with 48-bit transaction ids, and dtInteger handles both, unlike dtIntegerFixed.

Verification (Firebird 6.0, LI-T6.0.0.2076, Linux aarch64, fpc 3.2.2): GetDBInformation([104,105,106,107, isc_info_page_size]) now yields OIT=921, OAT=922, OST=922, Next=922, page_size=8192 via getAsInteger, where every accessor raised before; the page-size item confirms neighbouring items still parse identically.

🤖 Generated with Claude Code

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GetDBInformation cannot decode the transaction markers (info tags 104-107): every accessor raises 'Invalid Request for Output Block Type'

1 participant