I don’t think it’ll surprise anybody if I say that MariaDB or
MySQL server knows a lot more about server system variables, then
just their values. Indeed, every variable can be session or
global only, read-only or writable, it has an associated help
text (that is printed on mysqld --help --verbose),
certain variables only accept values from a given set of strings
(this set of allowed values is also printed in mysqld
--help --verbose since MariaDB 10.1.0), numeric variables
have lower and upper range boundaries of valid values (that are
never printed anywhere), and so on. I always thought it’s kind of
a waste that there is no way to query this information. That
could’ve been very convenient, in particular for various GUI
clients — they could show the help in tooltips, validate values
and so on.
But recently we’ve got our users asking for it — precisely, for system variable metadata, whether a variable …
[Read more]