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.
58433: sql: fix assertion failure for CREATE TABLE with duplicate index names r=postamar a=postamar Previously, since version 20.2, executing a statement such as ``` CREATE TABLE t (a INT, b INT, INDEX idx (a), INDEX idx (b)) ``` yields an assertion failure during the validation of the table descriptor. This is a regression from version 20.1 which yields a proper error: ``` ERROR: duplicate index name: "idx" ``` This patch fixes this regression and restores the original behaviour. Fixes cockroachdb#57630. Release note (bug fix): A CREATE TABLE statement with indexes with duplicate names will no longer result in an assertion failure. This bug was present since version 20.2. Co-authored-by: Marius Posta <[email protected]>
- Loading branch information
Showing
3 changed files
with
11 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
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