This bug occurs when running 10.2 testsuite with Connector/C:
perl mysql-test-run func_time --ps-protocol
When a string value, e.g "0" rather than number, is passed to from_unixtime() function the number of decimals is wrong (31 instead of 0). Also length value is not correct.
How to repeat:
MariaDB [test]> select from_unixtime(0), from_unixtime("0");
|
Field 1: `from_unixtime(0)`
|
Catalog: `def`
|
Database: ``
|
Table: ``
|
Org_table: ``
|
Type: DATETIME
|
Collation: binary (63)
|
Length: 19
|
Max_length: 19
|
Decimals: 0
|
Flags: BINARY
|
|
Field 2: `from_unixtime("0")`
|
Catalog: `def`
|
Database: ``
|
Table: ``
|
Org_table: ``
|
Type: DATETIME
|
Collation: binary (63)
|
Length: 26 <----- ????
|
Max_length: 19
|
Decimals: 31 <---- ????
|
Flags: BINARY
|
|
|
+---------------------+---------------------+
|
| from_unixtime(0) | from_unixtime("0") |
|
+---------------------+---------------------+
|
| 1970-01-01 01:00:00 | 1970-01-01 01:00:00 |
|
+---------------------+---------------------+
|
1 row in set (0.00 sec)
|
{"report":{"fcp":1256.2999999523163,"ttfb":486.89999985694885,"pageVisibility":"visible","entityId":56944,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ced9bf59-9bb4-4340-8ac6-ae31cbbf6575","navigationType":0,"readyForUser":1329.3999998569489,"redirectCount":0,"resourceLoadedEnd":1525.7999999523163,"resourceLoadedStart":505.7999999523163,"resourceTiming":[{"duration":179.70000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":505.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":505.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":685.5,"responseStart":0,"secureConnectionStart":0},{"duration":184.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":506,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":506,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":690.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":235.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/b09d0d077992e4331b5f9ec0d3ec448c-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":506.09999990463257,"connectEnd":506.09999990463257,"connectStart":506.09999990463257,"domainLookupEnd":506.09999990463257,"domainLookupStart":506.09999990463257,"fetchStart":506.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":506.09999990463257,"responseEnd":741.5,"responseStart":741.5,"secureConnectionStart":506.09999990463257},{"duration":443,"initiatorType":"script","name":"https://jira.mariadb.org/s/b47ab3df14096803b180217eb8482517-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":506.2000000476837,"connectEnd":506.2000000476837,"connectStart":506.2000000476837,"domainLookupEnd":506.2000000476837,"domainLookupStart":506.2000000476837,"fetchStart":506.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":506.2000000476837,"responseEnd":949.2000000476837,"responseStart":949.2000000476837,"secureConnectionStart":506.2000000476837},{"duration":446.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/6c569cbf8087ab04e40d0bef98627457-CDN/lu2bsh/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":506.2999999523163,"connectEnd":506.2999999523163,"connectStart":506.2999999523163,"domainLookupEnd":506.2999999523163,"domainLookupStart":506.2999999523163,"fetchStart":506.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":506.2999999523163,"responseEnd":952.5999999046326,"responseStart":952.5999999046326,"secureConnectionStart":506.2999999523163},{"duration":446.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":506.39999985694885,"connectEnd":506.39999985694885,"connectStart":506.39999985694885,"domainLookupEnd":506.39999985694885,"domainLookupStart":506.39999985694885,"fetchStart":506.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":506.39999985694885,"responseEnd":953.0999999046326,"responseStart":953.0999999046326,"secureConnectionStart":506.39999985694885},{"duration":447,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":506.39999985694885,"connectEnd":506.39999985694885,"connectStart":506.39999985694885,"domainLookupEnd":506.39999985694885,"domainLookupStart":506.39999985694885,"fetchStart":506.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":506.39999985694885,"responseEnd":953.3999998569489,"responseStart":953.3999998569489,"secureConnectionStart":506.39999985694885},{"duration":447.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bsh/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":506.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":506.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":954.3999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":447,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":506.7000000476837,"connectEnd":506.7000000476837,"connectStart":506.7000000476837,"domainLookupEnd":506.7000000476837,"domainLookupStart":506.7000000476837,"fetchStart":506.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":506.7000000476837,"responseEnd":953.7000000476837,"responseStart":953.7000000476837,"secureConnectionStart":506.7000000476837},{"duration":448,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bsh/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":506.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":506.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":954.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":447.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/81b5d7c27af3ebc078cc4a36383678ba-CDN/lu2bsh/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":506.89999985694885,"connectEnd":506.89999985694885,"connectStart":506.89999985694885,"domainLookupEnd":506.89999985694885,"domainLookupStart":506.89999985694885,"fetchStart":506.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":506.89999985694885,"responseEnd":954.3999998569489,"responseStart":954.3999998569489,"secureConnectionStart":506.89999985694885},{"duration":696.1000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":507.39999985694885,"connectEnd":507.39999985694885,"connectStart":507.39999985694885,"domainLookupEnd":507.39999985694885,"domainLookupStart":507.39999985694885,"fetchStart":507.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":507.39999985694885,"responseEnd":1203.5,"responseStart":1203.5,"secureConnectionStart":507.39999985694885},{"duration":1014,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":507.5,"connectEnd":507.5,"connectStart":507.5,"domainLookupEnd":507.5,"domainLookupStart":507.5,"fetchStart":507.5,"redirectEnd":0,"redirectStart":0,"requestStart":507.5,"responseEnd":1521.5,"responseStart":1521.5,"secureConnectionStart":507.5},{"duration":258.7000000476837,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":888.5,"connectEnd":888.5,"connectStart":888.5,"domainLookupEnd":888.5,"domainLookupStart":888.5,"fetchStart":888.5,"redirectEnd":0,"redirectStart":0,"requestStart":888.5,"responseEnd":1147.2000000476837,"responseStart":1147.2000000476837,"secureConnectionStart":888.5},{"duration":311.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/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":1214.3999998569489,"connectEnd":1214.3999998569489,"connectStart":1214.3999998569489,"domainLookupEnd":1214.3999998569489,"domainLookupStart":1214.3999998569489,"fetchStart":1214.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":1214.3999998569489,"responseEnd":1525.7999999523163,"responseStart":1525.7999999523163,"secureConnectionStart":1214.3999998569489},{"duration":332.90000009536743,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1250.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1250.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1583,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":361,"responseStart":487,"responseEnd":489,"domLoading":503,"domInteractive":1544,"domContentLoadedEventStart":1544,"domContentLoadedEventEnd":1582,"domComplete":2123,"loadEventStart":2123,"loadEventEnd":2124,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1523.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1524.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1524.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1525},{"name":"activityTabFullyLoaded","time":1590.7999999523163}],"measures":[],"correlationId":"ec83897dbff41f","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":73,"dbReadsTimeInMs":12,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The 'Length 26' is the correct value. The 'Decimals 31' means that we don't know the exact precision. So the client just should handle this properly.