[MDEV-20633] Optimizer unexpectedly changes equi-JOIN predicates Created: 2019-09-19 Updated: 2019-09-19 Resolved: 2019-09-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.4.8 |
| Fix Version/s: | 10.4.8 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Roman | Assignee: | Igor Babaev |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Consider the following example and how optimizer rewrites equi-join predicates.
Here is the dbug_print_item(conds) for the COND item in optimize_inner() before optimize_cond(), right after it and after optimize_stage2().
However if one swaps t1 and t2 in FROM we got expected join predicates:
This unstable behavior breaks a number of regression tests in CS. How to avoid such replacements? |
| Comments |
| Comment by Roman [ 2019-09-19 ] |
|
This is an expected behavior of JOIN order pick mechanism. |