Highlights
- Context deadlines no longer override
max_execution_time(#2101): Context deadlines now only limit how long the client waits instead of settingmax_execution_timetodeadline + 5s. Explicitmax_execution_timevalues from connection/DSN/query settings or server profiles are preserved. Over HTTP, queries can continue running on the server after the context expires unlessmax_execution_timeorcancel_http_readonly_queries_on_client_closeis configured. - Deprecate
WithAsyncandWithStdAsynchelpers (#2096):WithAsync,WithStdAsync, andAsyncInsertare deprecated in favor ofWithSettingswithasync_insertandwait_for_async_insert. - Reject unsupported legacy
JSONshared data andDynamicSharedVariant(#2004): Queries decoding legacy NativeJSONoverflow/shared data orDynamicSharedVariantnow return an error instead of corrupting stream alignment or returning binary bytes as strings. Setoutput_format_native_use_flattened_dynamic_and_json_serialization=1on ClickHouse 25.6+ to read these values. - Prevent
ReadTimeoutfailures on slow consumers (#2063): Native queries now reset the read deadline after each data block is handed to the consumer, so time spent blocked in a slowrows.Next()loop no longer triggersi/o timeout. - Propagate mid-stream errors in
Batch.AppendfromRows(#2017):appendRowsBlocksnow returnsrows.Err(), invalidates the batch, and retires the connection on mid-stream source failures instead of silently succeeding. - Fix
ConnOpenRandomfailover and migrate tomath/rand/v2(#1810):ConnOpenRandomnow picks a single random starting offset and walks all hosts once in round-robin order instead of re-rolling per attempt. - HTTP read-only user compression & handshake fixes (#2121, #2125): Avoids sending compression settings for
readonly = 1users, preserves caller-configured compression settings, and keeps first-query options off the HTTP server-info handshake (serverTimezone()). - Bind typed nil
driver.ValuerasNULL& preserve heredocs (#2029): Prevents panics on typed nildriver.Valuerpointers and skips parameter substitution inside$$...$$/$tag$...$tag$heredoc literals.
What's Changed
Enhancements
- Migrate math/rand to math/rand/v2 by @antonio-mello-ai in #1810
Fixes
- Do not hold pool mutex while waiting for drain goroutine by @kavirajk in #2095
- fix: retire connections after query protocol errors by @sankalpsthakur in #2027
- fix: do not set compression settings over HTTP for read-only users by @xmasdev in #2121
- fix: don't count time blocked on a slow consumer against ReadTimeout by @ninadsutrave in #2063
- fix: do not derive max_execution_time from the context deadline by @tushar-signoz in #2101
- fix: decode control character escapes in Enum names by @xmasdev in #2120
- fix: bind complete named parameters containing dollar signs by @sankalpsthakur in #2030
- fix: preserve heredoc literals and bind typed nil Valuers as NULL by @sankalpsthakur in #2029
- fix: preserve LowCardinality float dictionary values by @sankalpsthakur in #2010
- fix(column): parse Tuple element names that contain a space by @spicysharkco in #2074
- fix: keep per-query options off the HTTP server-info query by @pcbeingused33 in #2125
- fix: return error from appendRowsBlocks on mid-stream failure by @cyrilou242 in #2017
- fix(json): reject unsupported legacy JSON shared data and Dynamic SharedVariant by @BetterAndBetterII in #2004
Dependencies
- chore(deps): bump github.com/testcontainers/testcontainers-go from 0.44.0 to 0.45.0 by @dependabot[bot] in #2108
- chore(deps): bump github.com/andybalholm/brotli from 1.2.7 to 1.2.8 by @dependabot[bot] in #2107
- chore(deps): bump github.com/andybalholm/brotli from 1.2.8 to 1.3.0 by @dependabot[bot] in #2117
- chore(deps): bump github.com/moby/moby/api from 1.56.1 to 1.57.0 by @dependabot[bot] in #2133
- chore(deps): bump github.com/moby/moby/client from 0.6.2 to 0.6.3 by @dependabot[bot] in #2132
- chore(deps): bump github.com/ClickHouse/ch-go from 0.75.0 to 0.76.0 by @dependabot[bot] in #2147
- chore(deps): bump golang.org/x/net from 0.62.0 to 0.63.0 by @dependabot[bot] in #2159
Other Changes
- chore: refresh CI ClickHouse server version matrix by @polyglotAI-bot in #2106
- chore: promote polyglotAI bot as peer co-codeowner by @kavirajk in #2109
- doc: fix typos in docs and examples by @xnervwang in #2111
- Add .github/ai-gate.yml for the AI review gate by @Flipmonster in #2113
- chore: deprecate
withasynchelpers by @kavirajk in #2096 - Add @ClickHouse/language-clients to CODEOWNERS by @polyglotAI-bot in #2134
- chore: remove PR link checker. by @kavirajk in #2143
- docs(agents): add the issue-priority skill for the Priority issue field by @polyglotAI-bot in #2142
- docs(agents): an unpublished dependency vulnerability stays private by @polyglotAI-bot in #2145
- docs(agents): state each classification and priority rule in one place by @polyglotAI-bot in #2146
- chore: improve pr linter CI runner by @kavirajk in #2158
- test: run ClickHouse core SQL tests through clickhouse-go by @ccoltx in #2141
- ci: run the upstream SQL tests on a pull request with the tests:run-core-sql label by @polyglotAI-bot in #2162
- docs(agents): add the native classes to the issue classification by @polyglotAI-bot in #2169
- Remove the cross-repo bug relay by @ccoltx in #2174
- chore: add slack notifications on head/cloud failures by @kavirajk in #2171
- chore: fix interserver secrets tests behind version gate by @kavirajk in #2191
- chore: skip low cardinality test on cloud by @kavirajk in #2192
New Contributors
- @xnervwang made their first contribution in #2111
- @Flipmonster made their first contribution in #2113
- @xmasdev made their first contribution in #2121
- @ninadsutrave made their first contribution in #2063
- @tushar-signoz made their first contribution in #2101
- @antonio-mello-ai made their first contribution in #1810
- @spicysharkco made their first contribution in #2074
- @pcbeingused33 made their first contribution in #2125
- @cyrilou242 made their first contribution in #2017
- @BetterAndBetterII made their first contribution in #2004
Full Changelog: v2.51.0...v2.52.0