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":861.3999998569489,"ttfb":254.79999995231628,"pageVisibility":"visible","entityId":97930,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"9a1cc279-2c34-4066-b758-b0a550794947","navigationType":0,"readyForUser":924.2999999523163,"redirectCount":0,"resourceLoadedEnd":866.0999999046326,"resourceLoadedStart":259.59999990463257,"resourceTiming":[{"duration":14.400000095367432,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":259.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":259.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":274,"responseStart":0,"secureConnectionStart":0},{"duration":14.700000047683716,"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":259.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":259.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":274.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":195.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":260.09999990463257,"connectEnd":260.09999990463257,"connectStart":260.09999990463257,"domainLookupEnd":260.09999990463257,"domainLookupStart":260.09999990463257,"fetchStart":260.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":260.09999990463257,"responseEnd":456,"responseStart":456,"secureConnectionStart":260.09999990463257},{"duration":183.5,"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":260.19999980926514,"connectEnd":260.19999980926514,"connectStart":260.19999980926514,"domainLookupEnd":260.19999980926514,"domainLookupStart":260.19999980926514,"fetchStart":260.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":260.19999980926514,"responseEnd":443.69999980926514,"responseStart":443.69999980926514,"secureConnectionStart":260.19999980926514},{"duration":20.700000047683716,"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":260.39999985694885,"connectEnd":260.39999985694885,"connectStart":260.39999985694885,"domainLookupEnd":260.39999985694885,"domainLookupStart":260.39999985694885,"fetchStart":260.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":260.39999985694885,"responseEnd":281.09999990463257,"responseStart":281.09999990463257,"secureConnectionStart":260.39999985694885},{"duration":197.59999990463257,"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":260.59999990463257,"connectEnd":260.59999990463257,"connectStart":260.59999990463257,"domainLookupEnd":260.59999990463257,"domainLookupStart":260.59999990463257,"fetchStart":260.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":260.59999990463257,"responseEnd":458.19999980926514,"responseStart":458.19999980926514,"secureConnectionStart":260.59999990463257},{"duration":24.200000047683716,"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":260.7999999523163,"connectEnd":260.7999999523163,"connectStart":260.7999999523163,"domainLookupEnd":260.7999999523163,"domainLookupStart":260.7999999523163,"fetchStart":260.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":260.7999999523163,"responseEnd":285,"responseStart":285,"secureConnectionStart":260.7999999523163},{"duration":21.100000143051147,"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":260.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":260.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":282,"responseStart":0,"secureConnectionStart":0},{"duration":196.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":261.09999990463257,"connectEnd":261.09999990463257,"connectStart":261.09999990463257,"domainLookupEnd":261.09999990463257,"domainLookupStart":261.09999990463257,"fetchStart":261.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":261.09999990463257,"responseEnd":457.69999980926514,"responseStart":457.69999980926514,"secureConnectionStart":261.09999990463257},{"duration":197.5,"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":261.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":261.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":458.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":197.29999995231628,"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":261.39999985694885,"connectEnd":261.39999985694885,"connectStart":261.39999985694885,"domainLookupEnd":261.39999985694885,"domainLookupStart":261.39999985694885,"fetchStart":261.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":261.39999985694885,"responseEnd":458.69999980926514,"responseStart":458.69999980926514,"secureConnectionStart":261.39999985694885},{"duration":593,"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":271.69999980926514,"connectEnd":271.69999980926514,"connectStart":271.69999980926514,"domainLookupEnd":271.69999980926514,"domainLookupStart":271.69999980926514,"fetchStart":271.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":271.69999980926514,"responseEnd":864.6999998092651,"responseStart":864.6999998092651,"secureConnectionStart":271.69999980926514},{"duration":591.0999999046326,"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":275,"connectEnd":275,"connectStart":275,"domainLookupEnd":275,"domainLookupStart":275,"fetchStart":275,"redirectEnd":0,"redirectStart":0,"requestStart":275,"responseEnd":866.0999999046326,"responseStart":866.0999999046326,"secureConnectionStart":275},{"duration":199.70000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":664.1999998092651,"connectEnd":664.1999998092651,"connectStart":664.1999998092651,"domainLookupEnd":664.1999998092651,"domainLookupStart":664.1999998092651,"fetchStart":664.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":664.1999998092651,"responseEnd":863.8999998569489,"responseStart":863.8999998569489,"secureConnectionStart":664.1999998092651},{"duration":174.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":840,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":840,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1014.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":95.79999995231628,"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":978.3999998569489,"connectEnd":978.3999998569489,"connectStart":978.3999998569489,"domainLookupEnd":978.3999998569489,"domainLookupStart":978.3999998569489,"fetchStart":978.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":978.3999998569489,"responseEnd":1074.1999998092651,"responseStart":1074.1999998092651,"secureConnectionStart":978.3999998569489}],"fetchStart":0,"domainLookupStart":6,"domainLookupEnd":26,"connectStart":27,"connectEnd":45,"secureConnectionStart":35,"requestStart":45,"responseStart":255,"responseEnd":275,"domLoading":258,"domInteractive":1049,"domContentLoadedEventStart":1049,"domContentLoadedEventEnd":1085,"domComplete":1226,"loadEventStart":1226,"loadEventEnd":1227,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1024.3999998569489},{"name":"bigPipe.sidebar-id.end","time":1025.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":1025.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1027},{"name":"activityTabFullyLoaded","time":1098.8999998569489}],"measures":[],"correlationId":"8d8aeaca5469a3","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":136,"dbReadsTimeInMs":18,"dbConnsTimeInMs":29,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
For QA: Queries to confirm the issue and verify the fix works are in the issue description.