[MDEV-8706] Wrong result for SELECT..WHERE time_column=TIMESTAMP'2015-08-30 00:00:00' AND time_column='00:00:00' Created: 2015-08-30 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-not-supported | ||
| Issue Links: |
|
||||||||
| Description |
|
In this script:
the first and the second SELECT queries correctly return one row. If I rewrite the third query to use TIME literal:
it correctly returns one row. Another example:
correctly returns one row in the first SELECT and both rows in the second SELECT, but erroneously returns empty set in the third SELECT. The reason is that Item_equal remembers a wrong equal constant. In case if time_column=<const> equality it should remember a constant of TIME type. |
| Comments |
| Comment by Alexander Barkov [ 2015-09-12 ] | |||||||||||||||||
|
After the fix this script in MariaDB
returns
The same query in MySQL-5.7.8 returns:
I.e. MySQL does not support propagation in this example |