Skip to content

Refuse CREATE TEMPORARY VIEW with readonly = 1 - #132016

Merged
PedroTadim merged 4 commits into
ClickHouse:masterfrom
lazerg:fix/issue-132004-readonly-temporary-view
Nov 17, 2026
Merged

PedroTadim merged 4 commits into
ClickHouse:masterfrom
lazerg:fix/issue-132004-readonly-temporary-view

Conversation

@lazerg

@lazerg lazerg commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Closes: #132004

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):

CREATE TEMPORARY VIEW is now refused with readonly = 1, the same as CREATE TEMPORARY TABLE.

Description

With readonly = 1 only CREATE_TEMPORARY_TABLE was in not_readonly_1_flags, so CREATE TEMPORARY VIEW (which asks for CREATE_TEMPORARY_VIEW) went through. I added CREATE_TEMPORARY_VIEW to the same flags. readonly = 2 still allows both. The new test fails on master.


Workflow [PR]
Sync PR [sync-upstream/pr/132016]

Version info

  • Merged into: 26.11.1.2556-master (included in 26.11 and later)

@clickhouse-gh clickhouse-gh Bot added the comp-rbac Authorization: roles, grants, quotas, row-level security, access checks. label Nov 16, 2026
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Nov 16, 2026
@alexey-milovidov alexey-milovidov self-assigned this Nov 16, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e2ae1ab]

Summary: ❌

job_name test_name status info comment
Build profile diff ERROR

AI Review

Summary

PR #132016 makes CREATE TEMPORARY VIEW obey readonly = 1, matching CREATE TEMPORARY TABLE, while preserving creation under readonly = 2. Reviewed commit e2ae1ab92eeee400e681c0497a88b9ea5706f365; no actionable findings. The focused regression test passes in Fast test.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-bugfix Pull request with bugfix, not backported by default external Author is not a member of the ClickHouse organization labels Nov 16, 2026
alexey-milovidov and others added 2 commits November 17, 2026 04:00
After `SET readonly = 1`, the test runner cannot send its `log_comment` setting,
so every following query failed with `READONLY` regardless of the fix: the two
negative checks passed trivially and the final `SELECT` failed in Fast test.
Pass `--readonly` on the client command line instead and match the specific
`Cannot execute query in readonly mode` message.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=132016&sha=latest&name_0=PR&name_1=Fast%20test
ClickHouse#132016

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Fast test failed in the new test: after SET readonly = 1 the test runner cannot send its log_comment setting, so every following query failed with READONLY (the two negative checks passed trivially and the final SELECT failed). I rewrote it as 05815_readonly_temporary_view.sh, passing --readonly on the client command line and matching the specific Cannot execute query in readonly mode message, and merged master. Verified locally: the test passes with the fix.

@PedroTadim PedroTadim self-assigned this Nov 17, 2026
@PedroTadim
PedroTadim added this pull request to the merge queue Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-rbac Authorization: roles, grants, quotas, row-level security, access checks. external Author is not a member of the ClickHouse organization 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.

CREATE TEMPORARY VIEW is allowed with readonly = 1 while CREATE TEMPORARY TABLE is refused

4 participants