Skip to content

Implement #19613 - Support invisible indexes (MySQL 8.0+)#20290

Open
predictor2718 wants to merge 1 commit into
phpmyadmin:masterfrom
predictor2718:feature/19613-invisible-indexes
Open

Implement #19613 - Support invisible indexes (MySQL 8.0+)#20290
predictor2718 wants to merge 1 commit into
phpmyadmin:masterfrom
predictor2718:feature/19613-invisible-indexes

Conversation

@predictor2718

@predictor2718 predictor2718 commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Closes #19613.

Adds VISIBLE / INVISIBLE support (MySQL 8.0+) to index creation and editing.

  • Index model gets isVisible(), populated from the Visible column of
    SHOW INDEXES and from form POST.
  • A Visibility dropdown shows up in the index form's advanced options.
  • The index list (standalone, structure tab, data dictionary) gains a Visible
    column.
  • Indexes::getSqlQueryForIndexCreateOrEdit() emits the visibility via a
    separate ALTER TABLE ... ALTER INDEX x VISIBLE/INVISIBLE statement
    appended to the main ALTER. An inline keyword on the compound
    DROP INDEX, ADD INDEX is unreliable: MySQL silently ignores VISIBLE in
    certain option positions, so the new index inherits the dropped index's
    visibility. The separate ALTER INDEX always applies cleanly.
    IndexesController runs the multi-statement SQL via tryMultiQuery.
  • Primary keys never get the visibility keyword (MySQL rejects an invisible
    primary key).
  • Tests cover model parsing, SQL emission for create/edit/visible/invisible/PRIMARY.

Verified end-to-end against MySQL 8.0.46 (create + both edit directions).

Signed-off-by: predictor2718 245527909+predictor2718@users.noreply.github.com

Screenshot 2026-04-26 105018

Signed-off-by: Nicolai Ehrhardt <245527909+predictor2718@users.noreply.github.com>
@predictor2718 predictor2718 force-pushed the feature/19613-invisible-indexes branch from ef85f62 to 865af21 Compare April 26, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Invisible Indexes

1 participant