Bug #117738 ALTER TABLE <table> ALTER INDEX <index> VISIBLE/INVISIBLE not supported by ALGORITHM=INSTANT
Submitted: 18 Mar 11:23 Modified: 19 Mar 6:54
Reporter: Matthias Crauwels (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version:8.0 and above OS:Any
Assigned to: CPU Architecture:Any

[18 Mar 11:23] Matthias Crauwels
Description:
Making an index VISIBLE / INVISIBLE could easily be an INSTANT DDL operation while it is not supported.

How to repeat:
mysql [localhost:8031] {msandbox} (test) > ALTER TABLE table ALTER INDEX index INVISIBLE, ALGORITHM=INSTANT;
ERROR 1845 (0A000): ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY/INPLACE.
[19 Mar 6:54] MySQL Verification Team
Hello Matthias,

Thank you for the feature request.

Quoting from manual "The ALTER INDEX operation permits an index to be made visible or invisible. An invisible index is not used by the optimizer. Modification of index visibility applies to indexes other than primary keys (either explicit or implicit), and cannot be performed using ALGORITHM=INSTANT. This feature is storage engine neutral (supported for any engine). For more information, see Section 10.3.12, “Invisible Indexes”."  see https://dev.mysql.com/doc/refman/8.0/en/alter-table.html

Related - Bug #112998

regards,
Umesh