SELECT * FROM (SELECT a FROM t1 UNIONSELECT b FROM t1) tu;
+-----------------------+
| a |
+-----------------------+
| 9999999999999999.9 |
| -844674407370955162.6 |
+-----------------------+
Looks wrong.
Note, the problem cannot be repeated in 6.x because of MCOL-4612
But perhaps it still exists. MCOL-4612 needs to be fixed first to verify it further in 6.x.
Attachments
Issue Links
is blocked by
MCOL-4612A subquery with a union for DECIMAL and BIGINT returns zeros
Closed
relates to
MCOL-4361Replace pow(10.0, (double)scale) expressions with a static dictionary lookup.
The fix has some loss of precision for large values. This is because we set the union type for a BIGINT and a DECIMAL column as a DOUBLE. This limitation will be addressed in MCOL-4612 when we set the union type to a wide decimal.
Gagan Goel (Inactive)
added a comment - The fix has some loss of precision for large values. This is because we set the union type for a BIGINT and a DECIMAL column as a DOUBLE. This limitation will be addressed in MCOL-4612 when we set the union type to a wide decimal.
Precision issue will be tracked in mentioned tickets.
MariaDB [mytest]> INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
Query OK, 1 row affected (0.354 sec)
MariaDB [mytest]> SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
+----------------------+
| a |
+----------------------+
| 999999999999999999.0 |
| 9999999999999999.0 |
+----------------------+
2 rows in set (0.070 sec)
Daniel Lee (Inactive)
added a comment - Build verified: 5.6.1 ( Drone #2245)
Precision issue will be tracked in mentioned tickets.
MariaDB [mytest]> INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
Query OK, 1 row affected (0.354 sec)
MariaDB [mytest]> SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
+----------------------+
| a |
+----------------------+
| 999999999999999999.0 |
| 9999999999999999.0 |
+----------------------+
2 rows in set (0.070 sec)
People
Daniel Lee (Inactive)
Alexander Barkov
Votes:
0Vote 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":1081.9000000953674,"ttfb":290.90000009536743,"pageVisibility":"visible","entityId":97930,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"afe1c706-9896-4e28-bf6e-f66697a9102a","navigationType":0,"readyForUser":1167.7000000476837,"redirectCount":0,"resourceLoadedEnd":1198.4000000953674,"resourceLoadedStart":299.2999999523163,"resourceTiming":[{"duration":196.60000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":299.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":299.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":495.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":196.80000019073486,"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":299.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":299.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":496.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":217.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":299.7999999523163,"connectEnd":299.7999999523163,"connectStart":299.7999999523163,"domainLookupEnd":299.7999999523163,"domainLookupStart":299.7999999523163,"fetchStart":299.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":299.7999999523163,"responseEnd":517.2000000476837,"responseStart":517.2000000476837,"secureConnectionStart":299.7999999523163},{"duration":385.2999999523163,"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":300.2999999523163,"connectEnd":300.2999999523163,"connectStart":300.2999999523163,"domainLookupEnd":300.2999999523163,"domainLookupStart":300.2999999523163,"fetchStart":300.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":300.2999999523163,"responseEnd":685.5999999046326,"responseStart":685.5999999046326,"secureConnectionStart":300.2999999523163},{"duration":389.2999999523163,"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":300.5,"connectEnd":300.5,"connectStart":300.5,"domainLookupEnd":300.5,"domainLookupStart":300.5,"fetchStart":300.5,"redirectEnd":0,"redirectStart":0,"requestStart":300.5,"responseEnd":689.7999999523163,"responseStart":689.7999999523163,"secureConnectionStart":300.5},{"duration":392.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":300.7000000476837,"connectEnd":300.7000000476837,"connectStart":300.7000000476837,"domainLookupEnd":300.7000000476837,"domainLookupStart":300.7000000476837,"fetchStart":300.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":300.7000000476837,"responseEnd":693.5999999046326,"responseStart":693.5999999046326,"secureConnectionStart":300.7000000476837},{"duration":393.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":300.90000009536743,"connectEnd":300.90000009536743,"connectStart":300.90000009536743,"domainLookupEnd":300.90000009536743,"domainLookupStart":300.90000009536743,"fetchStart":300.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":300.90000009536743,"responseEnd":694.0999999046326,"responseStart":694.0999999046326,"secureConnectionStart":300.90000009536743},{"duration":402.09999990463257,"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":301,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":703.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":400.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":301.2000000476837,"connectEnd":301.2000000476837,"connectStart":301.2000000476837,"domainLookupEnd":301.2000000476837,"domainLookupStart":301.2000000476837,"fetchStart":301.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":301.2000000476837,"responseEnd":701.7000000476837,"responseStart":701.5999999046326,"secureConnectionStart":301.2000000476837},{"duration":401.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":301.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":703.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":401.2999999523163,"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":301.40000009536743,"connectEnd":301.40000009536743,"connectStart":301.40000009536743,"domainLookupEnd":301.40000009536743,"domainLookupStart":301.40000009536743,"fetchStart":301.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":301.40000009536743,"responseEnd":702.7000000476837,"responseStart":702.7000000476837,"secureConnectionStart":301.40000009536743},{"duration":812.6999998092651,"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":312.90000009536743,"connectEnd":312.90000009536743,"connectStart":312.90000009536743,"domainLookupEnd":312.90000009536743,"domainLookupStart":312.90000009536743,"fetchStart":312.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":312.90000009536743,"responseEnd":1125.5999999046326,"responseStart":1125.5999999046326,"secureConnectionStart":312.90000009536743},{"duration":813.5,"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":313,"connectEnd":313,"connectStart":313,"domainLookupEnd":313,"domainLookupStart":313,"fetchStart":313,"redirectEnd":0,"redirectStart":0,"requestStart":313,"responseEnd":1126.5,"responseStart":1126.5,"secureConnectionStart":313},{"duration":201.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":672.7999999523163,"connectEnd":672.7999999523163,"connectStart":672.7999999523163,"domainLookupEnd":672.7999999523163,"domainLookupStart":672.7999999523163,"fetchStart":672.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":672.7999999523163,"responseEnd":874.2000000476837,"responseStart":874.2000000476837,"secureConnectionStart":672.7999999523163},{"duration":204.60000014305115,"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":993.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":993.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1198.4000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":117,"responseStart":291,"responseEnd":312,"domLoading":294,"domInteractive":1236,"domContentLoadedEventStart":1237,"domContentLoadedEventEnd":1293,"domComplete":1534,"loadEventStart":1534,"loadEventEnd":1535,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1214.7999999523163},{"name":"bigPipe.sidebar-id.end","time":1215.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1215.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1217.2000000476837},{"name":"activityTabFullyLoaded","time":1308.2000000476837}],"measures":[],"correlationId":"e9623fab8b563f","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":104,"dbReadsTimeInMs":16,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
For QA: Queries to confirm the issue and verify the fix works are in the issue description.