Repository navigation
Conversation
VIEW was the only object kind where DETACH X <name> had no matching ATTACH X <name>: ParserCreateTableQuery has an explicit short-attach shortcut and ParserCreateDictionaryQuery skips its body clauses when attaching, but ParserCreateViewQuery required the view body unconditionally and died at the mandatory AS. ParserCreateTableQuery needs the literal TABLE keyword, so the VIEW spelling could not reach its shortcut either. Closes ClickHouse#115259. Add the same shortcut to ParserCreateViewQuery, keeping the view flags on the resulting ASTCreateQuery so the interpreter routes it as a view. OR REPLACE and a user-typed SQL SECURITY clause are excluded, so those spellings keep the syntax error they have today rather than silently dropping a clause the stored metadata owns. Two interpreter changes follow from the new parser path. First, createTable synthesized an empty sql_security for any AST whose supportSQLSecurity() is true, which is exactly what the new branch sets, and the has_dropped_clauses guard then rejected the statement with BAD_ARGUMENTS pointing at ALTER TABLE MODIFY SETTING. Suppress the synthesis for the body-less ATTACH shape instead of reordering the defaulting: reordering would apply creation-time defaults to an existing stored view on every re-attach, and would newly demand SET DEFINER permissions from the already-working ATTACH TABLE spelling. Only visible when ignore_empty_sql_security_in_create_view_query is false, or when refresh_strategy is set. Second, getRequiredAccess authorizes from the typed keyword before the stored metadata is read, and CREATE TABLE implies CREATE VIEW, so a user holding only CREATE VIEW could have attached a detached ordinary table via ATTACH VIEW t. Reject a VIEW-spelled short ATTACH whose stored metadata is not a view. The TABLE spelling stays permissive: it requires the stronger CREATE TABLE, so it grants nothing extra, and ATTACH TABLE on a detached view is the workaround the issue documents. ATTACH WINDOW VIEW has the same parser gap and is deliberately left alone while the removal of WINDOW VIEW is in flight in ClickHouse#114747. Co-Authored-By: Claude Fable 5 <[email protected]>
The suppression of the synthesized sql_security clause is invisible at default server settings: refresh_strategy is parsed after the new short-attach branch so it is always null there, and ignore_empty_sql_security_in_create_view_query defaults to true, which makes the remaining conjunct false. Reverting the guard therefore left every test green. Nothing under tests/ sets that setting. Add 04926_attach_view_short_syntax_sql_security.sh, which drives clickhouse-local with a persistent path and passes the server setting after a bare separator, covering both view kinds because supportSQLSecurity() accepts ordinary and materialized views alike. It carries a default-setting control arm and prints the effective setting value, so an override that failed to take effect fails the diff instead of passing for the wrong reason. Verified to redden with BAD_ARGUMENTS on a build carrying only the parser change. The docs listed only VIEW while the parser also accepts the optional MATERIALIZED keyword, and removing the stale note about the short syntax also removed the still-true statement that ATTACH TABLE reattaches a detached view. Spell the optional keyword in both grammar blocks, add views to the list of entities DETACH says can be reattached, and restore the ATTACH TABLE fact on its own. Each test now drops the objects it creates. Co-Authored-By: Claude Fable 5 <[email protected]>
Review round 2 follow-up. No source change: the parser branch, the is_short_attach suppression and the stored-kind check are untouched. Docs: ATTACH TABLE does not accept a detached dictionary, so drop the claim that it reattaches an entity of unknown kind, and name views in the attach.mdx prose that the grammar block above it already lists. Tests: the parser branch is guarded by !replace_view and !sql_security, and neither field is copied into the resulting query, so dropping either conjunct silently discards a clause the user typed. Three clientError arms pin them. Two formatQuery arms pin the is_materialized_view and cluster copies; dropping the former also makes the stored-kind check unreachable for the MATERIALIZED spelling, so the access test now runs that spelling against a restricted user. 01600_detach_permanently used ATTACH TABLE for two materialized views because the short form did not parse. It does now, so the test uses it and becomes the only coverage of short ATTACH across a fresh process against a persistent path. Co-Authored-By: Claude Fable 5 <[email protected]>
Internal second-model reviewBefore opening this PR I ran an independent cold review plus a second-model review pass over the diff, and adjudicated every finding against the code. Recorded for transparency; nothing below is an open question. Round 3 (final). One finding, a re-raise of the diagnostics nit below. No source change was requested in this round, and the source diff has been byte-identical since round 1. Round 2. 5 findings, all agreed and fixed. The first two were raised independently by both the cold review and the second model.
Round 1 found the same class of problem on the other interpreter change: the Independently enumerated and cleared, recorded so they are not re-litigated: parser precedence ( Session id: cron:clickhouse-review-slot-48:20260818-185823 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20260818-175300 |
|
Workflow [PR], commit [87ce6de] Summary: ✅
AI ReviewSummaryThis PR adds short Findings❌ Blockers
Final Verdict❌ Changes requested — the SQL surface looks good now, but the JSON AST entrypoint still exposes a real privilege/metadata-mutation hole on the new short-view attach path. |
|
cc @evillique @SmitaRKulkarni, could you review this? |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units9 translation units recompiled, 29 s compile time in total, 9 of them have a recent master baseline. |
The short ATTACH shortcut for views added in this PR is authorized from the typed keyword, before the stored definition is read: getRequiredAccess() sees only the stub AST, so it asks for CREATE_VIEW, and processSQLSecurityOption is skipped because the stub's sql_security is null. Nothing re-validates after the metadata load, so a user holding CREATE_VIEW but not SET_DEFINER or ALLOW_SQL_SECURITY_NONE could re-attach a view whose stored metadata carries SQL SECURITY DEFINER or NONE, then read through it. Measured on a debug build: a user granted only SELECT and CREATE VIEW attaches a permanently detached DEFINER view and reads data it has no SELECT grant for, while CREATE VIEW ... DEFINER = u is refused ACCESS_DENIED for the same user. The TABLE spelling is not affected in the same way because it requires CREATE_TABLE, which is strictly stronger (CREATE_TABLE implies CREATE_VIEW), so widening to the VIEW spelling is what exposes the operation to a weaker audience. Authorize the loaded clause after the metadata load and before it takes effect, only for the view spelling; tightening the pre-existing TABLE path would be a backward-incompatible change and is left alone. The call is check-only for a stored clause: the defaulting branch is skipped because a stored clause always has its type set, and the ephemeral-definer branch is gated on CREATE-level loading, so no user is created on attach. Server startup and Replicated DDL worker legs run with no user and keep full access; the Replicated path enqueues before the metadata load. A definer re-attaching their own view is unaffected, and INVOKER views carry neither gated property. Reported by the automated reviewer on this PR.
The short ATTACH path authorizes from the typed keyword before the stored definition is loaded, so a VIEW-spelled statement only ever demanded CREATE_VIEW. getRequiredAccess adds SELECT | INSERT for every named target of a materialized view, but on this path the stub AST has no targets, so the grants the full CREATE syntax demands on the target were never checked. Measured on the previous head: a user holding only CREATE VIEW and SELECT on the source re-attached a detached MATERIALIZED VIEW ... TO dst and the pipeline then wrote into dst, while the same user was denied both the equivalent CREATE and a direct read or write of dst. Authorize the loaded targets after the metadata load and before the copy, mirroring what getRequiredAccess does for the full syntax. View spelling only: the TABLE spelling requires the stronger CREATE_TABLE. Co-Authored-By: Claude Fable 5 <[email protected]>
A short ATTACH carries no definition of its own, so the grants it needs are known only after the stored metadata is read. Every distributed route enqueues the entry before that read, and the worker that replays it runs with no user, which grants full access, so the stored-kind check, the SQL SECURITY authorization and the named-target authorization can only be enforced for a query that executes on the initiating node. Measured on a Keeper-backed Replicated database and on ON CLUSTER: a user granted only CREATE VIEW re-attached a detached MATERIALIZED VIEW ... TO dst and a stored SQL SECURITY DEFINER view, then read data it holds no grant for, while the equivalent CREATE spellings and the direct grants on the target were all denied. Before this PR that user had no route at all, since ATTACH TABLE and ATTACH DICTIONARY demand grants it lacks and the VIEW spelling did not parse. The check sits in execute() rather than createTable() because distributed_ddl_entry_format_version below 3 dispatches ON CLUSTER queries straight to executeQueryOnCluster and never reaches createTable; versions 1 and 2 are still supported, and the bypass was reproduced at both. ATTACH TABLE keeps working on these routes and remains the way to re-attach a detached view there. ATTACH DICTIONARY and ATTACH DATABASE are unaffected. Co-Authored-By: Claude Fable 5 <[email protected]>
The distributed guard tested `!create.storage` while `createTable` treats a storage node without an engine as short syntax too, so a `clickhouse_json` AST carrying an empty storage clause slipped past it. Both sites now call one `isShortAttach` helper, which is what keeps them from drifting apart again. The error also suggested an unqualified `ATTACH TABLE v` for `ATTACH VIEW other.v`, which names a different table; it now keeps the database qualifier. Tests: pin `distributed_ddl_entry_format_version = 2`, since versions below 3 dispatch `ON CLUSTER` before `createTable` and a guard placed there would leave the other cases green. Tag the tests that re-attach views locally `no-replicated-database`, because the harness database is Replicated under that job and those attaches are now rejected, and tag the new Replicated test `zookeeper` so jobs without Keeper skip it. Co-Authored-By: Claude Fable 5 <[email protected]>
The error suggested `ATTACH TABLE db.v;`, which silently dropped `ON CLUSTER` and `IF NOT EXISTS` from the query it was rejecting; following it would attach locally and lose idempotence. It now names the spelling to replace and says to keep the rest of the query, so nothing has to be reconstructed. The JSON AST dialect can carry an `ASTStorage` without an engine, which the SQL short-view parser never produces, so the added test pins the shape that motivated sharing `isShortAttach`. Verified against a build using the former `!create.storage` predicate: the statement passes the guard and reaches the cluster dispatch, and the test reddens. Its DDL wait is bounded so that regression fails fast instead of blocking on the task timeout. Co-Authored-By: Claude Fable 5 <[email protected]>
…ored Window Views Two defects in the stored-definition authorization added earlier in this PR, both measured. The `SQL SECURITY` and target checks ran before the `if_not_exists` no-op was reached, so a caller holding only CREATE VIEW got ACCESS_DENIED for a view that was already attached and whose definition would not be applied at all. The checks now skip that case. `isView()` also covers Window Views, which the view parser cannot spell, so the stored kind was accepted and then overwrote the stub: `ATTACH VIEW wv` attached a stored WINDOW VIEW with engine WindowView. Rejected now, with `ATTACH TABLE` named as the way to attach one. Co-Authored-By: Claude Fable 5 <[email protected]>
…hint The top-level grammar applied the `ON CLUSTER` suffix to every alternative, including the view spellings that are local only, so it contradicted the restriction stated below it. Split it. The Window View diagnostic suggested a bare `ATTACH TABLE wv;`, which drops the database qualifier and `IF NOT EXISTS`; it now names the spelling to replace, like the distributed one. Co-Authored-By: Claude Fable 5 <[email protected]>
CI finish ledger - 7a37de2Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
Not caused by this PR: the other 4 flaky-check legs at this head (amd_asan_ubsan, amd_binary, Session id: cron:our-pr-ci-monitor:20260820-053000 |
|
Fixing PR for the The job was not failing a test: |
Master moved the ATTACH and DETACH reference pages into the source that generates them: the page bodies now sit between AUTOGENERATED markers and are produced from the `.description` strings registered by `factory.registerStatement` in ParserCreateQuery.cpp and ParserDropQuery.cpp (9253de5). ci/jobs/docs_job_mintlify.py rejects a pull request that edits a marked region directly, so this branch's documentation of the short `ATTACH VIEW` spelling moves from the .mdx pages into those two strings; both pages are taken from master unchanged.
The check in `execute` resolves the database once, but `createTable` resolves it again before it enqueues a replicated DDL entry or sends the query on to a cluster, so a view spelling could still reach either route if the database changed in between. Both routes now call the rejection directly, and the rejection itself moves into one function the three sites share. The `.syntax` field registered for `ATTACH` gains the view shorthand: it is served from `system.statements`, and the description beside it already documented the spelling.
…ects alone `isShortAttach` tested `columns_list` for presence, but the JSON AST dialect can build a columns node that declares nothing, and formatting omits such a node. The initiator therefore took the full-definition route and queued text that reparses as a short `ATTACH VIEW` on the workers, which authorize the stored definition without the initiating user. Measured on a single node before the change: the empty-columns carrier reached `executeQueryOnCluster` (`Code: 139`, no DistributedDDL configuration) where the same query without the node was rejected. A temporary object belongs to no database, so the view check no longer runs for one: `DatabaseReplicated::shouldReplicateQuery` answered for the current database first and reported the Replicated restriction instead of the rejection that names temporary attach. Both carriers get a regression arm. The temporary arm was verified to fail without the exclusion.
The engine conversion that `AS REPLICATED` asks for rewrites the metadata on disk and removes transaction files, and neither is rolled back when the query then fails. It ran before the checks that compare the spelling in the query against the kind found in the stored metadata, so a view spelling aimed at a stored `MergeTree` table converted that table and only afterwards reported that the object is not a view. Measured with the flag carried on a view AST through `clickhouse_json`: the query failed identically either way, but the stored engine came back as `ReplicatedMergeTree` before this change and stays `MergeTree` after it. The conversion now follows every check of the stored kind.
`.claude/CLAUDE.md` asks for `f` rather than `f()` when the text refers to a function itself.
| /// A short ATTACH is authorized only once the stored definition has been read, which happens on the | ||
| /// node that executes the query. A distributed route enqueues before that read, and the worker | ||
| /// replaying the entry runs with no user, hence full access. | ||
| void rejectShortAttachViewOutsideOneNode(const ASTCreateQuery & create) | ||
| { | ||
| if (!create.isView() || !isShortAttach(create)) | ||
| return; | ||
|
|
||
| throw Exception(ErrorCodes::INCORRECT_QUERY, | ||
| "The short ATTACH {0} is not supported for ON CLUSTER queries and Replicated " | ||
| "databases, because the stored definition is read on the node that executes the " | ||
| "query. Replace {0} with TABLE, keeping the rest of the query.", | ||
| create.is_materialized_view ? "MATERIALIZED VIEW" : "VIEW"); | ||
| } |
There was a problem hiding this comment.
This makes this feature completely useless.
because the stored definition is read on the node that executes the query
Yeah, that is kind of the whole point.
What is the actual problem with allowing it on ON CLUSTER queries and in Replicated dbs?
There was a problem hiding this comment.
Agreed, and the semantics are not what I was guarding: reading the stored definition on the executing node is the point. What differs is which grant is enough.
Measured on a Keeper-backed Replicated database and via ON CLUSTER, guard absent, user granted only CREATE VIEW ON rr.* plus SELECT on the source table:
- a stored
SQL SECURITY DEFINERview attaches, and that user then reads privileged data it holds noSELECTgrant for; - a stored
MATERIALIZED VIEW ... TO dstattaches withTO dstpreserved, and rows start flowing intodst.
Locally both are ACCESS_DENIED. Controls for that user all deny: CREATE VIEW ... DEFINER = default, INSERT INTO rr.dst, and a direct read of the source. Cause: both routes enqueue before getCreateTableQuery loads the definition, and the replaying worker has no user, where full_access is !user_id (Context.cpp:2309), so the post-load checks are no-ops there.
The bypass itself is pre-existing, ATTACH TABLE does the same on master. It just demands CREATE TABLE, which implies CREATE VIEW, so the short view spelling would hand it to a strictly weaker audience. That widening is the whole of my objection.
So instead of rejecting, I will require on those two routes what the TABLE spelling already requires: CREATE TABLE on the object. Then the short view spelling works everywhere and nobody reaches anything they could not reach before. Loading and authorizing the definition before the enqueue would be better, but the initiator may not hold the database for an ON CLUSTER query, which is the replicated-DDL authorization fork in #111561.
If you would rather have no check there at all and treat the widening as acceptable because ATTACH TABLE already allows it, say so and I will simply delete the guard.
|
@groeneai, Also, if we add attach materialized view, then shouldn't we add a detach with the same 'materialized'. Otherwise, there is still a discrepancy, as in the original issue. What do you think? What is the general SQL rules for this in other dbs? Should we even have ATTACH MATERIALIZED VIEW? |
|
Measured on master
So the asymmetry in #115259 is Adding Other engines: I checked PostgreSQL 16.15 only. It carries both spellings on both sides and enforces the kind exactly, On whether |
Master added `replaceLegacyToTimeInCreateQuery`, `substituteUserDefinedFunctionsOutsideEngines` and `normalizeLegacyToTimeInCreateQuery` at the same place this branch adds `isShortAttach` and `rejectShortAttachViewOutsideOneNode`, and the conflict cut just before the brace closing the last one. Kept both sets. The translation unit was syntax-checked after the resolution. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
| /// `getRequiredAccess` ran on the stub, which has no definition, so nothing the stored | ||
| /// definition carries is authorized yet, and CREATE_VIEW alone reaches here. An `IF NOT | ||
| /// EXISTS` no-op applies no definition, so it must not demand the definition's grants. | ||
| if (create.isView() && !(if_not_exists && database->isTableExist(create.getTable(), getContext()))) |
There was a problem hiding this comment.
attach_as_replicated is still reachable on the new short-view surface through clickhouse_json, and this block applies it before the post-load checks below. ASTCreateQuery::readJSON() only rejects attach_as_replicated on non-ATTACH queries, not on view ASTs, so a crafted ATTACH MATERIALIZED VIEW JSON payload can carry AS REPLICATED, pass getRequiredAccess() with only CREATE VIEW, and land here with a detached inner-table MV. convertMergeTreeTableIfPossible(create_query, ...) then rewrites the detached metadata file (and may clear transaction metadata) before anything rejects the parser-impossible view/table mismatch. For MVs that also carry stored SQL SECURITY or TO dst, the ACCESS_DENIED from the new block at :1919 would arrive only after those side effects.
Please reject attach_as_replicated for any view-spelled short ATTACH before this block, and ideally at ASTCreateQuery::readJSON() too, since the SQL parser cannot produce that combination. A focused regression arm in 04926_attach_view_short_syntax_json_ast.sh on a detached inner-table MV would pin it.
|
Dear @evillique, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
Co-Authored-By: Claude Opus 5.5 <[email protected]> # Conflicts: # src/Interpreters/InterpreterCreateQuery.cpp
WINDOW VIEW was removed on master (ClickHouse#114747), so `ASTCreateQuery` no longer has `is_window_view` and the stored metadata can no longer hold that kind: `isView()` is now exactly an ordinary or a materialized view. Remove the check that rejected a stored Window View and its test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A full ATTACH MATERIALIZED VIEW ... TO ... AS SELECT carries no columns and no
engine, so it takes the short-ATTACH path, where createTable rejects the clauses
it would drop with BAD_ARGUMENTS. The early check in execute() ran before that
and answered INCORRECT_QUERY ("the short ATTACH ... is not supported for ON
CLUSTER queries and Replicated databases") for a query that is not the short form,
which broke 04247 cases 18-20 under the Replicated database lane.
The clause check moves into one helper that both sites call, and execute() runs
it before the route rejection, so every route reports the dropped clauses first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CREATE resolves `DEFINER = CURRENT_USER` into the creator's name but keeps the `is_definer_current_user` flag on the AST. An on-disk database reparses the formatted metadata, which loses the flag, but a Memory database returns a clone of the parsed AST, so the short ATTACH VIEW authorization resolved the flag again: the definer became the attaching user and SET DEFINER was never checked. Measured: a user with only CREATE VIEW re-attached another user's DEFINER view in a Memory database and became its definer, while the same query in an Atomic database is refused with "necessary to have the grant SET DEFINER ON <creator>", and ATTACH TABLE keeps the creator. A stored definer is authoritative, so the flag is cleared before the stored clause is authorized. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The early rejection in execute() resolved the database to ask whether it is Replicated, and it runs before checkAccess. A user without any grant therefore got INCORRECT_QUERY for `ATTACH VIEW rdb.v` when `rdb` is a Replicated database and ACCESS_DENIED for an Atomic or a missing one, which reveals the engine of a database the user cannot see. Measured with a user holding no grants: both now answer ACCESS_DENIED. The early check keeps only the syntactic ON CLUSTER case, which needs it because distributed_ddl_entry_format_version below 3 dispatches straight to the cluster. A Replicated database is still rejected in createTable, after authorization. Co-Authored-By: Claude Opus 5.5 <[email protected]>
execute() no longer looks the database up, so createTable is the only place that classifies it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes: #115259
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
ATTACH VIEW <name>andATTACH MATERIALIZED VIEW <name>now re-attach a previously detached view from its stored metadata, likeATTACH TABLEandATTACH DICTIONARYalready did. Previously onlyDETACH VIEWwas accepted and the matchingATTACHwas a syntax error. The definition is read on the node that runs the query, so these spellings are not supported forON CLUSTERqueries or inReplicateddatabases; useATTACH TABLEthere. Closes #115259.Description
Requested by @ PedroTadim (ack).
VIEWwas the only object kind whereDETACH X <name>had no matchingATTACH X <name>:ParserCreateTableQueryhas a short-attach shortcut (ParserCreateQuery.cpp:858) butParserCreateViewQueryrequired the body. Added the same shortcut, keeping the view flags for routing.Five interpreter changes follow, each proved on a build carrying only the earlier ones:
createTablesynthesized an emptysql_securityfor any AST whosesupportSQLSecurity()is true, whichthe new branch sets, so
has_dropped_clausesthrewBAD_ARGUMENTSabout a clause nobody wrote; nowsuppressed for this shape.
Three are access checks, because
getRequiredAccess()authorizes from the typed keyword before metadatais read and
CREATE TABLEimpliesCREATE VIEW. ACREATE VIEW-only user could attach a detachedordinary table, re-attach a stored
DEFINERview withoutSET DEFINER, and re-attach aMATERIALIZED VIEW ... TO dstwithout thedstgrant (all measured). So a view-spelled ATTACH whosestored metadata is not a view is rejected, and the loaded
SQL SECURITYclause (a storedCURRENT_USERdefiner is not re-resolved to the caller) and targets are authorized.View spelling only; an
IF NOT EXISTSno-op needs no such grant.The fifth keeps the view spellings local.
ON CLUSTERandReplicateddatabases enqueue before themetadata load and the worker has no user, hence full access, so none of those checks can run: measured
there, a
CREATE VIEW-only user re-attached both carriers and read privileged data, where no spellingpreviously gave a route.
ATTACH TABLEstill works. TheON CLUSTERcheck also sits inexecute(), sincedistributed_ddl_entry_format_versionbelow 3 dispatches beforecreateTable; authorizing beforeenqueueing is #111561's question.
Validation: seven new stateless tests plus a converted arm of
01600_detach_permanently, each verifiedto fail without its change; these and four existing tests pass.
Sibling and edge-case matrix
ATTACH VIEW vSYNTAX_ERRORATTACH MATERIALIZED VIEW mvSYNTAX_ERRORATTACH VIEW IF NOT EXISTS vSYNTAX_ERRORATTACH VIEW v ON CLUSTER cSYNTAX_ERRORINCORRECT_QUERY, useATTACH TABLEATTACH VIEW db.vSYNTAX_ERRORATTACH VIEW v UUID '...'SYNTAX_ERRORBAD_ARGUMENTS, asATTACH TABLE t UUID '...'ATTACH TEMPORARY VIEW vSYNTAX_ERROR(parser)SYNTAX_ERROR(interpreter), asATTACH TEMPORARY TABLEATTACH VIEW <a table>INCORRECT_QUERY, "it is a Table"ATTACH VIEW vwith storedDEFINER/NONE, caller lacking the grantACCESS_DENIEDATTACH OR REPLACE VIEW vSYNTAX_ERRORATTACH SQL SECURITY INVOKER VIEW vSYNTAX_ERRORATTACH DEFINER = u VIEW vSYNTAX_ERRORDETACH MATERIALIZED VIEW mvSYNTAX_ERRORATTACH VIEW vin aReplicateddatabaseSYNTAX_ERRORINCORRECT_QUERY, useATTACH TABLEATTACH TABLE <a detached view>ATTACH TABLE/DICTIONARY/DATABASE, incl.ON CLUSTERWorkflow [PR]
Sync PR [sync-upstream/pr/115351]