| Bug #83557 | Can't use LOCK=NONE to drop columns in table with virtual columns | ||
|---|---|---|---|
| Submitted: | 27 Oct 2016 3:08 | Modified: | 27 Oct 2016 9:02 |
| Reporter: | monty solomon | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
| Version: | 5.7.16 | OS: | CentOS |
| Assigned to: | CPU Architecture: | Any | |
[27 Oct 2016 3:08]
monty solomon
[27 Oct 2016 9:02]
MySQL Verification Team
Hello Monty, Thank you for the report and test case. Thanks, Umesh
[27 Oct 2016 9:03]
MySQL Verification Team
-- 5.7.16
mysql> create database test;
Query OK, 1 row affected (0.00 sec)
mysql> use test
Database changed
mysql> CREATE TABLE `vtest` (
-> `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-> `e` varchar(120) NOT NULL,
-> `p` char(40) NOT NULL DEFAULT '',
-> `s` char(10) DEFAULT NULL,
-> `ed` varchar(120) GENERATED ALWAYS AS (substring_index(`e`,'@',-(1))) VIRTUAL NOT NULL,
-> PRIMARY KEY (`id`),
-> UNIQUE KEY `uniq_e` (`e`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> ALTER TABLE vtest DROP COLUMN p,LOCK=NONE;
ERROR 1846 (0A000): LOCK=NONE is not supported. Reason: INPLACE ADD or DROP of virtual columns cannot be combined with other ALTER TABLE actions. Try LOCK=SHARED.
mysql> ALTER TABLE vtest DROP COLUMN p,ALGORITHM=INPLACE;
ERROR 1846 (0A000): ALGORITHM=INPLACE is not supported. Reason: INPLACE ADD or DROP of virtual columns cannot be combined with other ALTER TABLE actions. Try ALGORITHM=COPY.
mysql>
