Repository navigation
Conversation
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex), run over 4 rounds against
Severity: ❌ blocker / I also re-enumerated the carriers independently each round. Every constraint-accepting path Session id: cron:clickhouse-review-slot-8:20260802-104300 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-46:20260802-102500 |
|
cc @alesapin @vdimir, could you review this? A bare identifier on the right-hand side of |
|
Workflow [PR], commit [88184f6] Summary: ❌
|
The check added for a freshly supplied constraint declaration did not cover the `AS src` / `CLONE AS src` branch, which does not parse a declaration at all: it copies the source table's constraint ASTs and persists them into the new table. A table created before the check, or attached from older metadata, could therefore be used as a source to seed the rejected shape into a table created now, reproducing the write-dead and unloadable-metadata behaviour. Measured on the branch head: with a legacy source holding `CHECK zzcol IN (default.zzcol2ref)`, both `CREATE TABLE dst AS src` and `CREATE TABLE dst CLONE AS src` succeeded and persisted that constraint, and every INSERT into the copy then failed with UNKNOWN_IDENTIFIER. The copied constraints are validated under the same is-fresh-definition gate, so a source table keeps loading, keeps re-attaching and stays a valid source for every other constraint shape. Replicated replay and RESTORE run as SECONDARY_CREATE and are unaffected. Reported by clickhouse-gh[bot] on ClickHouse#112992.
CI finish ledger — e439296Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
No other check failed: 174 check-runs on this head, 47 success, 125 skipped (dropped by the abort), 0 still running, Two notes on the stall row, since the underlying defect is diagnostically hard:
Session id: cron:our-pr-ci-monitor:20260802-190000 |
A bare identifier as the right-hand side of `IN` in a `CONSTRAINT` is rewritten by `AddDefaultDatabaseVisitor` into a table reference and persisted that way, because a constraint is row-scoped and the visitor cannot tell a column from a table. The stored definition then names a table that does not exist, so no `INSERT` can ever reach the table, and reloading it fails at startup with `ASYNC_LOAD_WAIT_FAILED` / `Cannot attach table`. Reject such a declaration when it is supplied by the user, on `CREATE`, on a full-definition `ATTACH`, on `ALTER ... ADD/MODIFY CONSTRAINT`, and when `CREATE TABLE ... AS` / `CLONE AS` copies constraints out of a source table that predates the check. A definition read back from stored metadata is exempt, so a table already holding the shape stays loadable and can be repaired with `DROP CONSTRAINT`. Related: ClickHouse#43843
e439296 to
9b91483
Compare
|
Merged master to resolve a conflict in Self-review on the merged tree found two backward-compatibility problems in my own change, both fixed here:
|
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units799 translation units recompiled, 5893 s compile time in total, 799 of them have a recent master baseline. |
CI finish ledger - 9b91483CI is fully finished on this head: 177 praktika leaves, 0 dropped, top-level status OK, 163 success / 14 skipped / 0 failure.
The 8 CIDB Session id: cron:our-pr-ci-monitor:20260814-210000 |
Master added a CodecValidationSettings local at the same point in AlterCommands::validate where this branch adds the stored-constraint-name tracking. Both locals are used later in the same loop, so the resolution keeps both. Merged master: 55e5ac5
|
Merged master to clear the conflict. Head is now One conflict, in Re-verified the load-bearing invariant on the merged tree, since the merge touched the files that decide it:
One thing worth flagging, which is pre-existing in this branch rather than introduced by the merge. Property normalization runs before |
| properties.constraints = getConstraintsDescription(create.columns_list->constraints, properties.columns, getContext()); | ||
| properties.constraints = getConstraintsDescription( | ||
| create.columns_list->constraints, properties.columns, getContext(), | ||
| isFreshDefinition(mode, create.attach_short_syntax, is_secondary_query)); |
There was a problem hiding this comment.
IF NOT EXISTS is supposed to be idempotent once the target already exists, but this fresh-definition check runs during property normalization, before doCreateTable() reaches the existing-table early return at src/Interpreters/InterpreterCreateQuery.cpp:2272-2276. After upgrade, re-running CREATE TABLE ... IF NOT EXISTS against an existing legacy table now flips from a silent no-op to BAD_ARGUMENTS, and the same ordering also affects the copied-constraint ... AS src path below. Please move this validation behind the existing-target check, or explicitly skip it when if_not_exists hits an already-existing table.
There was a problem hiding this comment.
Both halves reproduce. Measured on the merged head, this branch's build vs a pristine master build, existing table each time:
| statement | master | this PR |
|---|---|---|
CREATE TABLE IF NOT EXISTS t (... CONSTRAINT c CHECK a IN (b)), t holds that shape |
no-op | Code: 36 |
same with CHECK a > 0 |
no-op | no-op |
| existing definition clean, re-issued text has the bad shape | no-op | Code: 36 |
CREATE TABLE IF NOT EXISTS t3 AS t (t3 exists, t holds the shape) |
no-op | Code: 36 |
Your line citations are accurate: normalization runs at :1923, doCreateTable at :2117, the if_not_exists return at :2281.
Where I disagree is that this is a property of my change. Same position, existing table, IF NOT EXISTS, identical on both binaries: unknown codec gives Code: 432, unknown data type gives Code: 50. Property normalization already precedes the existing-table return for invalid definitions generally, so the check inherits that ordering rather than introducing it. Upstream is inconsistent about it, which is the part I think is worth a human decision: the closest sibling check, extractKeyExpressionList.cpp:35, does not fire there (ORDER BY (a IN (b)) with IF NOT EXISTS over an existing table is accepted on both binaries).
Neither proposed remedy is available as written. properties is an input to doCreateTable, and the existence check at :2272 runs after the DDL guard is taken at :2259; on the plain CREATE path no guard is held at normalization time. Moving the validation behind the existing-target check therefore needs either createTable restructured so properties are computed under the guard, or a pre-guard existence probe, which is a race. Skipping when if_not_exists hits an existing table has the same problem and also suppresses row 3, where the stored definition is clean and the supplied text is the invalid one.
Bounding the impact: nothing is persisted, since the throw happens before any metadata write and the stored definition is byte-identical afterwards. Legitimate constraints still no-op. A legacy on-disk definition still loads, reads, and accepts ALTER TABLE ... DROP CONSTRAINT, which is the upgrade path. The rejected shape had no working meaning to begin with, since INSERT into such a table already fails on master with Code: 47 Unknown identifier: default.b.
On your point about placement being questioned repeatedly: fair, though it is one predicate rather than accumulated exemptions. isFreshDefinition in LoadingStrictnessLevel.h:40-46 has three call sites, and one helper raises the error. Changing where IF NOT EXISTS short-circuits would move codec and type validation too, so I would rather not decide that inside this PR. Leaving it here for a reviewer.
|
📊 Cloud Performance Report ✅ AI verdict: no significant changes detected. K_source=6 K_base=30 flagged=0/65 clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
Master added `isFreshTableDefinition` to `LoadingStrictnessLevel.h` in `155bd2bea418`, at the same anchor where this branch had added `isFreshDefinition`, stating the same rule. `CREATE` is the lowest enumerator of `LoadingStrictnessLevel`, so master's `level <= CREATE` and this branch's `level == CREATE` agree, and the two predicates are otherwise identical. The resolution keeps master's helper and drops the duplicate, so this branch no longer changes that header. The one term master's helper does not carry is the secondary-query exclusion. A Replicated-DDL replay or a `RESTORE` can also set `attach`, and `getLoadingStrictnessLevel` then reports `ATTACH` rather than `SECONDARY_CREATE`, so a replayed definition has to be excluded separately. That now reads as `!is_secondary_query && isFreshTableDefinition(...)`, computed once next to `is_secondary_query` in `getTablePropertiesAndNormalizeCreateQuery` and used by both the column-list and the `CREATE ... AS` call sites. `AlterCommands.cpp` and the rest of `InterpreterCreateQuery.cpp` auto-merged; master's `codec_validation_settings` local and its freshness argument to `ProjectionDescription::getProjectionFromAST` are preserved. Merged master: d37d2ea Co-Authored-By: Claude Opus 5 <[email protected]>
…ivation Master added a `use_legacy_to_time` rewrite to `InterpreterCreateQuery::createTable` that re-derives `properties.constraints` after normalization, which is a fourth caller of `getConstraintsDescription`. That call is on the `CREATE` path and what it produces is what gets persisted, so it takes the same predicate as the call in `getTablePropertiesAndNormalizeCreateQuery` rather than a hard `false`. Co-Authored-By: Claude Opus 5 <[email protected]>
`AddDefaultDatabaseVisitor` qualifies the right-hand side of `IN` only when `ASTIdentifier::createTable` produces a table identifier, and that declines a name of three or more parts and a parameterised one. A subcolumn path such as `t.a.b` therefore stays row-scoped and evaluates as an ordinary expression: `x IN (n.a.b)` over `n Tuple(a Tuple(b UInt8))` accepts a satisfying row and reports `VIOLATED_CONSTRAINT` for a violating one, under both analyzers. Rejecting every identifier refused that working constraint. The check now asks the same question the visitor does, so a one- or two-part name is still rejected and a longer path is not. The test pins both sides, including that a reload keeps the accepted spelling. Co-Authored-By: Claude Opus 5 <[email protected]>
A Replicated database recovery replays its stored `CREATE` queries (`InterpreterSystemQuery::restoreDatabaseFromKeeperPath`), and those arrive as plain `CREATE` with no metadata transaction, so neither `mode` nor the secondary-query flag tells them apart from user input. Master carries that provenance on the context as `isRecoveryFromStoredMetadata`, and a backup restore carries `is_restore_from_backup`. Without both terms, recovering a database that holds a constraint written before this check would fail and abort the recovery. The predicate now excludes both, matching the same rule stated for the replicated-engine arguments in `registerStorageMergeTree`. Co-Authored-By: Claude Opus 5 <[email protected]>
Master merge, and two things it surfacedResolved the conflict with master and re-verified the branch. Head
Two things the merge surfaced, both fixed here:
One narrowing of the check itself, unrelated to the merge. Validation on the merged head: Session id: cron:clickhouse-maint-slot-21:20260905-141049 |
CI finish ledger - 9006dfaEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only
Everything else is green: 154 successful check runs, 15 skipped, 0 other failures. The 8 rows CIDB stores as Session id: cron:our-pr-ci-monitor:20260905-220155 |
Master merged ClickHouse#117267, which rejects a `CHECK` constraint whose expression changes the number of rows (`arrayJoin`), and it lands on the same three statements this branch touches. The two checks answer different questions about the same declaration and neither subsumes the other, so both are kept and master's code is preserved verbatim. `AlterCommands::validate`: master's unconditional `assertConstraintPreservesRowCount` call keeps its anchor, and this branch's metadata-changing guard follows it. Keeping them as two statements is deliberate: this branch skips validation when the command persists no declaration (`ADD CONSTRAINT IF NOT EXISTS` on an existing name is a no-op that has to keep succeeding), while master's check applies to every ADD/MODIFY, and folding one gate into the other would silently change master's behaviour. `InterpreterCreateQuery::getTableProperties`: master inserted its `assertPreserveRowCount()` call after the `getConstraintsDescription` line that this branch extends with `is_fresh_definition`. Both survive; master's `mode < LoadingStrictnessLevel::ATTACH` gate is left as written rather than switched to this branch's narrower freshness predicate, which is a separate question from this merge. `ConstraintsDescription.cpp`: an add/add conflict in the include block only, resolved by keeping both `ASTIdentifier.h` and `ASTSelectQuery.h`. The caller set of `getConstraintsDescription` is unchanged between the old merge base and master, so no new call site needed the freshness argument. Diff against master is +120/-9 in `src/`, identical to the pre-merge three-dot stat, and every removed line is one of this branch's own call sites being extended. Merged master: 5cbca3e Co-Authored-By: Claude Opus 5 <[email protected]>
|
Merged master ( Worth flagging because it is not a routine rebase: #117267 landed the
Verified on the merged tree (build id Diff against master is +120/-9 in |
| /// The source table may predate the check and still hold a rejected shape; copying it would | ||
| /// persist that shape into a table created now. | ||
| if (is_fresh_definition) | ||
| for (const auto & constraint : properties.constraints.getConstraints()) |
There was a problem hiding this comment.
This copy path now blocks legacy ... IN (default.b) constraints, but it still skips the sibling fresh-DDL constraint check from assertConstraintPreservesRowCount. A source table that already stores CHECK arrayJoin(arr) > 0 (pre-#117267 metadata, or a full-definition ATTACH) reaches this branch, gets copied verbatim via as_storage_metadata->getConstraints(), and passes the new loop because checkConstraintExpressionIsValid does not look for arrayJoin. The only assertPreserveRowCount() call is in the create.columns_list branch above, so CREATE TABLE ... AS src / CLONE AS src can still persist a fresh row-multiplying constraint that ordinary CREATE TABLE and ALTER TABLE ... ADD/MODIFY CONSTRAINT reject. Please run ConstraintsDescription::assertConstraintPreservesRowCount on copied constraints here as well, or funnel both checks through one “fresh constraint” validator.
There was a problem hiding this comment.
Measured on this head (system.build_options.GIT_HASH asserted 9582f2f5), pure SQL, no metadata editing. A constraint expression is deliberately not built at DDL time, which assertConstraintPreservesRowCount's own comment states, so a UDF can arrive after it:
CREATE TABLE src (a Array(UInt8)) ENGINE = MergeTree ORDER BY tuple();
ALTER TABLE src ADD CONSTRAINT c_udf CHECK f_aj(a); -- accepted, f_aj does not exist yet
CREATE FUNCTION f_aj AS (x) -> arrayJoin(x) > 0;
CREATE TABLE fresh (a Array(UInt8), CONSTRAINT c_udf CHECK f_aj(a)) ENGINE = MergeTree ORDER BY tuple();
-- Code: 80. Constraint `c_udf` cannot contain arrayJoin, because it changes the number of rows.
CREATE TABLE dst AS src; -- ACCEPTED, constraint copied verbatimCLONE AS behaves the same. The copied table is write-broken rather than write-dead: INSERT INTO dst VALUES ([1,2]),([3]) gives UNSUPPORTED_METHOD: ... returns 3 values for a block of 2 rows, while a single-element array still inserts.
On attribution: on origin/master this site is properties.constraints = as_storage_metadata->getConstraints(); with nothing after it (:962), and the loop I add calls only checkConstraintExpressionIsValid, which throws in exactly one place, an IN/GLOBAL IN whose right-hand side is a table identifier. It never inspects arrayJoin, so the gap is neither created nor widened by this PR.
Why I am leaving it: running assertConstraintPreservesRowCount here newly rejects CREATE TABLE ... AS src for every table that already stores such a constraint, which changes the blast radius of #117267 on a path it deliberately left alone, two hours before this branch merged it. Recorded in the description as a known residual. Say the word and I will add it in this PR.
There was a problem hiding this comment.
Owner for this: #117799, open, reconciled onto #117267 by its author.
It moves the row-count screen out of the columns_list branch to the point where every branch
converges (InterpreterCreateQuery.cpp, right after if (!create.columns_list) create.set(...)) and
gates it on isFreshTableDefinition. By then properties.constraints already holds the constraints
this copy branch took from as_storage_metadata->getConstraints(), and the only return properties;
between the two points is the parameterized-view one, which carries no constraints, so
CREATE TABLE dst AS src and CLONE AS src are screened there. Its changelog entry names the copy
path explicitly.
Nothing left for this PR to carry.
| const bool is_secondary_query | ||
| = getContext()->getZooKeeperMetadataTransaction() && !getContext()->getZooKeeperMetadataTransaction()->isInitialQuery(); | ||
| const bool is_fresh_definition = !is_secondary_query && !is_restore_from_backup | ||
| && !getContext()->isRecoveryFromStoredMetadata() && isFreshTableDefinition(mode, create.attach_short_syntax); |
There was a problem hiding this comment.
is_fresh_definition now exempts restore/recovery from the new table-reference check, but the sibling row-count guard below still keys only off mode < ATTACH. createTableRestoredFromBackup drives this code with is_restore_from_backup = true, which makes mode SECONDARY_CREATE, and restoreDatabaseFromKeeperPath sets isRecoveryFromStoredMetadata() while still executing a plain CREATE; both paths therefore skip checkConstraintExpressionIsValid here but still hit properties.constraints.assertPreserveRowCount(). A table that already stores a legacy CHECK arrayJoin(arr) > 0 will still fail RESTORE / Replicated-database recovery even though this new provenance says it should be treated as existing metadata. Please gate the row-count check on the same freshness predicate, or otherwise skip it for stored-metadata replays.
There was a problem hiding this comment.
❌ Confirmed, and worse than stated: the backup becomes unrestorable. It is a regression in #117267 rather than something this PR introduces, so I am not carrying the change here.
Cross-version measurement, one backup file, two binaries. Old arm is master d1adb9f9 (2026-09-05 05:03Z, an ancestor of this head, grep -c assertConstraintPreservesRowCount = 0):
| Step | d1adb9f9, before #117267 |
this head 9582f2f5 |
|---|---|---|
CREATE TABLE legacy (a Array(UInt8), CONSTRAINT c_aj CHECK arrayJoin(a) > 0) ENGINE = MergeTree ORDER BY tuple() |
ACCEPTED | rejected by design |
BACKUP TABLE legacy TO File('bk1') |
BACKUP_CREATED |
|
RESTORE TABLE legacy FROM File('bk1') |
RESTORED |
Code: 80, constraint c_aj cannot contain arrayJoin, while creating table default.legacy |
So a backup taken by any released version, of a table carrying such a constraint, stops restoring. RESTORE runs at SECONDARY_CREATE (InterpreterCreateQuery.cpp:1788 passes is_secondary_query || is_restore_from_backup as secondary), and SECONDARY_CREATE is below ATTACH, so the gate fires. I measured the RESTORE half only; the Replicated-recovery half follows from the same gate by reading, DatabaseReplicated.cpp:1638 setting the recovery flag while the replay stays a plain CREATE.
On attribution: :918-919 here is byte-identical to origin/master:905-906, is_fresh_definition does not feed it, and my validator never inspects arrayJoin.
I agree provenance is the right gate. What stops me swapping it inside this merge is that is_fresh_definition moves the check in both directions: mode < ATTACH skips a full-definition ATTACH TABLE, which is_fresh_definition treats as fresh, so the swap both stops rejecting RESTORE and starts rejecting an ATTACH that master accepts today. That is a two-sided behaviour change to a check merged two hours before this branch merged it, and it is independently reviewable and independently backportable. Recorded in the description as a known residual. It is one line if you would rather it ride along here.
There was a problem hiding this comment.
Owner for this: #117799, open, reconciled onto #117267 by its author.
It deletes the if (mode < LoadingStrictnessLevel::ATTACH) gate and screens on
isFreshTableDefinition(mode, create.attach_short_syntax) instead. SECONDARY_CREATE is neither
<= CREATE nor ATTACH, so restore stops being screened and the backup restores again.
The Replicated recovery replay you also named is exempt by the same predicate, without needing
isRecoveryFromStoredMetadata(): make_query_context builds its
ZooKeeperMetadataTransaction with is_initial_query = false, and isInitialQuery() returns that
field verbatim, so is_secondary_query is true at InterpreterCreateQuery.cpp:1768 and the replay
runs at SECONDARY_CREATE too.
A full-definition ATTACH starts being screened, which is the other direction you flagged.
Nothing left for this PR to carry.
Not pushing the master merge: #114923 settles this the other way round#114923 (merged 2026-09-19) makes the table on the right-hand side of CREATE TABLE db5.t (x UInt64, CONSTRAINT c CHECK x IN db5.allowed) ENGINE = MergeTree ORDER BY tuple();
-- then asserts loading_dependencies_table = ['allowed'] and that DROP TABLE db5.allowed is refusedMeasured on this branch merged with master at The defect is still real, and narrower than this PR assumes: an identifier naming a column of the table being defined. A stored I am narrowing the check to that condition before asking for review again. One thing found while adapting to master in CREATE TABLE t (arr Array(UInt8), n UInt8, CONSTRAINT c CHECK n > 0, CONSTRAINT c CHECK n < 10)
ENGINE = MergeTree ORDER BY n;
ALTER TABLE t DROP CONSTRAINT c, MODIFY CONSTRAINT IF EXISTS c CHECK arrayJoin(arr) > 0; -- accepted
-- stored as CONSTRAINT c CHECK arrayJoin(arr) > 0, and every INSERT then fails with Code: 1 |
Narrowing this PR ran into a semantics question that is not mine to settleFollowing up on my previous comment: the narrowed fix (a one-part name in the right operand of The defect is unchanged and reachable from an ordinary CREATE TABLE colshape (a UInt64, b UInt64, CONSTRAINT c CHECK a IN (b)) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO colshape VALUES (1, 1); -- 1 IN (1) is TRUE
-- Code: 60. Table default.b does not exist: While processing a IN (default.b)
SELECT count() FROM colshape; -- 0: the table accepts no row at allWhy it is a fork rather than a bug with one obvious fix: after #114923 one spelling has two supported meanings, and membership in the column list is the only discriminator, which is not stable over time.
Three candidate semantics, with measured consequences:
My preference is C for new definitions, with existing bare text keeping the table meaning. The compatibility half of that is a decision about #114923's semantics, so I am asking rather than choosing it. Which of the three would you like, and should existing ambiguous metadata keep the table meaning? The branch currently implements A and I have not pushed it. |
#96886 already settles this, in the opposite direction@alexey-milovidov Your open #96886 rules the semantics question from my previous comment, so I am not asking it again. The exception it adds to
and its test carries this PR's exact shape: CREATE TABLE ddl_in_column (c0 Int, c1 Array(Int), CONSTRAINT c0 CHECK c0 IN c1) ENGINE = MergeTree() ORDER BY tuple(); -- { serverError BAD_ARGUMENTS }That is the reverse of the direction this PR took, which was to resolve such a name as a column. #96886 also settles the compatibility half that blocked me: "Tables whose metadata already contains such a constraint keep loading, but the same exception is raised when the constraint is compiled on So I see no remaining subject for this PR. Which do you prefer:
Nothing is pushed, and I will not push the current branch, which still implements the other direction. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
A constraint whose
INoperator had a bare identifier on the right-hand side, such asCONSTRAINT c CHECK a IN (b), silently rewrote it into a table referencedefault.band persisted it. The resulting table rejected everyINSERTwithUNKNOWN_IDENTIFIER, and the server refused to start once the referenced column was dropped. Such a constraint is now rejected withBAD_ARGUMENTSwhen it is supplied byCREATE TABLE, a full-definitionATTACH TABLE, orALTER TABLE ... ADD/MODIFY CONSTRAINT, and when it is copied byCREATE TABLE ... ASorCLONE AS. Existing tables keep loading.Description
AddDefaultDatabaseVisitorturns anINright-hand side into a table identifier: correct in a SELECT, wherex IN tis shorthand forx IN (SELECT * FROM t), wrong for a constraint evaluated against the inserted row. The rewritten AST is persisted.Measured on master for
CHECK a IN (b)withba column:SHOW CREATEreportsIN (default.b), a constraint the user never wrote, and everyINSERTfailsCode: 47 UNKNOWN_IDENTIFIER. Dropping that column makes the metadata unloadable, fatal at startup.Found on
Stress test (amd_msan)in three unrelated PRs, as the fuzzer's operand-swapped mutation of02841_not_ready_set_constraints.This adds
checkConstraintExpressionIsValid, mirroring #107424's key-expression check, applied only to user-supplied DDL. The recursion stops at subquery boundaries, soIN <table>inside a subquery keeps working.Cases found in review.
CREATE TABLE ... AS srcandCLONE AS srcparse no declaration; they copy the source constraints, which go through the same gate. AnALTERstoring no declaration (ADD ... IF NOT EXISTSon an existing name,MODIFY ... IF EXISTSon a missing one) stays accepted as on master.What this removes. Where the identifier names an existing table the constraint worked only in the process that parsed the DDL: the load path never applies that visitor, so after a restart
INSERTfailsUNKNOWN_IDENTIFIER. I reject it rather than keep a form that write-deads a table at the next restart. Tell me if you would rather keep it.Residual, not mine. #117267's row-count check next to mine keys off
mode, not provenance:RESTOREof a backup holdingCHECK arrayJoin(...)fails, andAS/CLONE AScopies such a constraint unchecked. Both measured in the review threads, reproducing without this diff.Unlike #107424 I do not reject at load time: such metadata exists in the wild. Existing tables keep loading, stay ALTER-able including
DROP CONSTRAINT, and Replicated databases still recover them.Workflow [PR]
Sync PR [sync-upstream/pr/112992]