[MDEV-5050] Different result set with index_merge=on and index_merge=off on comparing a date column to an incorrect value Created: 2013-09-22 Updated: 2022-09-08 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.4, 5.5.33, 5.3.12 |
| Fix Version/s: | 5.5 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The following test case returns different results for the same query when it's executed with and without index_merge:
Result with index_merge=on (empty set):
Result with index_merge=off:
I cannot say for sure which one is correct, since there is a comparison to an incorrect date value. I suppose it should return the empty result since '0000-00-00' does not look equal to 'wrong value'; but more importantly, I expect the query return the same result set, regardless of the optimizer_switch value. Reproducible on 5.3 (down to 5.3.5), 5.5, 10.0. See also MDEV-4837 (Comparing a TIME value with an illegal time representation returns TRUE), it might be related. EXPLAIN with index_merge=on:
EXPLAIN with index_merge=off:
|
| Comments |
| Comment by Igor Babaev [ 2013-10-18 ] | ||||||
|
This exactly the consequence of the bug MDEV-4837:
-----
----- |