[MDEV-30228] For system variables defined NO_CMD_LINE that have manually-defined configuration options, information_schema.SYSTEM_VARIABLES is incorrect Created: 2022-12-14 Updated: 2023-11-28 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Information Schema, Variables |
| Affects Version/s: | 10.3, 10.4, 10.3.37, 10.4.27, 10.5.18, 10.6.11, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 |
| Fix Version/s: | 10.4, 10.5, 10.6, 10.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
System variables can be defined with NO_CMD_LINE, which means that they technically do not support being set in configuration files or on the command-line. However, there are several cases like this, where a command-line option is separately defined with the same name that is tied to the system variable. From a user's perspective, these system variables can be set in configuration files and on the command-line. autocommit is a system variable that falls into this category:
In these scenarios, the information_schema.SYSTEM_VARIABLES table can give bad information about the system variable. As the test below shows, this does apply to autocommit in particular, but it also probably impacts other system variables that are defined similarly, such as slave_parallel_mode. Here is a non-exhaustive list of system variables that are likely impacted:
If more are discovered, feel free to add them to the above list. Steps to reproduce1. Set autocommit=0 in a configuration file, such as /etc/my.cnf.d/z-server-no-autocommit.cnf:
2. Restart the server:
3. Connect to the server:
4. Query information_schema.SYSTEM_VARIABLES for details about the system variable:
Actual resultsHere are the results:
Expected resultsThere are a few things incorrect about the results:
For comparison, here are the results for a system variable that is handled properly:
|
| Comments |
| Comment by Geoff Montee (Inactive) [ 2023-04-24 ] |
|
As mentioned in |
| Comment by Daniel Lenski [ 2023-04-24 ] |
|
Thanks for linking As discussed there, it appears that some relevant documentation (specifically https://mariadb.com/docs/skysql-new-release-dbaas/ref/mdb/system-variables/$VARIABLE_NAME) is automatically built from INFORMATION_SCHEMA.SYSTEM_VARIABLES, and thus incorrectly reflects whether or not these parameters can be set via CLI/option-file. Other documentation (https://mariadb.com/kb/en/server-system-variables/#$VARIABLE_NAME) doesn't seem to be automatically updated and is even more inconsistent. |