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":1288.5,"ttfb":358.30000019073486,"pageVisibility":"visible","entityId":97930,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"27f732a7-69b9-4f7b-b2fd-48a95c2ea7cc","navigationType":0,"readyForUser":1386.5,"redirectCount":0,"resourceLoadedEnd":1637.1000001430511,"resourceLoadedStart":363.90000009536743,"resourceTiming":[{"duration":383,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":363.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":363.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":746.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":383,"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":364.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":364.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":747.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":391.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":364.30000019073486,"connectEnd":364.30000019073486,"connectStart":364.30000019073486,"domainLookupEnd":364.30000019073486,"domainLookupStart":364.30000019073486,"fetchStart":364.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":364.30000019073486,"responseEnd":756.1000001430511,"responseStart":756.1000001430511,"secureConnectionStart":364.30000019073486},{"duration":505.39999985694885,"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":364.60000014305115,"connectEnd":364.60000014305115,"connectStart":364.60000014305115,"domainLookupEnd":364.60000014305115,"domainLookupStart":364.60000014305115,"fetchStart":364.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":364.60000014305115,"responseEnd":870,"responseStart":870,"secureConnectionStart":364.60000014305115},{"duration":508.89999985694885,"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":364.80000019073486,"connectEnd":364.80000019073486,"connectStart":364.80000019073486,"domainLookupEnd":364.80000019073486,"domainLookupStart":364.80000019073486,"fetchStart":364.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":364.80000019073486,"responseEnd":873.7000000476837,"responseStart":873.7000000476837,"secureConnectionStart":364.80000019073486},{"duration":510.7000000476837,"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":364.90000009536743,"connectEnd":364.90000009536743,"connectStart":364.90000009536743,"domainLookupEnd":364.90000009536743,"domainLookupStart":364.90000009536743,"fetchStart":364.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":364.90000009536743,"responseEnd":875.6000001430511,"responseStart":875.6000001430511,"secureConnectionStart":364.90000009536743},{"duration":512.7999999523163,"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":365.10000014305115,"connectEnd":365.10000014305115,"connectStart":365.10000014305115,"domainLookupEnd":365.10000014305115,"domainLookupStart":365.10000014305115,"fetchStart":365.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":365.10000014305115,"responseEnd":877.9000000953674,"responseStart":877.9000000953674,"secureConnectionStart":365.10000014305115},{"duration":557.0999999046326,"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":365.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":365.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":922.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":512.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":365.5,"connectEnd":365.5,"connectStart":365.5,"domainLookupEnd":365.5,"domainLookupStart":365.5,"fetchStart":365.5,"redirectEnd":0,"redirectStart":0,"requestStart":365.5,"responseEnd":878.3000001907349,"responseStart":878.3000001907349,"secureConnectionStart":365.5},{"duration":557,"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":365.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":365.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":922.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":513.1999998092651,"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":365.80000019073486,"connectEnd":365.80000019073486,"connectStart":365.80000019073486,"domainLookupEnd":365.80000019073486,"domainLookupStart":365.80000019073486,"fetchStart":365.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":365.80000019073486,"responseEnd":879,"responseStart":879,"secureConnectionStart":365.80000019073486},{"duration":1250.3999998569489,"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":371.80000019073486,"connectEnd":371.80000019073486,"connectStart":371.80000019073486,"domainLookupEnd":371.80000019073486,"domainLookupStart":371.80000019073486,"fetchStart":371.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":371.80000019073486,"responseEnd":1622.2000000476837,"responseStart":1622.1000001430511,"secureConnectionStart":371.80000019073486},{"duration":1265.2999999523163,"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":371.80000019073486,"connectEnd":371.80000019073486,"connectStart":371.80000019073486,"domainLookupEnd":371.80000019073486,"domainLookupStart":371.80000019073486,"fetchStart":371.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":371.80000019073486,"responseEnd":1637.1000001430511,"responseStart":1637.1000001430511,"secureConnectionStart":371.80000019073486},{"duration":214.79999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":936.9000000953674,"connectEnd":936.9000000953674,"connectStart":936.9000000953674,"domainLookupEnd":936.9000000953674,"domainLookupStart":936.9000000953674,"fetchStart":936.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":936.9000000953674,"responseEnd":1151.7000000476837,"responseStart":1151.7000000476837,"secureConnectionStart":936.9000000953674},{"duration":483.2000000476837,"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":1231,"connectEnd":1231,"connectStart":1231,"domainLookupEnd":1231,"domainLookupStart":1231,"fetchStart":1231,"redirectEnd":0,"redirectStart":0,"requestStart":1231,"responseEnd":1714.2000000476837,"responseStart":1714.2000000476837,"secureConnectionStart":1231}],"fetchStart":0,"domainLookupStart":148,"domainLookupEnd":167,"connectStart":167,"connectEnd":186,"secureConnectionStart":175,"requestStart":187,"responseStart":359,"responseEnd":364,"domLoading":362,"domInteractive":1663,"domContentLoadedEventStart":1663,"domContentLoadedEventEnd":1708,"domComplete":2916,"loadEventStart":2916,"loadEventEnd":2917,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1640.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1641.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1641.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1643.1000001430511},{"name":"activityTabFullyLoaded","time":1723.2000000476837}],"measures":[],"correlationId":"cd176f51323771","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":96,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
For QA: Queries to confirm the issue and verify the fix works are in the issue description.