The current workaround is to use a view that uses the stored functions to define its columns. However, this adds complexity to DB architecture by introducing a new table.
Since ensuring that virtual column definitions are deterministic is important, only stored functions marked as DETERMINISTIC should be allowed in virtual column definitions. One implementation question is whether Maria should check to enforce that the functions marked as deterministic really are as deterministic as they claim or if we leave it as the DBA's responsibility to ensure the functions they mark as deterministic really will return the same result every time they have the same inputs.
Please just leave the deterministic question to the DBA's for now so that we can get this implemented. You can add the deeper analysis later if the demand is there.
Brad Lanier
added a comment - Please just leave the deterministic question to the DBA's for now so that we can get this implemented. You can add the deeper analysis later if the demand is there.
I agree with Brad - if there is a stored function marked as deterministic, then it should be allowed to be used in a virtual column. If the function is marked as deterministic but isn't, then the output can be stale or undefined.
Duncan Bristow
added a comment - I agree with Brad - if there is a stored function marked as deterministic, then it should be allowed to be used in a virtual column. If the function is marked as deterministic but isn't, then the output can be stale or undefined.
Any plan for this?
I agree with what has been written already - if the function is defined as deterministic then that should be enough.
If a (non)deterministic function could be identified automatically, there would be no need for the keyword in the create statement and even now the documentation specifically states that "If you declare a non-deterministic function as DETERMINISTIC, you may get incorrect results.".
Jiri Kavalik
added a comment - Any plan for this?
I agree with what has been written already - if the function is defined as deterministic then that should be enough.
If a (non)deterministic function could be identified automatically, there would be no need for the keyword in the create statement and even now the documentation specifically states that "If you declare a non-deterministic function as DETERMINISTIC, you may get incorrect results." .
People
Unassigned
Chris J.M.
Votes:
7Vote for this issue
Watchers:
12Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":884.6999998092651,"ttfb":248,"pageVisibility":"visible","entityId":70526,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"8f62074e-9c12-44e7-8582-39abe94a0c20","navigationType":0,"readyForUser":947.1999998092651,"redirectCount":0,"resourceLoadedEnd":967.6999998092651,"resourceLoadedStart":259.5,"resourceTiming":[{"duration":97.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":259.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":259.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":356.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":97.10000038146973,"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":259.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":259.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":356.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":108.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":260,"connectEnd":260,"connectStart":260,"domainLookupEnd":260,"domainLookupStart":260,"fetchStart":260,"redirectEnd":0,"redirectStart":0,"requestStart":260,"responseEnd":368.59999990463257,"responseStart":368.59999990463257,"secureConnectionStart":260},{"duration":192.40000009536743,"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":260.09999990463257,"connectEnd":260.09999990463257,"connectStart":260.09999990463257,"domainLookupEnd":260.09999990463257,"domainLookupStart":260.09999990463257,"fetchStart":260.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":260.09999990463257,"responseEnd":452.5,"responseStart":452.5,"secureConnectionStart":260.09999990463257},{"duration":195.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":260.40000009536743,"connectEnd":260.40000009536743,"connectStart":260.40000009536743,"domainLookupEnd":260.40000009536743,"domainLookupStart":260.40000009536743,"fetchStart":260.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":260.40000009536743,"responseEnd":456.2999997138977,"responseStart":456.2999997138977,"secureConnectionStart":260.40000009536743},{"duration":196.19999980926514,"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":260.59999990463257,"connectEnd":260.59999990463257,"connectStart":260.59999990463257,"domainLookupEnd":260.59999990463257,"domainLookupStart":260.59999990463257,"fetchStart":260.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":260.59999990463257,"responseEnd":456.7999997138977,"responseStart":456.7999997138977,"secureConnectionStart":260.59999990463257},{"duration":196.30000019073486,"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":260.7999997138977,"connectEnd":260.7999997138977,"connectStart":260.7999997138977,"domainLookupEnd":260.7999997138977,"domainLookupStart":260.7999997138977,"fetchStart":260.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":260.7999997138977,"responseEnd":457.09999990463257,"responseStart":457.09999990463257,"secureConnectionStart":260.7999997138977},{"duration":251,"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":260.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":260.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":511.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":196.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":261.09999990463257,"connectEnd":261.09999990463257,"connectStart":261.09999990463257,"domainLookupEnd":261.09999990463257,"domainLookupStart":261.09999990463257,"fetchStart":261.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":261.09999990463257,"responseEnd":457.5,"responseStart":457.5,"secureConnectionStart":261.09999990463257},{"duration":250.80000019073486,"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":261.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":261.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":512.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":196.69999980926514,"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":261.40000009536743,"connectEnd":261.40000009536743,"connectStart":261.40000009536743,"domainLookupEnd":261.40000009536743,"domainLookupStart":261.40000009536743,"fetchStart":261.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":261.40000009536743,"responseEnd":458.09999990463257,"responseStart":458.09999990463257,"secureConnectionStart":261.40000009536743},{"duration":662.2000002861023,"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":266.69999980926514,"connectEnd":266.69999980926514,"connectStart":266.69999980926514,"domainLookupEnd":266.69999980926514,"domainLookupStart":266.69999980926514,"fetchStart":266.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":266.69999980926514,"responseEnd":928.9000000953674,"responseStart":928.9000000953674,"secureConnectionStart":266.69999980926514},{"duration":662.7000002861023,"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":266.69999980926514,"connectEnd":266.69999980926514,"connectStart":266.69999980926514,"domainLookupEnd":266.69999980926514,"domainLookupStart":266.69999980926514,"fetchStart":266.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":266.69999980926514,"responseEnd":929.4000000953674,"responseStart":929.4000000953674,"secureConnectionStart":266.69999980926514},{"duration":142.7999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":525.9000000953674,"connectEnd":525.9000000953674,"connectStart":525.9000000953674,"domainLookupEnd":525.9000000953674,"domainLookupStart":525.9000000953674,"fetchStart":525.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":525.9000000953674,"responseEnd":668.6999998092651,"responseStart":668.6999998092651,"secureConnectionStart":525.9000000953674},{"duration":179.5,"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":788.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":788.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":967.6999998092651,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":107,"responseStart":248,"responseEnd":261,"domLoading":258,"domInteractive":999,"domContentLoadedEventStart":999,"domContentLoadedEventEnd":1042,"domComplete":1390,"loadEventStart":1390,"loadEventEnd":1391,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":980.7999997138977},{"name":"bigPipe.sidebar-id.end","time":981.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":981.7999997138977},{"name":"bigPipe.activity-panel-pipe-id.end","time":983},{"name":"activityTabFullyLoaded","time":1059.4000000953674}],"measures":[],"correlationId":"34a1346323be92","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":86,"dbReadsTimeInMs":8,"dbConnsTimeInMs":16,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Please just leave the deterministic question to the DBA's for now so that we can get this implemented. You can add the deeper analysis later if the demand is there.