Skip to content

fix(pure_rust): restore Firebird 2.5 support broken by #177 - #182

Open
maratth wants to merge 1 commit into
fernandobatels:masterfrom
maratth:fix-fb-25
Open

fix(pure_rust): restore Firebird 2.5 support broken by #177#182
maratth wants to merge 1 commit into
fernandobatels:masterfrom
maratth:fix-fb-25

Conversation

@maratth

@maratth maratth commented Aug 14, 2026

Copy link
Copy Markdown

Since #177 (c5ab7c3), attach fails on Firebird 2.5 with:

Invalid clumplet buffer structure: buffer end before end of clumplet - clumplet too long

The DPB builder selected the wide clumplet format (isc_dpb_version2, 4-byte
lengths) whenever every parameter was shorter than 255 bytes — the condition
was inverted, and that format only exists since Firebird 3.0. Firebird 2.5 reads
the DPB with single-byte lengths, so its parser desynchronised immediately. The
other branch was broken too: it emitted version 1 with a length truncated to
u8.

Fixed by selecting the wide format only when a parameter actually exceeds 255
bytes. Every value the driver sends is well under that, so both 2.5 and 3+ now
receive a version 1 DPB, as before #177.

Tested against Firebird 2.5 with the pure_rust backend.

…ytes

Firebird 2.5 server reads the DPB with single-byte lengths only
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.

1 participant