Skip to content

feat(admin): edit a server variable in place - #623

Merged
EVWorth merged 1 commit into
mainfrom
feat/admin-variable-editing
Sep 10, 2026
Merged

EVWorth merged 1 commit into
mainfrom
feat/admin-variable-editing

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Closes #438.

Values were read-only text with no descriptions, so changing a variable meant leaving the panel.

The issue names a source that doesn't have descriptions

It says descriptions come from performance_schema.variables_info. On MySQL 8.0.46 that table carries VARIABLE_SOURCE, MIN_VALUE, MAX_VALUE, SET_TIME, SET_USER — and no prose at all. MySQL doesn't expose variable documentation over SQL.

MariaDB does, in information_schema.SYSTEM_VARIABLES.VARIABLE_COMMENT, along with READ_ONLY.

So descriptions appear on MariaDB and are absent on MySQL rather than invented. Read-only disables editing where the server reports it; on MySQL there's nothing to check first — it reports read-only only by failing the SET with 1238 — so the attempt is made and the refusal surfaced.

Scope is explicit about what it means

Verified on both MySQL 8.0.46 MariaDB 11
SET GLOBAL ok ok
SET SESSION ok ok
SET GLOBAL version='9' ERROR 1238 ERROR 1238
SET PERSIST ok ERROR 1064

SET GLOBAL doesn't survive a restart — the thing people are surprised by — so choosing it says so. SET PERSIST does, and is MySQL's alone, so it isn't offered on MariaDB rather than offered and then failing; MariaDB users are pointed at the config file instead.

SET GLOBAL is now a destructive statement

SET GLOBAL max_connections = 1 takes a production server down as surely as a DROP, and it's one keystroke from a session-scoped change that's harmless. Now gated — in the editor as well as this panel. SET SESSION deliberately isn't: it reaches only the connection that issued it, and prompting for ordinary work trains people to dismiss the dialog.

Also

ServerVariable is camelCase over the wire now, matching every other boundary type. One label renamed: the scope select and the button were both "Apply".

Verification

12 builder tests, 12 dialog tests, 5 safety tests. Unit 2199, browser 297, Rust + clippy clean.

FR-7.2.2 asks for inline editing of settable variables and a description for
each. Values were read-only text and there were no descriptions, so changing
a variable meant leaving the panel (#438).

The issue names performance_schema.variables_info as the source for
descriptions. It is not one: on MySQL 8.0.46 that table carries where a value
came from and its bounds, and no prose at all. MySQL does not expose variable
documentation over SQL. MariaDB does, in
information_schema.SYSTEM_VARIABLES.VARIABLE_COMMENT, along with READ_ONLY.

So descriptions appear on MariaDB and are absent on MySQL rather than
invented, and the read-only flag is used to disable editing where the server
reports it. On MySQL there is nothing to check first — it reports read-only
only by failing the SET with 1238 — so the attempt is made and the refusal
is surfaced.

Scope is a choice, and the dialog is explicit about what each one means.
SET GLOBAL does not survive a restart, which is the thing people are
surprised by, so choosing it says so. SET PERSIST does, and is MySQL's alone:
MariaDB rejects it outright, so it is not offered there rather than offered
and then failing. Verified on both.

SET GLOBAL, SET PERSIST and SET PERSIST_ONLY are now destructive statements
for the production gate. `SET GLOBAL max_connections = 1` takes a server down
as surely as a DROP, and it is one keystroke away from a session-scoped
change that is harmless. SET SESSION is deliberately not gated: it reaches
only the connection that issued it, and prompting for ordinary work trains
people to dismiss the dialog. This covers the editor as well as this panel.

ServerVariable is camelCase over the wire now, matching every other type
crossing the boundary. `name` and `value` are unaffected.

One label was renamed: the scope select and the button were both called
"Apply", which is ambiguous for anyone not reading the layout.

Closes #438

Co-Authored-By: Claude Opus 5 <[email protected]>
@EVWorth
EVWorth merged commit e593c06 into main Sep 10, 2026
12 checks passed
@EVWorth
EVWorth deleted the feat/admin-variable-editing branch September 10, 2026 13:08
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.

[P1] [doc-drift] FR-7.2.2 inline variable edit + description — unimplemented

1 participant