Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.6
On MariaDB 10.5 the mysql.global_priv table has following definition:
MariaDB [(none)]> desc mysql.global_priv;
+-------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| Host | char ( 60 ) | NO | PRI | | |
| User | char ( 80 ) | NO | PRI | | |
| Priv | longtext | NO | | '{}' | |
+-------+----------+------+-----+---------+-------+
3 rows in set ( 0.001 sec)
MariaDB 10.6 has:
MariaDB [mysql]> desc mysql.global_priv;
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| Host | char ( 255 ) | NO | PRI | | |
| User | char ( 128 ) | NO | PRI | | |
| Priv | longtext | NO | | '{}' | |
+-------+-----------+------+-----+---------+-------+
3 rows in set ( 0 , 005 sec)
After updating 10.5 to 10.6 the mysql_upgrade tool is not modifying, as expected on 10.6, the global_priv ARIA table.
it is executing following statements keeping the 10.5 definition:
CREATE TABLE IF NOT EXISTS global_priv (Host char ( 255 ) binary DEFAULT '' , User char ( 128 ) binary DEFAULT '' , Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY (Host,User)) engine=Aria transactional= 1 CHARACTER SET utf8mb3 COLLATE utf8mb3_bin comment= 'Users and global privileges'
CREATE DEFINER= 'mariadb.sys' @ 'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS .....
Also, it is running many ALTERs/UPDATEs on user VIEW, which fail for obvious reasons, such as:
ALTER TABLE user MODIFY Host char ( 255 ) NOT NULL default '' , MODIFY User char ( 128 ) binary NOT NULL default '' , ENGINE=Aria, CONVERT TO CHARACTER SET utf8mb3 COLLATE utf8mb3_bin
UPDATE user LEFT JOIN db USING (Host,User) SET Create_user_priv= 'Y' WHERE @hadCreateUserPriv = 0 AND (user.Grant_priv = 'Y' OR db.Grant_priv = 'Y' )
Also, maybe there is an error in the script 'script/mysql_system_tables_fix.sql' on query:
IF 1 = (
SELECT count(*) FROM information_schema.VIEWS
WHERE
TABLE_CATALOG = 'def' and
TABLE_SCHEMA = 'mysql' and
TABLE_NAME= 'user' and
(DEFINER = 'root@localhost' or (DEFINER = 'mariadb.sys@localhost' and VIEW_DEFINITION LIKE "%'N' AS `password_expired`%" ))
) THEN
DROP VIEW IF EXISTS mysql.user;
given the `password_expired` column definition on VIEW user:
if (ifnull(json_value(`global_priv`.`Priv`, '$.password_last_changed' ), 1 ) = 0 , 'Y' , 'N' ) AS `password_expired`
Is it correct to say that there is a parenthesis missing after the 'N' on LIKE condition?
I mean, probably should be:
VIEW_DEFINITION LIKE "%'N') AS `password_expired`%" )
it seems this issue is related to tables/view having a 'user' and/or 'host' columns:
mysql.user
mysql.global_priv
mysql.procs_priv
mysql.proxies_priv
mysql.roles_mapping
{"report":{"fcp":1235.9000000953674,"ttfb":298.3000000715256,"pageVisibility":"visible","entityId":128438,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"871efd0d-8f0c-4e85-b054-4e809d2d0c4d","navigationType":0,"readyForUser":1324.7000000476837,"redirectCount":0,"resourceLoadedEnd":1642.9000000953674,"resourceLoadedStart":304.3000000715256,"resourceTiming":[{"duration":371.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":304.3000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":676.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":371.8000000715256,"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":304.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":676.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":410.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":304.7000000476837,"connectEnd":304.7000000476837,"connectStart":304.7000000476837,"domainLookupEnd":304.7000000476837,"domainLookupStart":304.7000000476837,"fetchStart":304.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":304.7000000476837,"responseEnd":715.5,"responseStart":715.5,"secureConnectionStart":304.7000000476837},{"duration":494.5,"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":304.90000009536743,"connectEnd":304.90000009536743,"connectStart":304.90000009536743,"domainLookupEnd":304.90000009536743,"domainLookupStart":304.90000009536743,"fetchStart":304.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":304.90000009536743,"responseEnd":799.4000000953674,"responseStart":799.4000000953674,"secureConnectionStart":304.90000009536743},{"duration":498.8000000715256,"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":305,"connectEnd":305,"connectStart":305,"domainLookupEnd":305,"domainLookupStart":305,"fetchStart":305,"redirectEnd":0,"redirectStart":0,"requestStart":305,"responseEnd":803.8000000715256,"responseStart":803.8000000715256,"secureConnectionStart":305},{"duration":499.1999999284744,"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":305.3000000715256,"connectEnd":305.3000000715256,"connectStart":305.3000000715256,"domainLookupEnd":305.3000000715256,"domainLookupStart":305.3000000715256,"fetchStart":305.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":305.3000000715256,"responseEnd":804.5,"responseStart":804.5,"secureConnectionStart":305.3000000715256},{"duration":499.6999999284744,"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":305.40000009536743,"connectEnd":305.40000009536743,"connectStart":305.40000009536743,"domainLookupEnd":305.40000009536743,"domainLookupStart":305.40000009536743,"fetchStart":305.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":305.40000009536743,"responseEnd":805.1000000238419,"responseStart":805.1000000238419,"secureConnectionStart":305.40000009536743},{"duration":552.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":305.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":305.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":858.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":499.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":305.8000000715256,"connectEnd":305.8000000715256,"connectStart":305.8000000715256,"domainLookupEnd":305.8000000715256,"domainLookupStart":305.8000000715256,"fetchStart":305.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":305.8000000715256,"responseEnd":805.7000000476837,"responseStart":805.7000000476837,"secureConnectionStart":305.8000000715256},{"duration":552.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":306,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":306,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":858.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":500.3000000715256,"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":306.10000002384186,"connectEnd":306.10000002384186,"connectStart":306.10000002384186,"domainLookupEnd":306.10000002384186,"domainLookupStart":306.10000002384186,"fetchStart":306.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":306.10000002384186,"responseEnd":806.4000000953674,"responseStart":806.4000000953674,"secureConnectionStart":306.10000002384186},{"duration":1335.1000000238419,"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":307.2000000476837,"connectEnd":307.2000000476837,"connectStart":307.2000000476837,"domainLookupEnd":307.2000000476837,"domainLookupStart":307.2000000476837,"fetchStart":307.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":307.2000000476837,"responseEnd":1642.3000000715256,"responseStart":1642.3000000715256,"secureConnectionStart":307.2000000476837},{"duration":1335.6000000238419,"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":307.3000000715256,"connectEnd":307.3000000715256,"connectStart":307.3000000715256,"domainLookupEnd":307.3000000715256,"domainLookupStart":307.3000000715256,"fetchStart":307.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":307.3000000715256,"responseEnd":1642.9000000953674,"responseStart":1642.9000000953674,"secureConnectionStart":307.3000000715256},{"duration":164.39999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":870.1000000238419,"connectEnd":870.1000000238419,"connectStart":870.1000000238419,"domainLookupEnd":870.1000000238419,"domainLookupStart":870.1000000238419,"fetchStart":870.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":870.1000000238419,"responseEnd":1034.5,"responseStart":1034.5,"secureConnectionStart":870.1000000238419}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":129,"responseStart":298,"responseEnd":304,"domLoading":302,"domInteractive":1664,"domContentLoadedEventStart":1664,"domContentLoadedEventEnd":1709,"domComplete":2952,"loadEventStart":2952,"loadEventEnd":2953,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1645.7000000476837},{"name":"bigPipe.sidebar-id.end","time":1646.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1646.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1649},{"name":"activityTabFullyLoaded","time":1716.2000000476837}],"measures":[],"correlationId":"3b764b375ed582","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}