Type:
Task
Priority:
Major
Resolution:
Fixed
Currently there is an asymmetry in how binary comparison operators (such as = or > , etc) are implemented for temporal vs other data types.
Item_bool_rowready_func2 does not cache its constant arguments of temporal types at fix time. Instead, constant arguments are replaced to instances of Item_cache_temporal at evaluation time, when get_datetime_value() is executed for the first time.
Non-temporal types do it in a different way: constant arguments are cached at fix time, while the evaluation time code does not do any argument substitution or caching. Substitution is done in Arg_comparator::set_cmp_func_(string|int|real|decimals)() , with these two lines:
a= cache_converted_constant(thd, a, &a_cache, compare_type_handler());
b= cache_converted_constant(thd, b, &b_cache, compare_type_handler());
Under terms of this task we will change the code for the temporal data types to cache constant arguments in fix time, using cache_converted_constant() , like it is done for the other data types. Caching during evaluation time will be removed.
Rationale:
We're adding pluggable data types soon. It's better to have symmetric code, to add new data types easier.
TIMESTAMP should be fixed to do comparison in my_time_t format internally, without conversion to MYSQL_TIME (such conversion can be lossy, see MDEV-13995 ). It would be nice to make the code symmetric before fixing bugs like MDEV-13995 , for simplicity.
{"report":{"fcp":799.2000000178814,"ttfb":181.90000000596046,"pageVisibility":"visible","entityId":63475,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"aa2ee463-98c3-4e49-b7b1-41903515be65","navigationType":0,"readyForUser":867.6000000238419,"redirectCount":0,"resourceLoadedEnd":948.5,"resourceLoadedStart":187.5,"resourceTiming":[{"duration":148.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":187.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":187.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":336.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":148.69999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":187.7000000178814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":187.7000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":336.40000000596046,"responseStart":0,"secureConnectionStart":0},{"duration":157.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":187.80000001192093,"connectEnd":187.80000001192093,"connectStart":187.80000001192093,"domainLookupEnd":187.80000001192093,"domainLookupStart":187.80000001192093,"fetchStart":187.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":187.80000001192093,"responseEnd":345.30000001192093,"responseStart":345.30000001192093,"secureConnectionStart":187.80000001192093},{"duration":226.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":188,"connectEnd":188,"connectStart":188,"domainLookupEnd":188,"domainLookupStart":188,"fetchStart":188,"redirectEnd":0,"redirectStart":0,"requestStart":188,"responseEnd":414.60000002384186,"responseStart":414.60000002384186,"secureConnectionStart":188},{"duration":229.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":188.30000001192093,"connectEnd":188.30000001192093,"connectStart":188.30000001192093,"domainLookupEnd":188.30000001192093,"domainLookupStart":188.30000001192093,"fetchStart":188.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":188.30000001192093,"responseEnd":418.10000002384186,"responseStart":418.10000002384186,"secureConnectionStart":188.30000001192093},{"duration":230.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":188.5,"connectEnd":188.5,"connectStart":188.5,"domainLookupEnd":188.5,"domainLookupStart":188.5,"fetchStart":188.5,"redirectEnd":0,"redirectStart":0,"requestStart":188.5,"responseEnd":418.90000000596046,"responseStart":418.90000000596046,"secureConnectionStart":188.5},{"duration":230.7999999821186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":188.60000002384186,"connectEnd":188.60000002384186,"connectStart":188.60000002384186,"domainLookupEnd":188.60000002384186,"domainLookupStart":188.60000002384186,"fetchStart":188.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":188.60000002384186,"responseEnd":419.40000000596046,"responseStart":419.30000001192093,"secureConnectionStart":188.60000002384186},{"duration":296.40000000596046,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":188.7000000178814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":188.7000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":485.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":296.30000001192093,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":189,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":189,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":485.30000001192093,"responseStart":0,"secureConnectionStart":0},{"duration":230.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":189,"connectEnd":189,"connectStart":189,"domainLookupEnd":189,"domainLookupStart":189,"fetchStart":189,"redirectEnd":0,"redirectStart":0,"requestStart":189,"responseEnd":419.90000000596046,"responseStart":419.90000000596046,"secureConnectionStart":189},{"duration":231.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":189.2000000178814,"connectEnd":189.2000000178814,"connectStart":189.2000000178814,"domainLookupEnd":189.2000000178814,"domainLookupStart":189.2000000178814,"fetchStart":189.2000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":189.2000000178814,"responseEnd":420.60000002384186,"responseStart":420.60000002384186,"secureConnectionStart":189.2000000178814},{"duration":741.5999999940395,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":190.30000001192093,"connectEnd":190.30000001192093,"connectStart":190.30000001192093,"domainLookupEnd":190.30000001192093,"domainLookupStart":190.30000001192093,"fetchStart":190.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":190.30000001192093,"responseEnd":931.9000000059605,"responseStart":931.9000000059605,"secureConnectionStart":190.30000001192093},{"duration":743.4000000059605,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":190.5,"connectEnd":190.5,"connectStart":190.5,"domainLookupEnd":190.5,"domainLookupStart":190.5,"fetchStart":190.5,"redirectEnd":0,"redirectStart":0,"requestStart":190.5,"responseEnd":933.9000000059605,"responseStart":933.9000000059605,"secureConnectionStart":190.5},{"duration":435.7999999821186,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":496.60000002384186,"connectEnd":496.60000002384186,"connectStart":496.60000002384186,"domainLookupEnd":496.60000002384186,"domainLookupStart":496.60000002384186,"fetchStart":496.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":496.60000002384186,"responseEnd":932.4000000059605,"responseStart":932.4000000059605,"secureConnectionStart":496.60000002384186},{"duration":194,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":793.2000000178814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":793.2000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":987.2000000178814,"responseStart":0,"secureConnectionStart":0},{"duration":12.399999976158142,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":936.1000000238419,"connectEnd":936.1000000238419,"connectStart":936.1000000238419,"domainLookupEnd":936.1000000238419,"domainLookupStart":936.1000000238419,"fetchStart":936.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":936.1000000238419,"responseEnd":948.5,"responseStart":948.5,"secureConnectionStart":936.1000000238419}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":12,"responseStart":182,"responseEnd":185,"domLoading":185,"domInteractive":1008,"domContentLoadedEventStart":1008,"domContentLoadedEventEnd":1047,"domComplete":1243,"loadEventStart":1243,"loadEventEnd":1243,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":989.3000000119209},{"name":"bigPipe.sidebar-id.end","time":990.2000000178814},{"name":"bigPipe.activity-panel-pipe-id.start","time":990.3000000119209},{"name":"bigPipe.activity-panel-pipe-id.end","time":991.6000000238419},{"name":"activityTabFullyLoaded","time":1062.7000000178814}],"measures":[],"correlationId":"6f80bb04bc24f6","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":112,"dbReadsTimeInMs":23,"dbConnsTimeInMs":33,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}