Type:
Task
Priority:
Major
Resolution:
Fixed
Currently MariaDB has a very relaxed function parameter data type control. It's only prohibited to pass a ROW -type value to a function expecting a scalar parameter, or the other way around. The responsible code resides in:
virtual Item_func::check_allowed_arg_cols(uint argno);
MariaDB has had mostly general purpose data types so far (except GEOMETRY ), so the code assumes that all data types implement all value format methods:
val_int()
val_real()
val_decimal()
val_str()
get_date()
Function parameter data type control needs some improvements, because:
Pluggable data types might not want to implement all value methods. For example, the UUID data type may not want to implement get_date() , as UUID -to-temporal conversion has no any sense.
Data type plugins might want stricter control on their function parameter data types. For example, the function GEOMEFROMTEXT(txt) returning a GEOMETRY -type value, might want to return an error at fix_fields time on attempts to pass a number (instead of a string) as a parameter txt , because the result will be NULL anyway for all possible numbers.
After introduction of the ROW -type variables (MDEV-10914 ), in some cases it's now not possible to distinguish between a scalar parameter and a ROW value with one element.
Under terms of this task we'll improve function parameter control methods:
Note, passing GEOMETRY values to functions implemented outside of item_geofunc.h will still be possible for now, e.g.:
SELECT TIMEDIFF(POINT(1,1));
This will be fixed under terms of a separate task.
There are no comments yet on this issue.
{"report":{"fcp":1178.800000011921,"ttfb":396,"pageVisibility":"visible","entityId":61359,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"2ee9ac25-0ec4-42b3-bdc5-0362dce8afbe","navigationType":0,"readyForUser":1287.5999999940395,"redirectCount":0,"resourceLoadedEnd":962.3000000119209,"resourceLoadedStart":401.40000000596046,"resourceTiming":[{"duration":229.69999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":401.40000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":401.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":631.0999999940395,"responseStart":0,"secureConnectionStart":0},{"duration":229.90000000596046,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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","startTime":401.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":401.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":631.5,"responseStart":0,"secureConnectionStart":0},{"duration":395.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":401.69999998807907,"connectEnd":401.69999998807907,"connectStart":401.69999998807907,"domainLookupEnd":401.69999998807907,"domainLookupStart":401.69999998807907,"fetchStart":401.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":633.5999999940395,"responseEnd":797.0999999940395,"responseStart":659.1999999880791,"secureConnectionStart":401.69999998807907},{"duration":511.59999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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","startTime":401.90000000596046,"connectEnd":401.90000000596046,"connectStart":401.90000000596046,"domainLookupEnd":401.90000000596046,"domainLookupStart":401.90000000596046,"fetchStart":401.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":634.8000000119209,"responseEnd":913.5,"responseStart":666.5,"secureConnectionStart":401.90000000596046},{"duration":268,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":402.09999999403954,"connectEnd":402.09999999403954,"connectStart":402.09999999403954,"domainLookupEnd":402.09999999403954,"domainLookupStart":402.09999999403954,"fetchStart":402.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":635.4000000059605,"responseEnd":670.0999999940395,"responseStart":667.5,"secureConnectionStart":402.09999999403954},{"duration":268.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":402.19999998807907,"connectEnd":402.19999998807907,"connectStart":402.19999998807907,"domainLookupEnd":402.19999998807907,"domainLookupStart":402.19999998807907,"fetchStart":402.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":635.8000000119209,"responseEnd":670.3000000119209,"responseStart":667.9000000059605,"secureConnectionStart":402.19999998807907},{"duration":269,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":402.40000000596046,"connectEnd":402.40000000596046,"connectStart":402.40000000596046,"domainLookupEnd":402.40000000596046,"domainLookupStart":402.40000000596046,"fetchStart":402.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":636.6999999880791,"responseEnd":671.4000000059605,"responseStart":668.5999999940395,"secureConnectionStart":402.40000000596046},{"duration":233.80000001192093,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":402.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":402.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":636.4000000059605,"responseStart":0,"secureConnectionStart":0},{"duration":269,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":402.69999998807907,"connectEnd":402.69999998807907,"connectStart":402.69999998807907,"domainLookupEnd":402.69999998807907,"domainLookupStart":402.69999998807907,"fetchStart":402.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":638.5999999940395,"responseEnd":671.6999999880791,"responseStart":669.4000000059605,"secureConnectionStart":402.69999998807907},{"duration":234.59999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":402.90000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":402.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":637.5,"responseStart":0,"secureConnectionStart":0},{"duration":269,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":403,"connectEnd":403,"connectStart":403,"domainLookupEnd":403,"domainLookupStart":403,"fetchStart":403,"redirectEnd":0,"redirectStart":0,"requestStart":640.3000000119209,"responseEnd":672,"responseStart":670.5,"secureConnectionStart":403},{"duration":515.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":404.19999998807907,"connectEnd":404.19999998807907,"connectStart":404.19999998807907,"domainLookupEnd":404.19999998807907,"domainLookupStart":404.19999998807907,"fetchStart":404.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":774.4000000059605,"responseEnd":919.6999999880791,"responseStart":918.5999999940395,"secureConnectionStart":404.19999998807907},{"duration":554.2000000178814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":408.09999999403954,"connectEnd":408.09999999403954,"connectStart":408.09999999403954,"domainLookupEnd":408.09999999403954,"domainLookupStart":408.09999999403954,"fetchStart":408.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":949.4000000059605,"responseEnd":962.3000000119209,"responseStart":961.6999999880791,"secureConnectionStart":408.09999999403954},{"duration":183.7999999821186,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":920.3000000119209,"connectEnd":920.3000000119209,"connectStart":920.3000000119209,"domainLookupEnd":920.3000000119209,"domainLookupStart":920.3000000119209,"fetchStart":920.3000000119209,"redirectEnd":0,"redirectStart":0,"requestStart":1069.300000011921,"responseEnd":1104.0999999940395,"responseStart":1103.300000011921,"secureConnectionStart":920.3000000119209},{"duration":115.69999998807907,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1124.5,"connectEnd":1124.5,"connectStart":1124.5,"domainLookupEnd":1124.5,"domainLookupStart":1124.5,"fetchStart":1124.5,"redirectEnd":0,"redirectStart":0,"requestStart":1205.699999988079,"responseEnd":1240.199999988079,"responseStart":1239.5999999940395,"secureConnectionStart":1124.5},{"duration":215,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1173.0999999940395,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1173.0999999940395,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1388.0999999940395,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":203,"responseStart":396,"responseEnd":401,"domLoading":399,"domInteractive":1340,"domContentLoadedEventStart":1341,"domContentLoadedEventEnd":1385,"domComplete":1772,"loadEventStart":1772,"loadEventEnd":1773,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1324.9000000059605},{"name":"bigPipe.sidebar-id.end","time":1325.5999999940395},{"name":"bigPipe.activity-panel-pipe-id.start","time":1325.800000011921},{"name":"bigPipe.activity-panel-pipe-id.end","time":1326.199999988079},{"name":"activityTabFullyLoaded","time":1392.199999988079}],"measures":[],"correlationId":"f75d3fd2207e08","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":128,"dbReadsTimeInMs":17,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}