Skip to content

fix(plugins): ask ClickHouse which settings and catalog it has - #3445

Merged
datlechin merged 1 commit into
mainfrom
fix/clickhouse-capability-versions
Oct 16, 2026
Merged

datlechin merged 1 commit into
mainfrom
fix/clickhouse-capability-versions

Conversation

@datlechin

Copy link
Copy Markdown
Member

Why

On ClickHouse 23.8.0 to 23.8.8 every query after connect failed with UNKNOWN_SETTING: the driver sent http_write_exception_in_output_format from major.minor >= 23.8, and the setting reached the 23.8 line in 23.8.9. Other gates in that version table were wrong too.

Change

  • At connect the driver reads system.settings and a one-row catalog check. It sends a URL setting only when this user may change it, and reads a catalog column only when it exists. This fixes ClickHouse driver: every query fails on a 23.8.x server older than 23.8.9 — UNKNOWN_SETTING (code 115) for http_write_exception_in_output_format #3444 and lets readonly = 1 users connect.
  • Indexes, view definitions, functions, comments and sizes load on servers before 22.3.
  • A query that fails partway is reported as an error instead of rows on every version. A FORMAT clause shows one Output value in the grid and stops an export with a message.
  • Metadata reads use the database they are asked about, and SHOW CREATE FUNCTION is gone.
  • SQL Server: CREATE OR ALTER on 2016 SP1 and Azure SQL.

Verified

ClickHouseConnectProfileTests and ClickHouseStreamFailureTests drive the driver through a stub. A harness on these sources passed on live 23.8.8.20, 25.8.33.6 and 26.3.52.9; main fails there with code 115. ClickHouseServerProfileTests replaces ClickHouseCapabilitiesTests, which pinned the 23.8 gate.

Not in this PR

  • The MSSQL fix reaches users with a registry release of the MSSQL plugin.
  • system.parts is denied to users without system grants on 25.8's shipped config, so table sizes fail for them.
  • Rows keep a trailing \r when a profile sets output_format_tsv_crlf_end_of_line.

Fixes #3444

@datlechin
datlechin merged commit f4db16b into main Oct 16, 2026
7 checks passed
@datlechin
datlechin deleted the fix/clickhouse-capability-versions branch October 16, 2026 11:47
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.

ClickHouse driver: every query fails on a 23.8.x server older than 23.8.9 — UNKNOWN_SETTING (code 115) for http_write_exception_in_output_format

1 participant