[MDEV-8707] Wrong result for SELECT..WHERE varchar_column=DATE'2001-01-01' AND varchar_column='2001-01-01' Created: 2015-08-30 Updated: 2015-09-12 Resolved: 2015-08-31 |
|
| 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 |
|
returns:
The second row is obviously wrong. If I write WHERE the other way round:
it works fine and correctly returns one row:
The same problem is repeatable with ENUM type:
Another example using ROW syntax:
The first query correctly returns one row, the second query erroneously returns two rows. Another example:
returns:
This is wrong. The expected result is empty set. The same problem happens with ENUM:
It erroneously returns one row. The expected result it to return no rows. |