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:
autocommit
default_storage_engine
slave_parallel_mode
If more are discovered, feel free to add them to the above list.
Steps to reproduce
1. Set autocommit=0 in a configuration file, such as /etc/my.cnf.d/z-server-no-autocommit.cnf:
[mariadb]
autocommit=0
2. Restart the server:
$ sudo systemctl restart mariadb
3. Connect to the server:
$ sudo mariadb
4. Query information_schema.SYSTEM_VARIABLES for details about the system variable:
SELECT * FROM information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='autocommit'\G
Actual results
Here are the results:
MariaDB [(none)]> SELECT * FROM information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='autocommit'\G
VARIABLE_COMMENT: If set to 1, the default, all queries are committed immediately. If set to 0, they are only committed upon a COMMIT statement, or rolled back with a ROLLBACK statement. If autocommit is set to 0, and then changed to 1, all open transactions are immediately committed.
NUMERIC_MIN_VALUE: NULL
NUMERIC_MAX_VALUE: NULL
NUMERIC_BLOCK_SIZE: NULL
ENUM_VALUE_LIST: OFF,ON
READ_ONLY: NO
COMMAND_LINE_ARGUMENT: NULL
GLOBAL_VALUE_PATH: NULL
1 row in set (0.002 sec)
Expected results
There are a few things incorrect about the results:
GLOBAL_VALUE_ORIGIN should not be COMPILE-TIME, because that is incorrect
COMMAND_LINE_ARGUMENT should not be NULL
GLOBAL_VALUE_PATH should be /etc/my.cnf.d/z-server-no-autocommit.cnf instead of NULL
For comparison, here are the results for a system variable that is handled properly:
MariaDB [(none)]> SELECT * FROM information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='server_id'\G
As mentioned in MDEV-31109, default_storage_engine is another system variable that falls into this category.
Geoff Montee (Inactive)
added a comment - As mentioned in MDEV-31109 , default_storage_engine is another system variable that falls into this category.
Daniel Lenski (Inactive)
added a comment - Thanks for linking MDEV-31109 here, GeoffMontee .
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.
People
Oleksandr Byelkin
Geoff Montee (Inactive)
Votes:
1Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":2530.7999997138977,"ttfb":443.59999990463257,"pageVisibility":"visible","entityId":117684,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6c25dcd7-3569-4048-b72e-2500dbb4e262","navigationType":0,"readyForUser":2627.699999809265,"redirectCount":0,"resourceLoadedEnd":2003.9000000953674,"resourceLoadedStart":456.09999990463257,"resourceTiming":[{"duration":336.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":456.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":456.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":792.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":336.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":456.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":456.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":792.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":1156,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":456.59999990463257,"connectEnd":456.59999990463257,"connectStart":456.59999990463257,"domainLookupEnd":456.59999990463257,"domainLookupStart":456.59999990463257,"fetchStart":456.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":806.7999997138977,"responseEnd":1612.5999999046326,"responseStart":949.5999999046326,"secureConnectionStart":456.59999990463257},{"duration":1547.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":456.7999997138977,"connectEnd":456.7999997138977,"connectStart":456.7999997138977,"domainLookupEnd":456.7999997138977,"domainLookupStart":456.7999997138977,"fetchStart":456.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":812.5,"responseEnd":2003.9000000953674,"responseStart":955.4000000953674,"secureConnectionStart":456.7999997138977},{"duration":518.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":456.90000009536743,"connectEnd":456.90000009536743,"connectStart":456.90000009536743,"domainLookupEnd":456.90000009536743,"domainLookupStart":456.90000009536743,"fetchStart":456.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":813.5999999046326,"responseEnd":975.6999998092651,"responseStart":959.9000000953674,"secureConnectionStart":456.90000009536743},{"duration":556.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":457.09999990463257,"connectEnd":457.09999990463257,"connectStart":457.09999990463257,"domainLookupEnd":457.09999990463257,"domainLookupStart":457.09999990463257,"fetchStart":457.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":813.7999997138977,"responseEnd":1014,"responseStart":975.7999997138977,"secureConnectionStart":457.09999990463257},{"duration":560.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":457.2999997138977,"connectEnd":457.2999997138977,"connectStart":457.2999997138977,"domainLookupEnd":457.2999997138977,"domainLookupStart":457.2999997138977,"fetchStart":457.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":813.9000000953674,"responseEnd":1017.5,"responseStart":978.7999997138977,"secureConnectionStart":457.2999997138977},{"duration":335.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":457.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":457.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":792.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":559.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":457.7999997138977,"connectEnd":457.7999997138977,"connectStart":457.7999997138977,"domainLookupEnd":457.7999997138977,"domainLookupStart":457.7999997138977,"fetchStart":457.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":814.2999997138977,"responseEnd":1017.5999999046326,"responseStart":980.9000000953674,"secureConnectionStart":457.7999997138977},{"duration":334.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":457.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":457.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":792.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":632.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":458.09999990463257,"connectEnd":458.09999990463257,"connectStart":458.09999990463257,"domainLookupEnd":458.09999990463257,"domainLookupStart":458.09999990463257,"fetchStart":458.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":815,"responseEnd":1090.4000000953674,"responseStart":991.0999999046326,"secureConnectionStart":458.09999990463257},{"duration":1477.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":458.90000009536743,"connectEnd":458.90000009536743,"connectStart":458.90000009536743,"domainLookupEnd":458.90000009536743,"domainLookupStart":458.90000009536743,"fetchStart":458.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1091.5,"responseEnd":1936.4000000953674,"responseStart":1925.6999998092651,"secureConnectionStart":458.90000009536743},{"duration":1478.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":459,"connectEnd":459,"connectStart":459,"domainLookupEnd":459,"domainLookupStart":459,"fetchStart":459,"redirectEnd":0,"redirectStart":0,"requestStart":1612.4000000953674,"responseEnd":1937.2999997138977,"responseStart":1930.2999997138977,"secureConnectionStart":459},{"duration":348.2000002861023,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1850.6999998092651,"connectEnd":1850.6999998092651,"connectStart":1850.6999998092651,"domainLookupEnd":1850.6999998092651,"domainLookupStart":1850.6999998092651,"fetchStart":1850.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":2164.2999997138977,"responseEnd":2198.9000000953674,"responseStart":2197.5,"secureConnectionStart":1850.6999998092651}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":257,"responseStart":444,"responseEnd":449,"domLoading":452,"domInteractive":2730,"domContentLoadedEventStart":2730,"domContentLoadedEventEnd":2786,"domComplete":5617,"loadEventStart":5617,"loadEventEnd":5617,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2714.199999809265},{"name":"bigPipe.sidebar-id.end","time":2715.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":2715.199999809265},{"name":"bigPipe.activity-panel-pipe-id.end","time":2716.4000000953674},{"name":"activityTabFullyLoaded","time":2797.9000000953674}],"measures":[],"correlationId":"8e01926b668f06","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":102,"dbReadsTimeInMs":11,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
As mentioned in
MDEV-31109, default_storage_engine is another system variable that falls into this category.