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
[P0][bug] EXPLAIN ANALYZE MariaDB tabular output joined with newlines produces unreadable text #422
EXPLAIN ANALYZE in MariaDB returns a different shape (tabular instead of TREE text).
Problem
MariaDB's ANALYZE (without EXPLAIN prefix) returns tabular output with columns like id, select_type, table, type, … — same shape as EXPLAIN. ExplainPanel.tsx:411-460 (AnalyzeView) does result.rows.map((row) => row.map((v) => String(v ?? "")).join("\n")).join("\n") — joins all columns with newlines, producing "1\nSIMPLE\nusers\nALL\n..." instead of structured table. resultStore.ts:125 sets explainAnalyze: true for MariaDB via ANALYZE ${sql}, and AnalyzeView renders it as text. The user sees a stream of single words per line instead of the tabular form they're used to. Compare to MySQL's EXPLAIN ANALYZE FORMAT=TREE which returns a single-column text per row — that's the expected case.
EXPLAIN panel shows wall of single-word-per-line text
Expected
MariaDB ANALYZE on SELECT * FROM users LIMIT 1 shows the same tabular ExplainTable view as MySQL EXPLAIN. MySQL EXPLAIN ANALYZE FORMAT=TREE shows the existing AnalyzeView text.
Proposed fix
Detect MariaDB tabular output heuristically: if result.columns.length > 4, render with ExplainTable instead of AnalyzeView. Or strip leading -> tokens and present as a tree. Cleanest: detect via the column count (TREE format returns 1 column; tabular returns 12+). Scope: M.
Acceptance
MariaDB ANALYZE on SELECT * FROM users LIMIT 1 shows the same tabular ExplainTable view as MySQL EXPLAIN. MySQL EXPLAIN ANALYZE FORMAT=TREE shows the existing AnalyzeView text.
Activity
fix(explain): read the plan MySQL actually returns
fix(query): stop discarding the rows from ANALYZE, WITH, TABLE and VA…
fix(query): follow a CTE when deciding whether a statement returns rows
fix(explain): read the plan MySQL actually returns
fix(query): stop discarding the rows from ANALYZE, WITH, TABLE and VA…
fix(query): follow a CTE when deciding whether a statement returns rows
fix(explain): read the plan the server actually returns (#515)