Type:
Task
Priority:
Critical
Resolution:
Fixed
Under terms of MDEV-21743 , we'll add new global privilege flags.
In order to help the server understand which version a privilege record was written by, let's add a new JSON field "version_id" in mysql.global_priv.priv.
So the following script:
GRANT FILE ON *.* TO user1@localhost;
SELECT Host, User , JSON_DETAILED(Priv) FROM mysql.global_priv WHERE user = 'user1' \G
returns about this output:
*************************** 1. row ***************************
Host: localhost
User: user1
JSON_DETAILED(Priv): {
"access": 512,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": 1581070979,
"version_id": 100502
}
1 row in set (0.001 sec)
Notice, the new "version_id" field in the JSON record.
The version id is needed to translate a set of bits to a set of privileges.
If the version_id JSON field is missing in a record, the server will consider that this record was created by MariaDB-10.5.1 or earlier.
As version_id is determined per record, records of different formats will co-exist in the same table without conflicts, so no mysql_upgrade execution will be needed to make the global_priv table up-to-date after upgrade to a new server version with new privilege bits defined.
If the version_id JSON field is missing in a record, the server will consider that this record was created by MariaDB-10.5.1 or earlier.
As version_id is determined per record, records of different formats will co-exist in the same table without conflicts, so no mysql_upgrade execution will be needed to make the global_priv table up-to-date after upgrade to a new server version with new privilege bits defined.
This change will also include:
Validation for the new "version_id" JSON field, to ignore records with obviously wrong version_id records.
Validation for the "access" JSON field, to ignore records when "access" has any bits set which are not known as of server version specified in version_od
Reporting ignored records to the server error log.
blocks
MDEV-21743
Split up SUPER privilege to smaller privileges
Closed
There are no comments yet on this issue.
{"report":{"fcp":1851.5,"ttfb":897.5999999046326,"pageVisibility":"visible","entityId":83143,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"52059942-393d-49ec-afc4-18927177968f","navigationType":0,"readyForUser":1945.3999998569489,"redirectCount":0,"resourceLoadedEnd":2452.2999999523163,"resourceLoadedStart":907.3999998569489,"resourceTiming":[{"duration":421.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":907.3999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":907.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1328.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":421.2999999523163,"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":907.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":907.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1329,"responseStart":0,"secureConnectionStart":0},{"duration":430.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":907.8999998569489,"connectEnd":907.8999998569489,"connectStart":907.8999998569489,"domainLookupEnd":907.8999998569489,"domainLookupStart":907.8999998569489,"fetchStart":907.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":907.8999998569489,"responseEnd":1338.0999999046326,"responseStart":1338.0999999046326,"secureConnectionStart":907.8999998569489},{"duration":487.90000009536743,"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":908.0999999046326,"connectEnd":908.0999999046326,"connectStart":908.0999999046326,"domainLookupEnd":908.0999999046326,"domainLookupStart":908.0999999046326,"fetchStart":908.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":908.0999999046326,"responseEnd":1396,"responseStart":1396,"secureConnectionStart":908.0999999046326},{"duration":491.90000009536743,"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":908.3999998569489,"connectEnd":908.3999998569489,"connectStart":908.3999998569489,"domainLookupEnd":908.3999998569489,"domainLookupStart":908.3999998569489,"fetchStart":908.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":908.3999998569489,"responseEnd":1400.2999999523163,"responseStart":1400.2999999523163,"secureConnectionStart":908.3999998569489},{"duration":492.60000014305115,"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":908.5999999046326,"connectEnd":908.5999999046326,"connectStart":908.5999999046326,"domainLookupEnd":908.5999999046326,"domainLookupStart":908.5999999046326,"fetchStart":908.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":908.5999999046326,"responseEnd":1401.2000000476837,"responseStart":1401.2000000476837,"secureConnectionStart":908.5999999046326},{"duration":493.5,"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":908.7999999523163,"connectEnd":908.7999999523163,"connectStart":908.7999999523163,"domainLookupEnd":908.7999999523163,"domainLookupStart":908.7999999523163,"fetchStart":908.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":908.7999999523163,"responseEnd":1402.2999999523163,"responseStart":1402.2999999523163,"secureConnectionStart":908.7999999523163},{"duration":586.4000000953674,"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":908.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":908.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1495.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":495.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":909.0999999046326,"connectEnd":909.0999999046326,"connectStart":909.0999999046326,"domainLookupEnd":909.0999999046326,"domainLookupStart":909.0999999046326,"fetchStart":909.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":909.0999999046326,"responseEnd":1404.2999999523163,"responseStart":1404.2999999523163,"secureConnectionStart":909.0999999046326},{"duration":586.2000000476837,"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":909.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":909.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1495.5,"responseStart":0,"secureConnectionStart":0},{"duration":495.39999985694885,"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":909.5,"connectEnd":909.5,"connectStart":909.5,"domainLookupEnd":909.5,"domainLookupStart":909.5,"fetchStart":909.5,"redirectEnd":0,"redirectStart":0,"requestStart":909.5,"responseEnd":1404.8999998569489,"responseStart":1404.8999998569489,"secureConnectionStart":909.5},{"duration":1064,"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":910.3999998569489,"connectEnd":910.3999998569489,"connectStart":910.3999998569489,"domainLookupEnd":910.3999998569489,"domainLookupStart":910.3999998569489,"fetchStart":910.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":910.3999998569489,"responseEnd":1974.3999998569489,"responseStart":1974.3999998569489,"secureConnectionStart":910.3999998569489},{"duration":1541.7999999523163,"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":910.5,"connectEnd":910.5,"connectStart":910.5,"domainLookupEnd":910.5,"domainLookupStart":910.5,"fetchStart":910.5,"redirectEnd":0,"redirectStart":0,"requestStart":910.5,"responseEnd":2452.2999999523163,"responseStart":2452.2999999523163,"secureConnectionStart":910.5},{"duration":484.7999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1508.2999999523163,"connectEnd":1508.2999999523163,"connectStart":1508.2999999523163,"domainLookupEnd":1508.2999999523163,"domainLookupStart":1508.2999999523163,"fetchStart":1508.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1508.2999999523163,"responseEnd":1993.0999999046326,"responseStart":1993.0999999046326,"secureConnectionStart":1508.2999999523163}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":722,"responseStart":897,"responseEnd":902,"domLoading":905,"domInteractive":2472,"domContentLoadedEventStart":2472,"domContentLoadedEventEnd":2527,"domComplete":3300,"loadEventStart":3300,"loadEventEnd":3301,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2456.7000000476837},{"name":"bigPipe.sidebar-id.end","time":2457.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":2457.899999856949},{"name":"bigPipe.activity-panel-pipe-id.end","time":2458.5},{"name":"activityTabFullyLoaded","time":2535.7000000476837}],"measures":[],"correlationId":"c4370470307659","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":13,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}