forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 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.
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters