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":1483.2999999970198,"ttfb":357.29999999701977,"pageVisibility":"visible","entityId":97930,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"463f9f54-ada8-481c-8025-3e3d8be1a918","navigationType":0,"readyForUser":1620.699999988079,"redirectCount":0,"resourceLoadedEnd":1989.0999999940395,"resourceLoadedStart":366.3999999910593,"resourceTiming":[{"duration":509.40000000596046,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":366.3999999910593,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":366.3999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":875.7999999970198,"responseStart":0,"secureConnectionStart":0},{"duration":509.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":366.69999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":366.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":876.1999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":521,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":368.3999999910593,"connectEnd":368.3999999910593,"connectStart":368.3999999910593,"domainLookupEnd":368.3999999910593,"domainLookupStart":368.3999999910593,"fetchStart":368.3999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":368.3999999910593,"responseEnd":889.3999999910593,"responseStart":889.3999999910593,"secureConnectionStart":368.3999999910593},{"duration":639.5999999940395,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":369,"connectEnd":369,"connectStart":369,"domainLookupEnd":369,"domainLookupStart":369,"fetchStart":369,"redirectEnd":0,"redirectStart":0,"requestStart":369,"responseEnd":1008.5999999940395,"responseStart":1008.5999999940395,"secureConnectionStart":369},{"duration":615.3000000119209,"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":369.19999998807907,"connectEnd":369.19999998807907,"connectStart":369.19999998807907,"domainLookupEnd":369.19999998807907,"domainLookupStart":369.19999998807907,"fetchStart":369.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":369.19999998807907,"responseEnd":984.5,"responseStart":984.5,"secureConnectionStart":369.19999998807907},{"duration":642.7000000029802,"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":369.29999999701977,"connectEnd":369.29999999701977,"connectStart":369.29999999701977,"domainLookupEnd":369.29999999701977,"domainLookupStart":369.29999999701977,"fetchStart":369.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":369.29999999701977,"responseEnd":1012,"responseStart":1012,"secureConnectionStart":369.29999999701977},{"duration":1059,"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":369.5,"connectEnd":369.5,"connectStart":369.5,"domainLookupEnd":369.5,"domainLookupStart":369.5,"fetchStart":369.5,"redirectEnd":0,"redirectStart":0,"requestStart":369.5,"responseEnd":1428.5,"responseStart":1428.5,"secureConnectionStart":369.5},{"duration":673,"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":369.69999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":369.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1042.699999988079,"responseStart":0,"secureConnectionStart":0},{"duration":643,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/f66960d7757d5f06891021cb34673e32/shortcuts.js?context=issuenavigation&context=issueaction","startTime":369.8999999910593,"connectEnd":369.8999999910593,"connectStart":369.8999999910593,"domainLookupEnd":369.8999999910593,"domainLookupStart":369.8999999910593,"fetchStart":369.8999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":369.8999999910593,"responseEnd":1012.8999999910593,"responseStart":1012.8999999910593,"secureConnectionStart":369.8999999910593},{"duration":672.7999999970198,"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":370,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":370,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1042.7999999970198,"responseStart":0,"secureConnectionStart":0},{"duration":643.3000000119209,"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":370.19999998807907,"connectEnd":370.19999998807907,"connectStart":370.19999998807907,"domainLookupEnd":370.19999998807907,"domainLookupStart":370.19999998807907,"fetchStart":370.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":370.19999998807907,"responseEnd":1013.5,"responseStart":1013.3999999910593,"secureConnectionStart":370.19999998807907},{"duration":1615.7999999970198,"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":372.79999999701977,"connectEnd":372.79999999701977,"connectStart":372.79999999701977,"domainLookupEnd":372.79999999701977,"domainLookupStart":372.79999999701977,"fetchStart":372.79999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":372.79999999701977,"responseEnd":1988.5999999940395,"responseStart":1988.5999999940395,"secureConnectionStart":372.79999999701977},{"duration":1612.7999999970198,"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":376.29999999701977,"connectEnd":376.29999999701977,"connectStart":376.29999999701977,"domainLookupEnd":376.29999999701977,"domainLookupStart":376.29999999701977,"fetchStart":376.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":376.29999999701977,"responseEnd":1989.0999999940395,"responseStart":1989.0999999940395,"secureConnectionStart":376.29999999701977},{"duration":402.69999998807907,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1059,"connectEnd":1059,"connectStart":1059,"domainLookupEnd":1059,"domainLookupStart":1059,"fetchStart":1059,"redirectEnd":0,"redirectStart":0,"requestStart":1059,"responseEnd":1461.699999988079,"responseStart":1461.699999988079,"secureConnectionStart":1059}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":188,"responseStart":358,"responseEnd":377,"domLoading":361,"domInteractive":2023,"domContentLoadedEventStart":2023,"domContentLoadedEventEnd":2073,"domComplete":2694,"loadEventStart":2694,"loadEventEnd":2695,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1996.5999999940395},{"name":"bigPipe.sidebar-id.end","time":1997.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1997.5999999940395},{"name":"bigPipe.activity-panel-pipe-id.end","time":1999.0999999940395},{"name":"activityTabFullyLoaded","time":2088.7999999970198}],"measures":[],"correlationId":"4803b13b98fc5b","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":15,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
For QA: Queries to confirm the issue and verify the fix works are in the issue description.