[MDEV-16386] Incorrect SQL result when renaming column in a subquery (possibly with GROUP BY) Created: 2018-06-04 Updated: 2018-06-14 Resolved: 2018-06-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.3.7, 10.2, 10.3 |
| Fix Version/s: | 10.2.16 |
| Type: | Bug | Priority: | Major |
| Reporter: | Vitaliy Filippov | Assignee: | Galina Shalygina (Inactive) |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Environment: |
Debian Jessie |
||
| Description |
|
Hi! In one of our production installations MariaDB 10.3.7 fails to filter rows correctly after upgrading from 5.5, in a case similar to the following:
It seems that MariaDB pushes the outer 'where' condition inside, takes the value type from tbl.a, thinks ='abc' should be an integer, issues an 'incorrect integer value' and returns 0 rows. The issue still reproduces on our installation. However, I can't reproduce it from scratch using the script above. So... |
| Comments |
| Comment by Vitaliy Filippov [ 2018-06-04 ] | |||||||||||||||||||||||||||||||||
|
Ok, I've reproduced it from scratch:
Now please fix it | |||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2018-06-06 ] | |||||||||||||||||||||||||||||||||
|
vitalif, Thanks for the report and testcase!
| |||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2018-06-14 ] | |||||||||||||||||||||||||||||||||
|
ok to push into 10.2 | |||||||||||||||||||||||||||||||||
| Comment by Galina Shalygina (Inactive) [ 2018-06-14 ] | |||||||||||||||||||||||||||||||||
|
Pushed in 10.2 |