in format_pico_time it does convert it into the correct unit and in sys.format_time it does not and only displays -number ps.
Is this wanted or is this considered a bug, is working with negatives it self is the correct behaviour or should it convert it to positive ?
Input:
select format_pico_time(-5000);
|
select sys.format_time(-5000);
|
select format_pico_time(-1000000);
|
select sys.format_time(-1000000);
|
Output:
+-------------------------+
|
| format_pico_time(-5000) |
|
+-------------------------+
|
| -5.00 ns |
|
+-------------------------+
|
+------------------------+
|
| sys.format_time(-5000) |
|
+------------------------+
|
| -5000 ps |
|
+------------------------+
|
+----------------------------+
|
| format_pico_time(-1000000) |
|
+----------------------------+
|
| -1.00 us |
|
+----------------------------+
|
+---------------------------+
|
| sys.format_time(-1000000) |
|
+---------------------------+
|
| -1000000 ps |
|
+---------------------------+
|
|
there's the same issue with sys.format_bytes() where it displays -number bytes whether the number is small or large.
the behavior with negative numbers is not mentioned in neither https://mariadb.com/kb/en/format_pico_time/ nor https://mariadb.com/kb/en/format_time/ , if the current behavior is intended I think it should at least be added to documentation to make it clearer.
knowing the correct behavior this would be an easy issue to solve.
- relates to
-
MDEV-19629
Implement MySQL 8.0 native functions: format_bytes(), format_pico_time() and ps_thread_id()
-
-
Open
{"report":{"fcp":837.1000001430511,"ttfb":127.60000014305115,"pageVisibility":"visible","entityId":128399,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"5d80788c-cf08-4224-9502-959920a84661","navigationType":0,"readyForUser":911.4000000953674,"redirectCount":0,"resourceLoadedEnd":893.1000001430511,"resourceLoadedStart":132.80000019073486,"resourceTiming":[{"duration":222.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":132.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":132.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":355.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":222.5,"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":133,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":133,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":355.5,"responseStart":0,"secureConnectionStart":0},{"duration":236.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":133.20000004768372,"connectEnd":133.20000004768372,"connectStart":133.20000004768372,"domainLookupEnd":133.20000004768372,"domainLookupStart":133.20000004768372,"fetchStart":133.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":133.20000004768372,"responseEnd":369.60000014305115,"responseStart":369.60000014305115,"secureConnectionStart":133.20000004768372},{"duration":337.09999990463257,"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":133.30000019073486,"connectEnd":133.30000019073486,"connectStart":133.30000019073486,"domainLookupEnd":133.30000019073486,"domainLookupStart":133.30000019073486,"fetchStart":133.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":133.30000019073486,"responseEnd":470.40000009536743,"responseStart":470.40000009536743,"secureConnectionStart":133.30000019073486},{"duration":340.7000000476837,"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":133.5,"connectEnd":133.5,"connectStart":133.5,"domainLookupEnd":133.5,"domainLookupStart":133.5,"fetchStart":133.5,"redirectEnd":0,"redirectStart":0,"requestStart":133.5,"responseEnd":474.2000000476837,"responseStart":474.2000000476837,"secureConnectionStart":133.5},{"duration":341.30000019073486,"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":133.5,"connectEnd":133.5,"connectStart":133.5,"domainLookupEnd":133.5,"domainLookupStart":133.5,"fetchStart":133.5,"redirectEnd":0,"redirectStart":0,"requestStart":133.5,"responseEnd":474.80000019073486,"responseStart":474.80000019073486,"secureConnectionStart":133.5},{"duration":341.59999990463257,"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":133.60000014305115,"connectEnd":133.60000014305115,"connectStart":133.60000014305115,"domainLookupEnd":133.60000014305115,"domainLookupStart":133.60000014305115,"fetchStart":133.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":133.60000014305115,"responseEnd":475.2000000476837,"responseStart":475.2000000476837,"secureConnectionStart":133.60000014305115},{"duration":342,"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":133.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":133.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":475.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":341.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":133.80000019073486,"connectEnd":133.80000019073486,"connectStart":133.80000019073486,"domainLookupEnd":133.80000019073486,"domainLookupStart":133.80000019073486,"fetchStart":133.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":133.80000019073486,"responseEnd":475.60000014305115,"responseStart":475.60000014305115,"secureConnectionStart":133.80000019073486},{"duration":342,"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":134,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":134,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":476,"responseStart":0,"secureConnectionStart":0},{"duration":342.09999990463257,"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":134.10000014305115,"connectEnd":134.10000014305115,"connectStart":134.10000014305115,"domainLookupEnd":134.10000014305115,"domainLookupStart":134.10000014305115,"fetchStart":134.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":134.10000014305115,"responseEnd":476.2000000476837,"responseStart":476.2000000476837,"secureConnectionStart":134.10000014305115},{"duration":757.1000001430511,"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":135,"connectEnd":135,"connectStart":135,"domainLookupEnd":135,"domainLookupStart":135,"fetchStart":135,"redirectEnd":0,"redirectStart":0,"requestStart":135,"responseEnd":892.1000001430511,"responseStart":892.1000001430511,"secureConnectionStart":135},{"duration":758.1000001430511,"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":135,"connectEnd":135,"connectStart":135,"domainLookupEnd":135,"domainLookupStart":135,"fetchStart":135,"redirectEnd":0,"redirectStart":0,"requestStart":135,"responseEnd":893.1000001430511,"responseStart":893,"secureConnectionStart":135},{"duration":49.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":522,"connectEnd":522,"connectStart":522,"domainLookupEnd":522,"domainLookupStart":522,"fetchStart":522,"redirectEnd":0,"redirectStart":0,"requestStart":522,"responseEnd":571.8000001907349,"responseStart":571.8000001907349,"secureConnectionStart":522}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":16,"responseStart":128,"responseEnd":129,"domLoading":131,"domInteractive":963,"domContentLoadedEventStart":963,"domContentLoadedEventEnd":1008,"domComplete":1727,"loadEventStart":1727,"loadEventEnd":1729,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":945},{"name":"bigPipe.sidebar-id.end","time":945.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":945.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":948.6000001430511},{"name":"activityTabFullyLoaded","time":1019.1000001430511}],"measures":[],"correlationId":"e64f6e3a87431d","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":61,"dbReadsTimeInMs":8,"dbConnsTimeInMs":14,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}