Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.1(EOL) , 10.2(EOL) , 10.3(EOL) , 10.4(EOL) , 10.5
CREATE OR REPLACE TABLE t1 (a date );
CREATE OR REPLACE TABLE t2 AS SELECT FLOOR(a), CEIL(a),ROUND(a), TRUNCATE (a,0) FROM t1;
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| FLOOR(a) | bigint(12) | YES | | NULL | |
| CEIL(a) | bigint(12) | YES | | NULL | |
| ROUND(a) | double(17,0) | YES | | NULL | |
| TRUNCATE(a,0) | double(17,0) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
A date value has 8 digits in numeric format: YYYYMMDD.
INT(9) should be enough for ROUND() with a negative argument (to be checked in a separate MDEV)
INT(8) should be enough for ROUND() with a non-negative argument
INT(8) should be enough for all other functions
Alexander Barkov
made changes -
2020-07-31 06:56
Field
Original Value
New Value
Description
{code:sql}
CREATE OR REPLACE TABLE t1 (a date);
CREATE OR REPLACE TABLE t2 AS SELECT FLOOR(a), CEIL(a),ROUND(a),TRUNCATE(a,0) FROM t1;
{code}
{noformat}
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| FLOOR(a) | bigint(12) | YES | | NULL | |
| CEIL(a) | bigint(12) | YES | | NULL | |
| ROUND(a) | double(17,0) | YES | | NULL | |
| TRUNCATE(a,0) | double(17,0) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
{noformat}
A date value has 8 digits in numeric format: YYYYMMDD.
- INT(9) should be enough for ROUND() with a negative argument
- INT(8) should be enough for ROUND() with a non-negative argument
- INT(8) should be enough for all other functions
{code:sql}
CREATE OR REPLACE TABLE t1 (a date);
CREATE OR REPLACE TABLE t2 AS SELECT FLOOR(a), CEIL(a),ROUND(a),TRUNCATE(a,0) FROM t1;
{code}
{noformat}
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| FLOOR(a) | bigint(12) | YES | | NULL | |
| CEIL(a) | bigint(12) | YES | | NULL | |
| ROUND(a) | double(17,0) | YES | | NULL | |
| TRUNCATE(a,0) | double(17,0) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
{noformat}
A date value has 8 digits in numeric format: YYYYMMDD.
- INT(9) should be enough for ROUND() with a negative argument (to be checked in a separate MDEV)
- INT(8) should be enough for ROUND() with a non-negative argument
- INT(8) should be enough for all other functions
Alexander Barkov
made changes -
2020-07-31 14:08
Status
Open
[ 1
]
In Progress
[ 3
]
Alexander Barkov
made changes -
2020-07-31 14:08
issue.field.resolutiondate
2020-07-31 14:08:20.0
2020-07-31 14:08:20.057
Alexander Barkov
made changes -
2020-07-31 14:08
Fix Version/s
10.4.14
[ 24305
]
Fix Version/s
10.5.5
[ 24423
]
Fix Version/s
10.4
[ 22408
]
Resolution
Fixed
[ 1
]
Status
In Progress
[ 3
]
Closed
[ 6
]
Sergei Golubchik
made changes -
2021-12-06 21:52
Workflow
MariaDB v3
[ 111848
]
MariaDB v4
[ 158175
]
{"report":{"fcp":914.9000000953674,"ttfb":236.70000004768372,"pageVisibility":"visible","entityId":90132,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f18b08be-07e1-4d81-a7c5-ce08809ed008","navigationType":0,"readyForUser":1003.5,"redirectCount":0,"resourceLoadedEnd":980.5,"resourceLoadedStart":242.40000009536743,"resourceTiming":[{"duration":35.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":242.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":242.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":278.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":35.90000009536743,"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":242.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":242.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":278.60000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":106.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":242.90000009536743,"connectEnd":242.90000009536743,"connectStart":242.90000009536743,"domainLookupEnd":242.90000009536743,"domainLookupStart":242.90000009536743,"fetchStart":242.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":242.90000009536743,"responseEnd":349.10000014305115,"responseStart":349.10000014305115,"secureConnectionStart":242.90000009536743},{"duration":203.20000004768372,"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":243.10000014305115,"connectEnd":243.10000014305115,"connectStart":243.10000014305115,"domainLookupEnd":243.10000014305115,"domainLookupStart":243.10000014305115,"fetchStart":243.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":243.10000014305115,"responseEnd":446.30000019073486,"responseStart":446.30000019073486,"secureConnectionStart":243.10000014305115},{"duration":206.70000004768372,"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":243.40000009536743,"connectEnd":243.40000009536743,"connectStart":243.40000009536743,"domainLookupEnd":243.40000009536743,"domainLookupStart":243.40000009536743,"fetchStart":243.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":243.40000009536743,"responseEnd":450.10000014305115,"responseStart":450.10000014305115,"secureConnectionStart":243.40000009536743},{"duration":206.89999985694885,"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":243.60000014305115,"connectEnd":243.60000014305115,"connectStart":243.60000014305115,"domainLookupEnd":243.60000014305115,"domainLookupStart":243.60000014305115,"fetchStart":243.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":243.60000014305115,"responseEnd":450.5,"responseStart":450.5,"secureConnectionStart":243.60000014305115},{"duration":207.19999980926514,"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":243.80000019073486,"connectEnd":243.80000019073486,"connectStart":243.80000019073486,"domainLookupEnd":243.80000019073486,"domainLookupStart":243.80000019073486,"fetchStart":243.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":243.80000019073486,"responseEnd":451,"responseStart":451,"secureConnectionStart":243.80000019073486},{"duration":256,"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":243.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":243.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":499.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":207.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":244.10000014305115,"connectEnd":244.10000014305115,"connectStart":244.10000014305115,"domainLookupEnd":244.10000014305115,"domainLookupStart":244.10000014305115,"fetchStart":244.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":244.10000014305115,"responseEnd":451.60000014305115,"responseStart":451.60000014305115,"secureConnectionStart":244.10000014305115},{"duration":255.90000009536743,"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":244.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":244.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":500.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":207.70000004768372,"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":244.40000009536743,"connectEnd":244.40000009536743,"connectStart":244.40000009536743,"domainLookupEnd":244.40000009536743,"domainLookupStart":244.40000009536743,"fetchStart":244.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":244.40000009536743,"responseEnd":452.10000014305115,"responseStart":452.10000014305115,"secureConnectionStart":244.40000009536743},{"duration":490.19999980926514,"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":245.30000019073486,"connectEnd":245.30000019073486,"connectStart":245.30000019073486,"domainLookupEnd":245.30000019073486,"domainLookupStart":245.30000019073486,"fetchStart":245.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":245.30000019073486,"responseEnd":735.5,"responseStart":735.5,"secureConnectionStart":245.30000019073486},{"duration":578.6000001430511,"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":249.70000004768372,"connectEnd":249.70000004768372,"connectStart":249.70000004768372,"domainLookupEnd":249.70000004768372,"domainLookupStart":249.70000004768372,"fetchStart":249.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":249.70000004768372,"responseEnd":828.3000001907349,"responseStart":828.3000001907349,"secureConnectionStart":249.70000004768372},{"duration":213.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":522.3000001907349,"connectEnd":522.3000001907349,"connectStart":522.3000001907349,"domainLookupEnd":522.3000001907349,"domainLookupStart":522.3000001907349,"fetchStart":522.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":522.3000001907349,"responseEnd":735.9000000953674,"responseStart":735.9000000953674,"secureConnectionStart":522.3000001907349},{"duration":64.70000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":801.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":801.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":866.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":172.20000004768372,"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":803,"connectEnd":803,"connectStart":803,"domainLookupEnd":803,"domainLookupStart":803,"fetchStart":803,"redirectEnd":0,"redirectStart":0,"requestStart":803,"responseEnd":975.2000000476837,"responseStart":975.2000000476837,"secureConnectionStart":803},{"duration":177,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":803.5,"connectEnd":803.5,"connectStart":803.5,"domainLookupEnd":803.5,"domainLookupStart":803.5,"fetchStart":803.5,"redirectEnd":0,"redirectStart":0,"requestStart":803.5,"responseEnd":980.5,"responseStart":980.5,"secureConnectionStart":803.5},{"duration":131.10000014305115,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":907.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":907.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1038.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":117.19999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":929.8000001907349,"connectEnd":929.8000001907349,"connectStart":929.8000001907349,"domainLookupEnd":929.8000001907349,"domainLookupStart":929.8000001907349,"fetchStart":929.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":929.8000001907349,"responseEnd":1047,"responseStart":1047,"secureConnectionStart":929.8000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":12,"responseStart":237,"responseEnd":241,"domLoading":240,"domInteractive":1100,"domContentLoadedEventStart":1100,"domContentLoadedEventEnd":1148,"domComplete":1334,"loadEventStart":1334,"loadEventEnd":1334,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1041.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1042},{"name":"bigPipe.activity-panel-pipe-id.start","time":1042.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1044.8000001907349},{"name":"activityTabFullyLoaded","time":1170.5}],"measures":[],"correlationId":"ca11e3c42e5dcc","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":118,"dbReadsTimeInMs":19,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}