Type:
Task
Priority:
Major
Resolution:
Fixed
In many places in Item::get_date() we use current_thd. After adding of MDEV-16991 , access to THD will be needed at every call of get_date(), to check rounding mode from thd->variables.
To avoid heavy use of current_thd, we'll add a THD* parameter to Item::get_date().
Also, at the same time, we'll change "ulonglong fuzzydate" to "date_mode_t fuzzydate".
After this change, the definition of Item::get_date() will look like this:
virtual bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)= 0;
Where date_mode_t :
will have stricter data type control, so an attempt to pass to Item::get_date() an arbitrary integer value (instead of date_mode_t ) won't compile
will have a enum-based storage, so in gdb we can see easy readable values instead of integers:
Breakpoint 1, Item_date_typecast::get_date (this=0x7ffe6c016158, thd=
0x7ffe6c000b00, ltime=0x7ffff0c1d8f8, fuzzydate=...)
at /home/bar/maria-git/server.10.4.get_date/sql/item_timefunc.cc:2452
2452 date_mode_t tmp= (fuzzydate | sql_mode_for_dates(thd)) & ~TIME_TIME_ONLY;
(gdb) p fuzzydate
$1 = {
m_mode = (date_mode_t::NO_ZERO_IN_DATE | date_mode_t::NO_ZERO_DATE | date_mode_t::INVALID_DATES)}
We'll also change a number of other dependency functions and methods to get "date_mode_t fuzzydate" instead of "ulonglong fuzzydate".
There are no comments yet on this issue.
{"report":{"fcp":951.3000001907349,"ttfb":252,"pageVisibility":"visible","entityId":70000,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"952976f1-a071-4039-a56f-08c4bc7bbc27","navigationType":0,"readyForUser":1026.4000000953674,"redirectCount":0,"resourceLoadedEnd":976.7000000476837,"resourceLoadedStart":257.5,"resourceTiming":[{"duration":165.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":257.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":257.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":422.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":165.40000009536743,"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":257.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":257.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":423.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":188,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":258.10000014305115,"connectEnd":258.10000014305115,"connectStart":258.10000014305115,"domainLookupEnd":258.10000014305115,"domainLookupStart":258.10000014305115,"fetchStart":258.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":258.10000014305115,"responseEnd":446.10000014305115,"responseStart":446.10000014305115,"secureConnectionStart":258.10000014305115},{"duration":251.79999995231628,"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":258.30000019073486,"connectEnd":258.30000019073486,"connectStart":258.30000019073486,"domainLookupEnd":258.30000019073486,"domainLookupStart":258.30000019073486,"fetchStart":258.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":258.30000019073486,"responseEnd":510.10000014305115,"responseStart":510.10000014305115,"secureConnectionStart":258.30000019073486},{"duration":256.09999990463257,"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":258.40000009536743,"connectEnd":258.40000009536743,"connectStart":258.40000009536743,"domainLookupEnd":258.40000009536743,"domainLookupStart":258.40000009536743,"fetchStart":258.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":258.40000009536743,"responseEnd":514.5,"responseStart":514.5,"secureConnectionStart":258.40000009536743},{"duration":256.2999999523163,"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":258.7000000476837,"connectEnd":258.7000000476837,"connectStart":258.7000000476837,"domainLookupEnd":258.7000000476837,"domainLookupStart":258.7000000476837,"fetchStart":258.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":258.7000000476837,"responseEnd":515,"responseStart":515,"secureConnectionStart":258.7000000476837},{"duration":256.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":258.90000009536743,"connectEnd":258.90000009536743,"connectStart":258.90000009536743,"domainLookupEnd":258.90000009536743,"domainLookupStart":258.90000009536743,"fetchStart":258.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":258.90000009536743,"responseEnd":515.3000001907349,"responseStart":515.3000001907349,"secureConnectionStart":258.90000009536743},{"duration":332.2000000476837,"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":259.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":259.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":591.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":256.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":259.2000000476837,"connectEnd":259.2000000476837,"connectStart":259.2000000476837,"domainLookupEnd":259.2000000476837,"domainLookupStart":259.2000000476837,"fetchStart":259.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":259.2000000476837,"responseEnd":515.8000001907349,"responseStart":515.8000001907349,"secureConnectionStart":259.2000000476837},{"duration":332.2000000476837,"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":259.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":259.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":591.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":256.60000014305115,"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":259.7000000476837,"connectEnd":259.7000000476837,"connectStart":259.7000000476837,"domainLookupEnd":259.7000000476837,"domainLookupStart":259.7000000476837,"fetchStart":259.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":259.7000000476837,"responseEnd":516.3000001907349,"responseStart":516.3000001907349,"secureConnectionStart":259.7000000476837},{"duration":349.7000000476837,"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":265.60000014305115,"connectEnd":265.60000014305115,"connectStart":265.60000014305115,"domainLookupEnd":265.60000014305115,"domainLookupStart":265.60000014305115,"fetchStart":265.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":265.60000014305115,"responseEnd":615.3000001907349,"responseStart":615.3000001907349,"secureConnectionStart":265.60000014305115},{"duration":380,"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":265.60000014305115,"connectEnd":265.60000014305115,"connectStart":265.60000014305115,"domainLookupEnd":265.60000014305115,"domainLookupStart":265.60000014305115,"fetchStart":265.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":265.60000014305115,"responseEnd":645.6000001430511,"responseStart":645.6000001430511,"secureConnectionStart":265.60000014305115},{"duration":26,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":620,"connectEnd":620,"connectStart":620,"domainLookupEnd":620,"domainLookupStart":620,"fetchStart":620,"redirectEnd":0,"redirectStart":0,"requestStart":620,"responseEnd":646,"responseStart":646,"secureConnectionStart":620},{"duration":326.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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&whisper-enabled=true","startTime":650,"connectEnd":650,"connectStart":650,"domainLookupEnd":650,"domainLookupStart":650,"fetchStart":650,"redirectEnd":0,"redirectStart":0,"requestStart":650,"responseEnd":976.7000000476837,"responseStart":976.7000000476837,"secureConnectionStart":650},{"duration":131.29999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":944.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":944.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1076.1000001430511,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":101,"responseStart":252,"responseEnd":262,"domLoading":256,"domInteractive":1086,"domContentLoadedEventStart":1086,"domContentLoadedEventEnd":1134,"domComplete":1453,"loadEventStart":1453,"loadEventEnd":1454,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1063.6000001430511},{"name":"bigPipe.sidebar-id.end","time":1064.6000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":1064.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1065.2000000476837},{"name":"activityTabFullyLoaded","time":1141.5}],"measures":[],"correlationId":"b7d157d77c4319","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":14,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}