while testing , found additional bugs in current str_to_TIME()
Major :
"0000-00-00" after parsing becomes year 1970, should be 0
"0069-12-31" parses as year 1969, should be 69 (YYYY format)
the above 2 make it impossible to parse anything from years 1 AD - 70 AD (and the fake MySQLish year 0)
"69-12-31" parses as year 1969, should be 2069
Minor /debatable , differences with server
fails to parse "10:15:01." as TIME (note the trailing dot)
parses "10000-01-01", which server dismisses as incorrect date ( year > 9999)
parses time >= 839:00:00 and time <= -839:00:00, which server does not do
parses incorrect datetime "1999-12-31 834:59:59.999999" is parses as datetime, with hour = 834
server allows trailing spaces after values, but nothing else, str_to_TIME() allows anything ,except trailing dot e.g "2000-01-01a"
does not parse some formats that server can, e.g "YYYYMMDD"
Server testing is done with SELECT TIME 'string' , SELECT DATE 'string', SELECT TIMESTAMP 'string' e.g
select DATETIME '1999-12-31 834:59:59.999999';
Vladislav Vaintroub
added a comment - - edited while testing , found additional bugs in current str_to_TIME()
Major :
"0000-00-00" after parsing becomes year 1970, should be 0
"0069-12-31" parses as year 1969, should be 69 (YYYY format)
the above 2 make it impossible to parse anything from years 1 AD - 70 AD (and the fake MySQLish year 0)
"69-12-31" parses as year 1969, should be 2069
Minor /debatable , differences with server
fails to parse "10:15:01." as TIME (note the trailing dot)
parses "10000-01-01", which server dismisses as incorrect date ( year > 9999)
parses time >= 839:00:00 and time <= -839:00:00, which server does not do
parses incorrect datetime "1999-12-31 834:59:59.999999" is parses as datetime, with hour = 834
server allows trailing spaces after values, but nothing else, str_to_TIME() allows anything ,except trailing dot e.g "2000-01-01a"
does not parse some formats that server can, e.g "YYYYMMDD"
Server testing is done with SELECT TIME 'string' , SELECT DATE 'string', SELECT TIMESTAMP 'string' e.g
select DATETIME '1999-12-31 834:59:59.999999' ;
People
Vladislav Vaintroub
Vladislav Vaintroub
Votes:
1Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":817,"ttfb":231.80000007152557,"pageVisibility":"visible","entityId":70683,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"ddff64f5-03b7-4360-8e78-466b3509f6c0","navigationType":0,"readyForUser":870.1000000238419,"redirectCount":0,"resourceLoadedEnd":667.5,"resourceLoadedStart":239,"resourceTiming":[{"duration":88.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":239,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":327.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":88.39999997615814,"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":239.30000007152557,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.30000007152557,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":327.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":130.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":239.5,"connectEnd":239.5,"connectStart":239.5,"domainLookupEnd":239.5,"domainLookupStart":239.5,"fetchStart":239.5,"redirectEnd":0,"redirectStart":0,"requestStart":331.5,"responseEnd":370.40000009536743,"responseStart":342.40000009536743,"secureConnectionStart":239.5},{"duration":143.20000004768372,"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":239.5,"connectEnd":239.5,"connectStart":239.5,"domainLookupEnd":239.5,"domainLookupStart":239.5,"fetchStart":239.5,"redirectEnd":0,"redirectStart":0,"requestStart":332.60000002384186,"responseEnd":382.7000000476837,"responseStart":347.3000000715256,"secureConnectionStart":239.5},{"duration":123.80000007152557,"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":239.60000002384186,"connectEnd":239.60000002384186,"connectStart":239.60000002384186,"domainLookupEnd":239.60000002384186,"domainLookupStart":239.60000002384186,"fetchStart":239.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":335.7000000476837,"responseEnd":363.40000009536743,"responseStart":363,"secureConnectionStart":239.60000002384186},{"duration":126.89999997615814,"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":239.80000007152557,"connectEnd":239.80000007152557,"connectStart":239.80000007152557,"domainLookupEnd":239.80000007152557,"domainLookupStart":239.80000007152557,"fetchStart":239.80000007152557,"redirectEnd":0,"redirectStart":0,"requestStart":336.90000009536743,"responseEnd":366.7000000476837,"responseStart":366,"secureConnectionStart":239.80000007152557},{"duration":132.69999992847443,"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":239.80000007152557,"connectEnd":239.80000007152557,"connectStart":239.80000007152557,"domainLookupEnd":239.80000007152557,"domainLookupStart":239.80000007152557,"fetchStart":239.80000007152557,"redirectEnd":0,"redirectStart":0,"requestStart":338.7000000476837,"responseEnd":372.5,"responseStart":372,"secureConnectionStart":239.80000007152557},{"duration":97.09999990463257,"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":239.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":337,"responseStart":0,"secureConnectionStart":0},{"duration":139.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":240,"connectEnd":240,"connectStart":240,"domainLookupEnd":240,"domainLookupStart":240,"fetchStart":240,"redirectEnd":0,"redirectStart":0,"requestStart":339.8000000715256,"responseEnd":379.60000002384186,"responseStart":379,"secureConnectionStart":240},{"duration":99.10000002384186,"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":240.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":240.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":339.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":124.10000002384186,"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":240.20000004768372,"connectEnd":351.3000000715256,"connectStart":351.3000000715256,"domainLookupEnd":351.3000000715256,"domainLookupStart":351.3000000715256,"fetchStart":240.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":351.60000002384186,"responseEnd":364.3000000715256,"responseStart":362.10000002384186,"secureConnectionStart":351.3000000715256},{"duration":414.7000000476837,"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":247.5,"connectEnd":247.5,"connectStart":247.5,"domainLookupEnd":247.5,"domainLookupStart":247.5,"fetchStart":247.5,"redirectEnd":0,"redirectStart":0,"requestStart":477.2000000476837,"responseEnd":662.2000000476837,"responseStart":658.6000000238419,"secureConnectionStart":247.5},{"duration":419.89999997615814,"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":247.60000002384186,"connectEnd":247.60000002384186,"connectStart":247.60000002384186,"domainLookupEnd":247.60000002384186,"domainLookupStart":247.60000002384186,"fetchStart":247.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":619.7000000476837,"responseEnd":667.5,"responseStart":662.9000000953674,"secureConnectionStart":247.60000002384186},{"duration":213.80000007152557,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":566.6000000238419,"connectEnd":566.6000000238419,"connectStart":566.6000000238419,"domainLookupEnd":566.6000000238419,"domainLookupStart":566.6000000238419,"fetchStart":566.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":747.1000000238419,"responseEnd":780.4000000953674,"responseStart":779.7000000476837,"secureConnectionStart":566.6000000238419},{"duration":93.29999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":794.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":794.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":888,"responseStart":0,"secureConnectionStart":0},{"duration":154.39999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":817.1000000238419,"connectEnd":817.1000000238419,"connectStart":817.1000000238419,"domainLookupEnd":817.1000000238419,"domainLookupStart":817.1000000238419,"fetchStart":817.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":937.2000000476837,"responseEnd":971.5,"responseStart":971,"secureConnectionStart":817.1000000238419}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":83,"responseStart":232,"responseEnd":246,"domLoading":235,"domInteractive":921,"domContentLoadedEventStart":921,"domContentLoadedEventEnd":959,"domComplete":1358,"loadEventStart":1358,"loadEventEnd":1358,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":899},{"name":"bigPipe.sidebar-id.end","time":899.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":899.8000000715256},{"name":"bigPipe.activity-panel-pipe-id.end","time":901},{"name":"activityTabFullyLoaded","time":974.8000000715256}],"measures":[],"correlationId":"36c59c20e4418a","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
while testing , found additional bugs in current str_to_TIME()
Major :
the above 2 make it impossible to parse anything from years 1 AD - 70 AD (and the fake MySQLish year 0)
Minor /debatable , differences with server
Server testing is done with SELECT TIME 'string' , SELECT DATE 'string', SELECT TIMESTAMP 'string' e.g