[MDEV-8741] Equal field propagation leaves some remainders after simplifying WHERE zerofill_column=2010 AND zerofill_column>=2010 Created: 2015-09-03 Updated: 2015-09-12 Resolved: 2015-09-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.0, 10.1 |
| Fix Version/s: | 10.1.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | propagation, upstream | ||
| Issue Links: |
|
||||||||
| Description |
|
This script:
returns
Notice, the a>=2010 part was simplified to constant, but the constant was not removed. The same problems is repeatable with the YEAR data type:
If I use "INT" instead of "INT ZEROFILL" or "YEAR", it works as expected:
returns:
as expected. |
| Comments |
| Comment by Alexander Barkov [ 2015-09-12 ] | |||||||||||
|
MySQL-5.7.8 does not seem to remove the constant part (the result of propagation) from the WHERE condition:
returns
|