feat(mysql): visible/invisible index management for MySQL 8.0+ - #2606
Merged
openai0229 merged 12 commits intoSep 2, 2026
Merged
Conversation
Contributor
|
Follow-up review: changes requested before merge. P1: the visibility-only fast path is incomplete. |
Add `visible` field to TableIndex domain model, read the `Visible` column from SHOW INDEXES in MySQL metadata, generate INVISIBLE keyword in index DDL, and add buildAlterIndexVisibility for ALTER INDEX syntax. Frontend: add a "Visible" column to the index editor with a VISIBLE/INVISIBLE toggle, disabled for primary keys, gated to MySQL only. Test fixtures: init.sql, grants.sql, cleanup.sql, README.md under script/test-fixtures/mysql/MYSQL-OBJ-006/. Closes OtterMind#2574
Replace hardcoded INVISIBLE, ALTER INDEX strings with constants SQL_INVISIBLE and SQL_ALTER_INDEX from MysqlSqlConstants.
…ABLE buildAlterIndexVisibility was dead code: a visibility-only change fell through to DROP+ADD, rebuilding the whole index. ALTER TABLE now emits ALTER INDEX ... VISIBLE/INVISIBLE when the modified index differs from the stored one only in visibility (and is not the primary key), and falls back to the rebuild path otherwise.
Aias00
force-pushed
the
feature/mysql-invisible-index-2574
branch
from
August 21, 2026 09:38
c4e6228 to
925f102
Compare
Signed-off-by: liuhy <liuhongyu@apache.org>
Signed-off-by: liuhy <liuhongyu@apache.org>
Signed-off-by: liuhy <liuhongyu@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
visiblefield toTableIndexdomain model and read theVisiblecolumn from MySQLSHOW INDEXES(8.0+)INVISIBLEkeyword in index DDL viaMysqlIndexTypeEnum.buildIndexScript(); addbuildAlterIndexVisibility()for theALTER INDEX ... VISIBLE|INVISIBLEpathCloses #2574
Test plan
ALTER INDEX ... INVISIBLEmvn -B compilepasses for the MySQL plugin moduleeslintpasses with zero warnings