[MDEV-23645] Optimizer trace: print conditions after substitute_for_best_equal_field Created: 2020-09-01 Updated: 2021-03-23 Resolved: 2021-03-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | 10.6.0 |
| Type: | Task | Priority: | Critical |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | optimizer_trace | ||
| Description |
|
Find this code in sql_select.cc:
and subsequent calls for ON and select list. |
| Comments |
| Comment by Sergei Petrunia [ 2020-10-10 ] | |||||||||||||||||||||||||||||||||
|
MySQL prints the substituted WHERE in attaching_conditions_to_tables.original_condition:
...
| |||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-10-10 ] | |||||||||||||||||||||||||||||||||
|
More input: don't print anything if there's no HAVING, ON, WHERE, etc.
only add clutter. | |||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-10-10 ] | |||||||||||||||||||||||||||||||||
|
Hmm MariaDB also has post-substitution WHERE clause hidden in attaching_conditions_to_tables.original_condition :
Note: the original one is "33+t3.a" , if we see "33+t1.a" it's post-substitution | |||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-10-10 ] | |||||||||||||||||||||||||||||||||
|
I think, tracing for this should follow the pattern that other steps in "join_optimization" do.
Let the object be always printed. Please also remove attaching_conditions_to_tables.original_condition. Let's discuss ON expression print-out in |