Creating a view with a definer that does not exists can block a SHOW TABLE STATUS for the whole database if a GROUP BY is used on the view :
MariaDB [test2]> CREATE TABLE `testtable` (
|
-> `id` int(11) NOT NULL AUTO_INCREMENT,
|
-> PRIMARY KEY (`id`)
|
-> );
|
Query OK, 0 rows affected (0.01 sec)
|
|
MariaDB [test2]> SHOW TABLE STATUS;
|
+-----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
|
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
|
+-----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
|
| testtable | InnoDB | 10 | Compact | 0 | 0 | 16384 | 0 | 0 | 0 | 1 | 2014-01-22 19:29:18 | NULL | NULL | latin1_swedish_ci | NULL | | |
|
+-----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
|
1 row in set (0.00 sec)
|
|
MariaDB [test2]> CREATE DEFINER=`unknownuser`@`%` SQL SECURITY DEFINER VIEW `testview` AS SELECT testtable.id FROM testtable GROUP BY testtable.id;
|
Query OK, 0 rows affected, 1 warning (0.00 sec)
|
|
MariaDB [test2]> SHOW WARNINGS;
|
+-------+------+--------------------------------------------------------------------+
|
| Level | Code | Message |
|
+-------+------+--------------------------------------------------------------------+
|
| Note | 1449 | The user specified as a definer ('unknownuser'@'%') does not exist |
|
+-------+------+--------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
|
MariaDB [test2]> SHOW TABLE STATUS;
|
ERROR 1143 (42000): SELECT command denied to user ''@'%' for column 'id' in table 'testtable'
|
MariaDB [test2]> SHOW WARNINGS;
|
+-------+------+---------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+-------+------+---------------------------------------------------------------------------+
|
| Error | 1143 | SELECT command denied to user ''@'%' for column 'id' in table 'testtable' |
|
| Note | 1449 | The user specified as a definer ('unknownuser'@'%') does not exist |
|
+-------+------+---------------------------------------------------------------------------+
|
2 rows in set (0.00 sec)
|
|
MariaDB [test2]> SELECT USER();
|
+----------------+
|
| USER() |
|
+----------------+
|
| root@localhost |
|
+----------------+
|
1 row in set (0.00 sec)
|
The error message when the "SHOW TABLE STATUS" is issued is not clear, it should ideally reference to the incorrectly defined view and to the non-existing definer.
ps: the same happens with ROUTINES/PROCEDURES.
{"report":{"fcp":994.3999996185303,"ttfb":252.30000019073486,"pageVisibility":"visible","entityId":29914,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"1c1169b5-ce03-48e3-8abe-655104a2f9e2","navigationType":0,"readyForUser":1078.5,"redirectCount":0,"resourceLoadedEnd":1146.1000003814697,"resourceLoadedStart":261.1000003814697,"resourceTiming":[{"duration":195.79999923706055,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":261.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":261.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":456.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":195.9000005722046,"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":261.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":261.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":457.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":204.79999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":261.6000003814697,"connectEnd":261.6000003814697,"connectStart":261.6000003814697,"domainLookupEnd":261.6000003814697,"domainLookupStart":261.6000003814697,"fetchStart":261.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":261.6000003814697,"responseEnd":466.3999996185303,"responseStart":466.3999996185303,"secureConnectionStart":261.6000003814697},{"duration":256.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":262.19999980926514,"connectEnd":262.19999980926514,"connectStart":262.19999980926514,"domainLookupEnd":262.19999980926514,"domainLookupStart":262.19999980926514,"fetchStart":262.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":262.19999980926514,"responseEnd":518.3000001907349,"responseStart":518.3000001907349,"secureConnectionStart":262.19999980926514},{"duration":260.1000003814697,"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":262.3999996185303,"connectEnd":262.3999996185303,"connectStart":262.3999996185303,"domainLookupEnd":262.3999996185303,"domainLookupStart":262.3999996185303,"fetchStart":262.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":262.3999996185303,"responseEnd":522.5,"responseStart":522.5,"secureConnectionStart":262.3999996185303},{"duration":260.79999923706055,"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":262.6000003814697,"connectEnd":262.6000003814697,"connectStart":262.6000003814697,"domainLookupEnd":262.6000003814697,"domainLookupStart":262.6000003814697,"fetchStart":262.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":262.6000003814697,"responseEnd":523.3999996185303,"responseStart":523.3999996185303,"secureConnectionStart":262.6000003814697},{"duration":261.19999980926514,"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":262.80000019073486,"connectEnd":262.80000019073486,"connectStart":262.80000019073486,"domainLookupEnd":262.80000019073486,"domainLookupStart":262.80000019073486,"fetchStart":262.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":262.80000019073486,"responseEnd":524,"responseStart":524,"secureConnectionStart":262.80000019073486},{"duration":351.30000019073486,"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":262.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":262.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":614.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":261.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":263.1000003814697,"connectEnd":263.1000003814697,"connectStart":263.1000003814697,"domainLookupEnd":263.1000003814697,"domainLookupStart":263.1000003814697,"fetchStart":263.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":263.1000003814697,"responseEnd":524.3999996185303,"responseStart":524.3999996185303,"secureConnectionStart":263.1000003814697},{"duration":351.1000003814697,"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":263.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":263.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":614.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":261.70000076293945,"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":263.3999996185303,"connectEnd":263.3999996185303,"connectStart":263.3999996185303,"domainLookupEnd":263.3999996185303,"domainLookupStart":263.3999996185303,"fetchStart":263.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":263.3999996185303,"responseEnd":525.1000003814697,"responseStart":525.1000003814697,"secureConnectionStart":263.3999996185303},{"duration":475.19999980926514,"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":271.6000003814697,"connectEnd":271.6000003814697,"connectStart":271.6000003814697,"domainLookupEnd":271.6000003814697,"domainLookupStart":271.6000003814697,"fetchStart":271.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":271.6000003814697,"responseEnd":746.8000001907349,"responseStart":746.8000001907349,"secureConnectionStart":271.6000003814697},{"duration":861.3999996185303,"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":284.1000003814697,"connectEnd":284.1000003814697,"connectStart":284.1000003814697,"domainLookupEnd":284.1000003814697,"domainLookupStart":284.1000003814697,"fetchStart":284.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":284.1000003814697,"responseEnd":1145.5,"responseStart":1145.5,"secureConnectionStart":284.1000003814697},{"duration":124.89999961853027,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":628.1000003814697,"connectEnd":628.1000003814697,"connectStart":628.1000003814697,"domainLookupEnd":628.1000003814697,"domainLookupStart":628.1000003814697,"fetchStart":628.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":628.1000003814697,"responseEnd":753,"responseStart":753,"secureConnectionStart":628.1000003814697},{"duration":255.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":890.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":890.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1146.1000003814697,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":94,"responseStart":252,"responseEnd":284,"domLoading":256,"domInteractive":1166,"domContentLoadedEventStart":1166,"domContentLoadedEventEnd":1208,"domComplete":2306,"loadEventStart":2306,"loadEventEnd":2308,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1149.5},{"name":"bigPipe.sidebar-id.end","time":1150.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1150.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1153},{"name":"activityTabFullyLoaded","time":1214.3999996185303}],"measures":[],"correlationId":"d7843e7ce65fdb","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":89,"dbReadsTimeInMs":9,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}