[MDEV-8726] IF(x, SUM(y), z) returns {0, NULL} and mangles results Created: 2015-09-02 Updated: 2015-10-23 Resolved: 2015-09-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.0.21, 10.1.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Oleksandr Byelkin |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When executing a query that contains IF(x, SUM(\y), z), the results sometimes get mangled because the operation returns {0, NULL}for a single column in MariaDB. For example:
The same query works normally on MySQL 5.5:
|
| Comments |
| Comment by Sergei Petrunia [ 2015-09-03 ] |
|
GeoffMontee, can you submit the dump of the dataset that you were using? Also, the testcase uses mysql.user. Is it essential that a system table is used or the issue can be repeated with non-system table as well? |
| Comment by Geoff Montee (Inactive) [ 2015-09-03 ] |
|
Hi psergey, This can be reproduced with non-system tables as well, but I shouldn't attach the dump to the JIRA, since it is customer data. I'll send you an email with the relevant information. |
| Comment by Elena Stepanova [ 2015-09-03 ] |
|
GeoffMontee, psergey, |
| Comment by Oleksandr Byelkin [ 2015-09-03 ] |
|
I've fixed, |
| Comment by Geoff Montee (Inactive) [ 2015-09-03 ] |
|
Hi sanja, I've emailed you the data that I used to reproduce this issue. |
| Comment by Oleksandr Byelkin [ 2015-09-04 ] |
|
It is a duplicate of |