Skip to content

Query::fetch_one() and Query::fetch_optional() can still finish successfully even in the case of schema mismatch #187

@slvrtrn

Description

@slvrtrn

From the #186 (comment):

Query::fetch_one() and Query::fetch_optional() can still finish successfully even in the case of schema mismatch, because they don't read the whole response. This is a trade-off made ages ago to avoid parsing unused bytes.

Should we also revise that behavior? By the way, if the server returns a lot of rows (or large ones), it's possible to get EPIPE errors on the server side (because not all bytes are delivered).

We have several options here:

  • Parse all rows (better to detect the schema mismatch) and discard all besides the first one.
  • Don't parse them, but read the whole stream (to avoid EPIPE on the CH side).
  • Wait for Native/RowBinaryWithNAT for reliable error-detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions