grants are sorted by get_sort(), the idea is that more specific grants gets sorted (and matched) before less specific. The historical implementation is rather naïve and does not handle many cases correctly.
See linked bug reports for details.
Attachments
Issue Links
causes
MDEV-19899Multiple matching grants no longer stacked
Closed
relates to
MDEV-8269Correct fix for Bug #20181776 :- ACCESS CONTROL DOESN'T MATCH MOST SPECIFIC HOST WHEN IT CONTAINS WILDCARD
Closed
MDEV-14732mysql.db privileges evaluated on order of grants rather than hierarchically
OK to push, but please note (in the very beginning of description and well visible) that each d or h require 26 bit and u 1 bit of result. It is just for future use to avoid using "hdhd" by example of "huhu".
Maybe add counter of shifts in debug version and ASSERT that it will not move over sizeof(ulonglong) but it is if you like the idea.
Oleksandr Byelkin
added a comment - OK to push, but please note (in the very beginning of description and well visible) that each d or h require 26 bit and u 1 bit of result. It is just for future use to avoid using "hdhd" by example of "huhu".
Maybe add counter of shifts in debug version and ASSERT that it will not move over sizeof(ulonglong) but it is if you like the idea.
People
Sergei Golubchik
Sergei Golubchik
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":875.4000000953674,"ttfb":150.09999990463257,"pageVisibility":"visible","entityId":64949,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"d362919a-88dd-470e-8265-8ea7e2a33d76","navigationType":0,"readyForUser":939.9000000953674,"redirectCount":0,"resourceLoadedEnd":679.5,"resourceLoadedStart":157.40000009536743,"resourceTiming":[{"duration":92.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":157.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":157.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":250.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":94.90000009536743,"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":158.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":158.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":253.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":245.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":158.40000009536743,"connectEnd":158.40000009536743,"connectStart":158.40000009536743,"domainLookupEnd":158.40000009536743,"domainLookupStart":158.40000009536743,"fetchStart":158.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":331,"responseEnd":404.30000019073486,"responseStart":343,"secureConnectionStart":158.40000009536743},{"duration":281.2000002861023,"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":158.59999990463257,"connectEnd":158.59999990463257,"connectStart":158.59999990463257,"domainLookupEnd":158.59999990463257,"domainLookupStart":158.59999990463257,"fetchStart":158.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":335.59999990463257,"responseEnd":439.80000019073486,"responseStart":355.80000019073486,"secureConnectionStart":158.59999990463257},{"duration":196.89999961853027,"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":158.80000019073486,"connectEnd":158.80000019073486,"connectStart":158.80000019073486,"domainLookupEnd":158.80000019073486,"domainLookupStart":158.80000019073486,"fetchStart":158.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":337.80000019073486,"responseEnd":355.69999980926514,"responseStart":354.80000019073486,"secureConnectionStart":158.80000019073486},{"duration":206.5,"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":159,"connectEnd":159,"connectStart":159,"domainLookupEnd":159,"domainLookupStart":159,"fetchStart":159,"redirectEnd":0,"redirectStart":0,"requestStart":339.59999990463257,"responseEnd":365.5,"responseStart":365,"secureConnectionStart":159},{"duration":194.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":159.09999990463257,"connectEnd":340.5,"connectStart":340.5,"domainLookupEnd":340.5,"domainLookupStart":340.5,"fetchStart":159.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":340.69999980926514,"responseEnd":353.30000019073486,"responseStart":351.69999980926514,"secureConnectionStart":340.5},{"duration":180.5,"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":159.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":159.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":339.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":200,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":159.5,"connectEnd":159.5,"connectStart":159.5,"domainLookupEnd":159.5,"domainLookupStart":159.5,"fetchStart":159.5,"redirectEnd":0,"redirectStart":0,"requestStart":345,"responseEnd":359.5,"responseStart":358.19999980926514,"secureConnectionStart":159.5},{"duration":185.2000002861023,"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":159.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":159.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":344.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":206.39999961853027,"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":159.80000019073486,"connectEnd":159.80000019073486,"connectStart":159.80000019073486,"domainLookupEnd":159.80000019073486,"domainLookupStart":159.80000019073486,"fetchStart":159.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":350.90000009536743,"responseEnd":366.19999980926514,"responseStart":362.5,"secureConnectionStart":159.80000019073486},{"duration":476.7000002861023,"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":166.09999990463257,"connectEnd":166.09999990463257,"connectStart":166.09999990463257,"domainLookupEnd":166.09999990463257,"domainLookupStart":166.09999990463257,"fetchStart":166.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":490.59999990463257,"responseEnd":642.8000001907349,"responseStart":632.0999999046326,"secureConnectionStart":166.09999990463257},{"duration":513.3000001907349,"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":166.19999980926514,"connectEnd":166.19999980926514,"connectStart":166.19999980926514,"domainLookupEnd":166.19999980926514,"domainLookupStart":166.19999980926514,"fetchStart":166.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":666.6999998092651,"responseEnd":679.5,"responseStart":678.4000000953674,"secureConnectionStart":166.19999980926514},{"duration":193,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":604.3000001907349,"connectEnd":604.3000001907349,"connectStart":604.3000001907349,"domainLookupEnd":604.3000001907349,"domainLookupStart":604.3000001907349,"fetchStart":604.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":759.1999998092651,"responseEnd":797.3000001907349,"responseStart":796.5999999046326,"secureConnectionStart":604.3000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":7,"responseStart":150,"responseEnd":163,"domLoading":153,"domInteractive":996,"domContentLoadedEventStart":996,"domContentLoadedEventEnd":1038,"domComplete":1673,"loadEventStart":1673,"loadEventEnd":1674,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":976.6999998092651},{"name":"bigPipe.sidebar-id.end","time":977.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":977.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":978.5999999046326},{"name":"activityTabFullyLoaded","time":1051.9000000953674}],"measures":[],"correlationId":"f9204772bf0798","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":86,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
OK to push, but please note (in the very beginning of description and well visible) that each d or h require 26 bit and u 1 bit of result. It is just for future use to avoid using "hdhd" by example of "huhu".
Maybe add counter of shifts in debug version and ASSERT that it will not move over sizeof(ulonglong) but it is if you like the idea.