[MDEV-32555] wrong result with an index and a partially null-rejecting condition Created: 2023-10-23 Updated: 2024-01-11 Resolved: 2023-10-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.10, 10.11.5, 11.1.2, 11.3.0 |
| Fix Version/s: | 10.10.7, 10.11.6, 11.0.4, 11.1.3, 11.2.2 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Cuchac | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | index, regression-10.10, wrong_result | ||
| Environment: |
Official docker images |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Hello, when I run same query with different indexes (USE INDEX to force another index), I get completely different results. I discovered this issue after upgrade to version 10.11, some queries started to return nonsense. Does work correctly in <10.11. This fiddle shows the code but does not exhibit the problem (version 10.9 is not affected) - https://dbfiddle.uk/eJwzXdgt both queries returns the same value. But when I run this in 10.11 or 11.1, first query returns all NULLs (invalid result), second query returns valid results. Queries differ only in index used.
|
| Comments |
| Comment by Cuchac [ 2023-10-23 ] | ||
|
Same happens with very latest - 11.3.0 - quay.io/mariadb-foundation/mariadb-devel:verylatest | ||
| Comment by Sergei Petrunia [ 2023-10-27 ] | ||
|
serg, the patch looks good to me. Please add a comment with a note that
before this piece of code.
Ok to push after that. |