Open nicktobey opened 4 weeks ago
To reproduce:
create table t(a int primary key, b int generated always as (a*a), unique key (b)); show create table t;
Result:
+-------+------------------------------------------------------------------+ | Table | Create Table | +-------+------------------------------------------------------------------+ | t | CREATE TABLE `t` ( | | | `a` int NOT NULL, | | | `b` int GENERATED ALWAYS AS ((`a` * `a`)), | | | PRIMARY KEY (`a`) | | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin | +-------+------------------------------------------------------------------+
The index is present, and functions, as seen here:
> insert into t(a) values (2), (-2); duplicate unique key given: [4]
But it is omitted from SHOW CREATE statements. This happens both in Dolt and in GMS.
SHOW CREATE
Of note, this only happens with virtual generated columns. Indexes on stored generated columns display as normal.
To reproduce:
Result:
The index is present, and functions, as seen here:
But it is omitted from
SHOW CREATE
statements. This happens both in Dolt and in GMS.