It works as a stand alone query, or in procedures, but failed in views.
This query worked:
select * from nation n ,region r where n.n_regionkey = r.r_regionkey and r.r_regionkey in (with t as (select * from region where r_regionkey <=3) select r_regionkey from t where r_name <> "ASIA");
|
This procedure worked:
DELIMITER //
|
CREATE PROCEDURE shownations ()
|
BEGIN
|
select * from nation n ,region r where n.n_regionkey = r.r_regionkey and r.r_regionkey in (with t as (select * from region where r_regionkey <=3) select r_regionkey from t where r_name <> "ASIA");
|
END //
|
DELIMITER ;
|
|
call shownations;
|
This view did not work:
|
MariaDB [mytest]> create view v as select * from nation n ,region r where n.n_regionkey = r.r_regionkey and r.r_regionkey in (with t as (select * from region where r_regionkey <=3) select r_regionkey from t where r_name <> "ASIA");
|
Query OK, 0 rows affected (0.01 sec)
|
|
MariaDB [mytest]> select * from v;
|
ERROR 1356 (HY000): View 'mytest.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
- blocks
-
MCOL-782
Non-recursive Common Table Expressions used in view caused an error
-
-
Closed
{"report":{"fcp":1673,"ttfb":621.5999999046326,"pageVisibility":"visible","entityId":65296,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"28aef8fc-0634-4f5e-aa1b-bc7dce55ce5f","navigationType":0,"readyForUser":1761.6999998092651,"redirectCount":0,"resourceLoadedEnd":1413.9000000953674,"resourceLoadedStart":636.5,"resourceTiming":[{"duration":231.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":636.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":636.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":868.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":235.5,"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":636.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":636.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":872.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":387.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":637,"connectEnd":637,"connectStart":637,"domainLookupEnd":637,"domainLookupStart":637,"fetchStart":637,"redirectEnd":0,"redirectStart":0,"requestStart":876,"responseEnd":1024.6999998092651,"responseStart":887.6999998092651,"secureConnectionStart":637},{"duration":732.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":637.1999998092651,"connectEnd":887,"connectStart":887,"domainLookupEnd":887,"domainLookupStart":887,"fetchStart":637.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":887.1999998092651,"responseEnd":1369.6999998092651,"responseStart":937.4000000953674,"secureConnectionStart":887},{"duration":346.59999990463257,"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":637.4000000953674,"connectEnd":637.4000000953674,"connectStart":637.4000000953674,"domainLookupEnd":637.4000000953674,"domainLookupStart":637.4000000953674,"fetchStart":637.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":933.7999997138977,"responseEnd":984,"responseStart":962.5,"secureConnectionStart":637.4000000953674},{"duration":346.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":637.5999999046326,"connectEnd":637.5999999046326,"connectStart":637.5999999046326,"domainLookupEnd":637.5999999046326,"domainLookupStart":637.5999999046326,"fetchStart":637.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":936.1999998092651,"responseEnd":984.0999999046326,"responseStart":980.2999997138977,"secureConnectionStart":637.5999999046326},{"duration":346.40000009536743,"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":637.7999997138977,"connectEnd":637.7999997138977,"connectStart":637.7999997138977,"domainLookupEnd":637.7999997138977,"domainLookupStart":637.7999997138977,"fetchStart":637.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":937,"responseEnd":984.1999998092651,"responseStart":980.9000000953674,"secureConnectionStart":637.7999997138977},{"duration":295.7999997138977,"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":638,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":638,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":933.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":346.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":638.0999999046326,"connectEnd":638.0999999046326,"connectStart":638.0999999046326,"domainLookupEnd":638.0999999046326,"domainLookupStart":638.0999999046326,"fetchStart":638.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":937.0999999046326,"responseEnd":984.4000000953674,"responseStart":981.2999997138977,"secureConnectionStart":638.0999999046326},{"duration":295.6000003814697,"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":638.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":638.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":933.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":348.90000009536743,"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":638.5,"connectEnd":638.5,"connectStart":638.5,"domainLookupEnd":638.5,"domainLookupStart":638.5,"fetchStart":638.5,"redirectEnd":0,"redirectStart":0,"requestStart":937.2999997138977,"responseEnd":987.4000000953674,"responseStart":981.9000000953674,"secureConnectionStart":638.5},{"duration":756.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":644.7999997138977,"connectEnd":644.7999997138977,"connectStart":644.7999997138977,"domainLookupEnd":644.7999997138977,"domainLookupStart":644.7999997138977,"fetchStart":644.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1249.5999999046326,"responseEnd":1401.2999997138977,"responseStart":1386,"secureConnectionStart":644.7999997138977},{"duration":769,"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":644.9000000953674,"connectEnd":644.9000000953674,"connectStart":644.9000000953674,"domainLookupEnd":644.9000000953674,"domainLookupStart":644.9000000953674,"fetchStart":644.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1401.9000000953674,"responseEnd":1413.9000000953674,"responseStart":1413.1999998092651,"secureConnectionStart":644.9000000953674},{"duration":221.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1190.2999997138977,"connectEnd":1190.2999997138977,"connectStart":1190.2999997138977,"domainLookupEnd":1190.2999997138977,"domainLookupStart":1190.2999997138977,"fetchStart":1190.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1363.5999999046326,"responseEnd":1411.5999999046326,"responseStart":1410.9000000953674,"secureConnectionStart":1190.2999997138977}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":462,"responseStart":622,"responseEnd":641,"domLoading":627,"domInteractive":1846,"domContentLoadedEventStart":1846,"domContentLoadedEventEnd":1900,"domComplete":2604,"loadEventStart":2604,"loadEventEnd":2610,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1823.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1824.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1824.2999997138977},{"name":"bigPipe.activity-panel-pipe-id.end","time":1826.5999999046326},{"name":"activityTabFullyLoaded","time":1916.5999999046326}],"measures":[],"correlationId":"3840449d4a9e7a","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":92,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
A fix for this bug was pushed into the 10.2 tree.