Fix `clickhouse-format --backslash` silently dropping INSERT VALUES data by Avogar · Pull Request #105536 · ClickHouse/ClickHouse · GitHub
Skip to content

Fix clickhouse-format --backslash silently dropping INSERT VALUES data#105536

Merged
Avogar merged 3 commits into
masterfrom
fix-clickhouse-format-backslash-insert-values
Jun 8, 2026
Merged

Fix clickhouse-format --backslash silently dropping INSERT VALUES data#105536
Avogar merged 3 commits into
masterfrom
fix-clickhouse-format-backslash-insert-values

Conversation

@Avogar

@Avogar Avogar commented May 21, 2026

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix clickhouse-format --backslash silently dropping INSERT VALUES data. Closes #103533

Version info

  • Merged into: 26.6.1.505

The backslash branch in Format.cpp formatted the INSERT AST (which has
its format field cleared) but omitted the `insert_query_payload` data.
The non-backslash branch correctly appended the payload, but this was
not replicated in the backslash branch.

Also fix multiquery semicolon handling in the backslash branch for
INSERT VALUES queries — when the payload is present, the semicolon is
already included in the data, so we must not add another one.

Closes #103533

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@clickhouse-gh

clickhouse-gh Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label May 21, 2026
@antonio2368 antonio2368 self-assigned this May 28, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

The failures of 00175_obfuscator_schema_inference and 00096_obfuscator_save_load in Stateless tests (amd_tsan, parallel) are NOT caused by this PR.

They were introduced by #104690 ("Add UntrackedMemory asynchronous metric"), which made clickhouse-obfuscator abort (SIGABRT) on process teardown: the query results are correct, but the Aborted line on stderr fails the test. #104690 has now been reverted (#106365).

#104690 was merged in violation of the ClickHouse team rules: its own CI already showed these two tests failing (10 times between May 12 and June 1) before it was merged.

Please update your branch to pick up the revert; the tests should pass again.

@clickhouse-gh

clickhouse-gh Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.40% 84.40% +0.00%
Functions 92.40% 92.40% +0.00%
Branches 77.00% 77.00% +0.00%

Changed lines: Changed C/C++ lines covered by tests: 13/14 (92.86%) | Lost baseline coverage: none · Uncovered code

Full report · Diff report

@Avogar Avogar added this pull request to the merge queue Jun 8, 2026
Merged via the queue into master with commit 8ee2ff6 Jun 8, 2026
164 of 167 checks passed
@Avogar Avogar deleted the fix-clickhouse-format-backslash-insert-values branch June 8, 2026 13:44
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--backslash mode silently drops INSERT VALUES data in clickhouse-format

4 participants