Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: SHOW CREATE TABLE treated unique constraints like unique indexes
``` root@localhost:26257/test> CREATE TABLE t (i INT PRIMARY KEY, j INT); CREATE TABLE root@localhost:26257/test> ALTER TABLE t ADD CONSTRAINT c UNIQUE (j); ALTER TABLE root@localhost:26257/test> CREATE UNIQUE INDEX idx ON t (j); CREATE INDEX ``` Before: ``` root@localhost:26257/test> SHOW CREATE TABLE t; table_name | create_statement -------------+------------------------------------------------ t | CREATE TABLE public.t ( | i INT8 NOT NULL, | j INT8 NULL, | CONSTRAINT "primary" PRIMARY KEY (i ASC), | UNIQUE INDEX c (j ASC), | UNIQUE INDEX idx (j ASC), | FAMILY "primary" (i, j) | ) ``` After: ``` [email protected]:55792/movr> SHOW CREATE TABLE t; table_name | create_statement -------------+------------------------------------------------ t | CREATE TABLE public.t ( | i INT8 NOT NULL, | j INT8 NULL, | CONSTRAINT "primary" PRIMARY KEY (i ASC), | UNIQUE INDEX idx (j ASC), | FAMILY "primary" (i, j), | CONSTRAINT c UNIQUE (j) | ) ``` Release note (bug fix): UNIQUE constraints were displayed as UNIQUE INDEX entries in SHOW CREATE TABLE.
- Loading branch information