summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-01 17:58:32 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-02 11:03:44 +0300
commitf9ab7b473a935141f85d27994d0faf3433a73144 (patch)
tree52b60679816f7602d16f38683e605018134d7ced /mysql-test
parent43c20542ddf49fcc2d8a052122f3c6a603939af5 (diff)
downloadmariadb-git-f9ab7b473a935141f85d27994d0faf3433a73144.tar.gz
MDEV-18623 Assertion after DROP FULLTEXT INDEX and removing NOT NULL
instant_alter_column_possible(): Do not support instantaneous removal of NOT NULL if the table needs to be rebuilt for removing the hidden FTS_DOC_ID column. This is not ideal and should ultimately be fixed properly in MDEV-17459.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_bugs.result10
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_bugs.test11
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result
index 1633f11bfac..626e8ebe7d8 100644
--- a/mysql-test/suite/innodb/r/instant_alter_bugs.result
+++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result
@@ -193,3 +193,13 @@ INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL;
DROP TABLE t1;
+#
+# MDEV-18623 Assertion after DROP FULLTEXT INDEX and removing NOT NULL
+#
+CREATE TABLE t1 (c TEXT NOT NULL, FULLTEXT INDEX ftidx(c)) ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP INDEX ftidx;
+ALTER TABLE t1 MODIFY c TEXT NULL, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY c TEXT NULL;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test
index d05baf1a097..a5b1508305e 100644
--- a/mysql-test/suite/innodb/t/instant_alter_bugs.test
+++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test
@@ -205,3 +205,14 @@ INSERT INTO t1 SELECT * FROM t1;
# Exploit MDEV-17468 to force the table definition to be reloaded
ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18623 Assertion after DROP FULLTEXT INDEX and removing NOT NULL
+--echo #
+CREATE TABLE t1 (c TEXT NOT NULL, FULLTEXT INDEX ftidx(c)) ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP INDEX ftidx;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t1 MODIFY c TEXT NULL, ALGORITHM=INSTANT;
+ALTER TABLE t1 MODIFY c TEXT NULL;
+DROP TABLE t1;