sql: do not ignore unique partial predicate in ALTER TABLE#68629
Conversation
ajwerner
left a comment
There was a problem hiding this comment.
I'm still interested in doing something about CreatedExplictly but that can and should happen separately.
Reviewable status:
complete! 1 of 0 LGTMs obtained
ajwerner
left a comment
There was a problem hiding this comment.
One nit is that this isn't really an opt change, it's more a regular ol' sql change.
Reviewable status:
complete! 1 of 0 LGTMs obtained
Heh, a muscle-memory typo. Thanks for pointing it out. |
a3e061c to
a4a4177
Compare
|
TFTRs! bors r+ |
|
Build failed: |
|
Looks like a flake. bors r+ |
|
Build failed: |
Previously, a `WHERE` clause in `ALTER TABLE .. ADD CONSTRAINT .. UNIQUE` statements was parsed successfully but ignored so that the resulting unique constraint was not partial. This commit fixes this bug. Fixes cockroachdb#67234 Release note (bug fix): A bug has been fixed that created non-partial unique constraints when a user attempted to create a partial unique constraint in `ALTER TABLE` statements.
a4a4177 to
b829d85
Compare
|
bors r+ |
|
Build failed (retrying...): |
|
bors r- |
|
Canceled. |
|
bors r+ |
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from b829d85 to blathers/backport-release-20.2-68629: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 20.2.x failed. See errors above. error creating merge commit from b829d85 to blathers/backport-release-21.1-68629: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 21.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Previously, a
WHEREclause inALTER TABLE .. ADD CONSTRAINT .. UNIQUEstatements was parsed successfully but ignored so that the resulting
unique constraint was not partial. This commit fixes this bug.
Fixes #67234
Release note (bug fix): A bug has been fixed that created non-partial
unique constraints when a user attempted to create a partial unique
constraint in
ALTER TABLEstatements.