New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REFCURSOR[] columns can be uniquely indexed and FK'd but cause unexpected errors #115701
Comments
An index on a CREATE TABLE t(a refcursor[], index (a)); It currently succeeds during creation. |
Hi @mgartner, please add branch-* labels to identify which branch(es) this release-blocker affects. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Marking as a GA-blocker for now, but this is probably unlikely to be hit. I think the fix should be easy though. |
Doesn't look like this will cause many problems besides unexpected errors:
Some of our randomized tests will probably hit this at some point, so we should fix it, but I don't think it's a blocker. |
Previously, it was possible to circumvent the check performed by `ColumnTypeIsIndexable` by wrapping a type in an array. Doing so would violate some invariants across the system and lead to undefined behavior. This commit updates `ColumnTypeIsIndexable` to unwrap array types, if necessary, to prevent invalid indexes from being created. Fixes: cockroachdb#115701 Epic: none Release note (bug fix): Indexes may no longer be created on REFCURSOR[]s columns. REFCURSOR columns themselves are not indexable.
115671: storage: populate OmitInRangefeeds in MVCC code r=RaduBerinde a=RaduBerinde This change populates the `MVCCValueHEader.OmitInRangeFeeds` flag based on the corresponding flag in the transaction. Fixes: #113634 Release note: None 115707: sql: prevent creating indexes on arrays of non-indexable types r=DrewKimball,fqazi,rafiss a=chrisseto #### ae7fbfb sql: prevent creating indexes on arrays of non-indexable types Previously, it was possible to circumvent the check performed by `ColumnTypeIsIndexable` and `ColumnTypeIsInvertedIndexable` by wrapping a type in an array. Doing so would violate some invariants across the system and lead to undefined behavior. This commit updates both `ColumnTypeIsIndexable` and `ColumnTypeIsInvertedIndexable` to unwrap array types, as necessary, to prevent invalid indexes from being created. Fixes: #115701 Epic: none Release note (bug fix): Standard and inverted indexes may no longer be created on REFCURSOR[]s columns. REFCURSOR columns themselves are not indexable. 115713: Revert "s3: disable content pre-upload checksums" r=stevendanna a=adityamaru This reverts commit 50c453a. Release note (bug fix): fixes a regression that causes uploads to object locked buckets to fail because of the absence of an MD5 hash Informs: #115602 Co-authored-by: Radu Berinde <radu@cockroachlabs.com> Co-authored-by: Chris Seto <chriskseto@gmail.com> Co-authored-by: adityamaru <adityamaru@gmail.com>
Previously, it was possible to circumvent the check performed by `ColumnTypeIsIndexable` and `ColumnTypeIsInvertedIndexable` by wrapping a type in an array. Doing so would violate some invariants across the system and lead to undefined behavior. This commit updates both `ColumnTypeIsIndexable` and `ColumnTypeIsInvertedIndexable` to unwrap array types, as necessary, to prevent invalid indexes from being created. Fixes: cockroachdb#115701 Epic: none Release note (bug fix): Standard and inverted indexes may no longer be created on REFCURSOR[]s columns. REFCURSOR columns themselves are not indexable.
Describe the problem
Currently, it's not possible to create a unique refcusor column.
Therefore it's not possible to make a foreign key between refcursors as well.
However,
recursor[]
columns can be uniquely index and foreign key'd. Though attempting to add a foreign key constraint will fail with the following error:Expected behavior
I would expect that creating a unique
refcursor[]
column would fail with the same error as a uniquerefcursor
column.Jira issue: CRDB-34159
The text was updated successfully, but these errors were encountered: