Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.7
-
None
Description
Even if ALGORITHM=DEFAULT is explicitly specified in ALTER TABLE, the variable alter_algorithm will be substituted. That variable should only be substituted when no ALGORITHM has been specified.
--source include/have_innodb.inc
|
CREATE TABLE t(id INT PRIMARY KEY, u INT UNSIGNED NOT NULL UNIQUE) |
ENGINE=InnoDB;
|
INSERT INTO t(id,u) VALUES(1,1),(2,2),(3,3); |
|
SET alter_algorithm=instant; |
ALTER TABLE t ADD COLUMN d DATETIME DEFAULT current_timestamp(); |
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
ALTER TABLE t DROP COLUMN u; |
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
ALTER TABLE t DROP COLUMN u, ALGORITHM=NOCOPY; |
# this should succeed, but currently fails!
|
ALTER TABLE t DROP COLUMN u, ALGORITHM=DEFAULT; |
DROP TABLE t; |
Attachments
Issue Links
- is caused by
-
MDEV-13134 Introduce ALTER TABLE attributes ALGORITHM=NOCOPY and ALGORITHM=INSTANT
- Closed
- relates to
-
MDEV-18570 ALGORITHM=INSTANT or NOCOPY fails to fail on MyISAM tables
- Confirmed
-
MDEV-21855 Document difference between DEFAULT and 'DEFAULT' when setting alter_algorithm or system_versioning_asof
- Closed