Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.6
Description
If a table have partitions and you try to change a column
(modify or change) with an index, which is not the partitions key,
algorithm = instant not work.
MariaDB [l1]> ALTER online TABLE t1 MODIFY COLUMN `f4` VARCHAR(500) , ALGORITHM=INSTANT, LOCK=NONE; |
ERROR 1846 (0A000): ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY |
To reproduce:
|
|
drop table if exists t1; |
|
|
CREATE TABLE `t1` (
|
`f1` datetime ,
|
`f2` VARCHAR(2) , |
`f3` VARCHAR(200) , |
`f4` VARCHAR(100) , |
INDEX `i3` (`f4`) )
|
/*!50100 PARTITION BY RANGE COLUMNS(`f2`) (PARTITION `p_01` VALUES LESS THAN ('02') ENGINE = InnoDB, PARTITION `p_31` VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB) */; |
|
|
ALTER online TABLE t1 MODIFY COLUMN `f4` VARCHAR(500) , ALGORITHM=INSTANT, LOCK=NONE; |
If you do the testcase without index
OR !
without partition term,
it works.
Attachments
Issue Links
- relates to
-
MDEV-16282 ALTER TABLE t ADD COLUMN c INT, ADD INDEX(c), ALGORITHM=NOCOPY fails
- Stalled
-
MDEV-21693 ALGORITHM=INSTANT does not work for partitioned tables
- Closed