Bug Fixes
- Distributed DDL (
ON CLUSTER) formatting reworked (#241, #263, #262) —Http::prepareWrite()no longer appendsFORMAT JSONto the SQL ofON CLUSTERqueries. Instead the response format is requested via thedefault_format=JSONquery setting:CREATE USER / GRANT / ALTER ... ON CLUSTERno longer fail withSYNTAX_ERRORfrom a strayFORMAT JSON(#241)CREATE / ALTER ... ON CLUSTERresults are now parseable JSON again — no moreCan't find metawhen reading the per-host execution status (#263)- a bare
ON CLUSTERsubstring insideINSERTdata (e.g.'REGION CLUSTER') is no longer mistaken for the keyword —\bword boundaries match the real keyword only (#262)
- False-positive error detection on large JSON responses (#261) —
Statement::hasErrorClickhouse()now confirms a tail-regex match withjson_validate()(PHP 8.3+) before flagging an error, so valid JSON whose data legitimately contains ClickHouse exception text is not reported as a failure (@jradtilbrook)
Testing
- New
tests/ClickHouse26/OnClusterTest.php— distributed DDL regression tests (CREATE/ALTER/CREATE USER ... ON CLUSTER); skips gracefully when no Keeper/ZooKeeper backend is configured - Embedded ClickHouse Keeper added to the test environment (
tests/clickhouse-latest-config/keeper.xml, mounted indocker-compose.yamland copied in CI) so the single-nodedefaultcluster can executeON CLUSTERqueries testInsertWithOnClusterInDataadded to both CH 21 and CH 26 client tests (#262)
Merged PRs
- #261 — Fix false positive error detection when JSON data contains ClickHouse exception text (@jradtilbrook)