Skip to content

Cherry pick #105579 to 26.4: Fix nullptr deref in CREATE TABLE TO INNER UUID without ENGINE - #106556

Merged
robot-clickhouse merged 3 commits into
backport/26.4/105579from
cherrypick/26.4/105579
Jun 5, 2026
Merged

robot-clickhouse merged 3 commits into
backport/26.4/105579from
cherrypick/26.4/105579

Conversation

@robot-clickhouse

Copy link
Copy Markdown
Member

Original pull-request #105579

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

groeneai and others added 3 commits June 1, 2026 12:32
`ParserCreateTableQuery::parseImpl` raises `BAD_ARGUMENTS` when a
`TO INNER UUID` clause is paired with a non `SharedSet` / `SharedJoin`
engine, but the throw's format argument unconditionally dereferenced
`storage->engine->name`. The same condition that triggered the throw
also covers the case where `storage` or `storage->engine` is null
(for example, `CREATE TABLE t TO INNER UUID '...' (cols) ORDER BY id`
without any `ENGINE` clause), so evaluating the format args crashed
the client with signal 11.

Capture the engine name into a local with an explicit fallback
before raising the exception, and fix the message grammar
("does not support inner UUID").

Adds a stateless regression test covering both the null engine
case and the wrong engine case.
…able-to-inner-uuid-crash

Fix nullptr deref in CREATE TABLE TO INNER UUID without ENGINE
@robot-clickhouse robot-clickhouse added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Jun 5, 2026
@robot-clickhouse
robot-clickhouse merged commit 955d74b into backport/26.4/105579 Jun 5, 2026
@robot-clickhouse
robot-clickhouse deleted the cherrypick/26.4/105579 branch June 5, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants