dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Prevent altering table tables to have `FULLTEXT` key property

Open jycor opened this issue 2 years ago • 1 comments

We don't support FULLTEXT keys, yet, so we should prevent altering tables to have them.

These two queries should return an error:

dolt> create table t (a int primary key, b int);
dolt> alter table t modify column b int fulltext key;
dolt> create table t (a int primary key);
dolt> alter table t add column b int fulltext key;

jycor avatar Mar 31 '22 19:03 jycor

Example:

test-fk-indexes $ dolt sql -q "create table t (a int primary key, b int)"
test-fk-indexes $ dolt sql -q "alter table t modify column b int fulltext key;"
test-fk-indexes $ dolt sql -q "show create table t"
+-------+------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                           |
+-------+------------------------------------------------------------------------------------------------------------------------------------+
| t     | CREATE TABLE `t` (
  `a` int NOT NULL,
  `b` int,
  PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin |
+-------+------------------------------------------------------------------------------------------------------------------------------------+

timsehn avatar Aug 31 '22 00:08 timsehn

Resolving this in favor of #2987. We allow you to define some DDL we don't support on a table for mysqldump compatibility.

timsehn avatar Oct 04 '22 19:10 timsehn