Skip to content

Document new protocol versions in wireprotocol #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mrotteveel opened this issue Mar 1, 2025 · 5 comments
Open

Document new protocol versions in wireprotocol #216

mrotteveel opened this issue Mar 1, 2025 · 5 comments
Assignees

Comments

@mrotteveel
Copy link
Member

Currently, wireprotocol documents version 10, and some parts of version 11 and 16 (batches).

@mrotteveel mrotteveel self-assigned this Mar 1, 2025
@einar-hjortdal
Copy link

I am stuck at parsing protocol 18 row data. this chapter of the documentation doesn't help 😿

@mrotteveel
Copy link
Member Author

Yes, that section still needs to be written :/

The problem seems to be that you calculate the wrong length for the null bitset, which results in an off-by-4 error in reading the response (depending on the number of columns you're selecting):

Specifically:

if xsqlda.vars.len % 8 == 0 {

should be

if xsqlda.vars.len % 8 != 0 {

Though I would actually recommend to remove that if and instead use

mut n := (i32(xsqlda.vars.len) + 7) / 8

einar-hjortdal added a commit to einar-hjortdal/firebird that referenced this issue Apr 9, 2025
@mrotteveel
Copy link
Member Author

I have published a new version (0.17), but that still doesn't describe reading row data.

(Due to aggressive caching, it might take up to 24 hours to become visible.)

@mrotteveel
Copy link
Member Author

I have published a new version (0.18), which includes information on the row BLR and row data.

@einar-hjortdal Could you give it a read, specifically https://firebirdsql.org/file/documentation/html/en/firebirddocs/wireprotocol/firebird-wire-protocol.html#wireprotocol-row-data. As you're fresh in implementing it, you might more easily spot errors or things that are missing.

@mrotteveel
Copy link
Member Author

Note to self:

  • Remarks on blr_text/blr_text2 and blr_varying/blr_varying2 need to be revisited: details on UTF8/UNICODE_FSS probably don't belong there, and may need their own section. The current remarks for these types are also not fully correct (or, the reality can be more complex if you deviate from the lengths reported by the information request).
  • The remark "This can, for example, be used to let the user use a different datatype, and offload the conversion to the target datatype to the server." in https://firebirdsql.org/file/documentation/html/en/firebirddocs/wireprotocol/firebird-wire-protocol.html#wireprotocol-row-data might be wishful thinking on my part and needs additional verification, or may need to be scrapped or qualified as a guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants