You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P1][bug] TYPE_COLORS missing index_merge, fulltext, spatial, ref_or_null — renders gray with no explanation #426
ExplainPanel colour-codes EXPLAIN access types via TYPE_COLORS map.
Problem
src/components/explain/ExplainPanel.tsx:18-32 (TYPE_COLORS, TYPE_RANK) — MySQL EXPLAIN type column can be index_merge (intersection/union of multiple indexes — efficiency between range and ref), fulltext (FULLTEXT index access), spatial (spatial index), ref_or_null (ref with NULL handling). Renders as gray because TYPE_COLORS[k] is undefined → getTypeColor returns bg-gray-600/80 text-white (line 32). The legend in the toolbar shows the rank, but the rank is undefined for index_merge → sorted([undefined]) works but visually renders the legend without the type label.
Files
src/components/explain/ExplainPanel.tsx:18-32
Repro
EXPLAIN SELECT * FROM t1 USE INDEX(i1) INNER JOIN t2 USE INDEX(i2) — produces type=index_merge
EXPLAIN panel renders the badge as gray, legend doesn't list it
Expected
An index_merge EXPLAIN row shows a yellow badge labelled index_merge. The legend includes all known access types.
Proposed fix
Add index_merge: 'bg-yellow-700/80 text-white', fulltext: 'bg-purple-600/80 text-white', spatial: 'bg-pink-600/80 text-white', ref_or_null: 'bg-green-400/80 text-white' to TYPE_COLORS. Add corresponding entries to TYPE_RANK (or use a parallel ACCESS_TYPES_ORDERED array — see F15). Scope: S.
Acceptance
An index_merge EXPLAIN row shows a yellow badge labelled index_merge. The legend includes all known access types.
Activity
fix(explain): read the plan MySQL actually returns
fix(explain): read the plan MySQL actually returns
fix(explain): read the plan the server actually returns (#515)