Decode the transaction-marker DB info items (tags 104-107) as integers#6
Open
mariuz wants to merge 1 commit into
Open
Decode the transaction-marker DB info items (tags 104-107) as integers#6mariuz wants to merge 1 commit into
mariuz wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4.
isc_info_oldest_transaction/isc_info_oldest_active/isc_info_oldest_snapshot/isc_info_next_transaction(tags 104–107) had no case inTDBInformation.DoParseBuffer, so they landed in the catch-allAddSpecialItembranch asdtSpecialitems — a type with no working accessor, making the values unreachable throughGetDBInformation(getAsIntegerand evenGetAsBytesraiseInvalid 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, anddtIntegerhandles both, unlikedtIntegerFixed.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 yieldsOIT=921, OAT=922, OST=922, Next=922, page_size=8192viagetAsInteger, where every accessor raised before; the page-size item confirms neighbouring items still parse identically.🤖 Generated with Claude Code