[MDEV-7739] Spiral patch 043_mariadb-10.0.15.SQL_SELECT_test_quick_select.diff Created: 2015-03-11 Updated: 2016-12-21 Resolved: 2015-10-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Sergei Petrunia |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Epic Link: | Spiral patches |
| Comments |
| Comment by Sergei Petrunia [ 2015-10-15 ] | |||||||||||||||||
|
A testcase that allows to get the patch location in debugger:
| |||||||||||||||||
| Comment by Sergei Petrunia [ 2015-10-15 ] | |||||||||||||||||
|
I put a breakpoint in SQL_SELECT::test_quick_select, and when I get there, I get:
Ok Now, let's follow till get_mm_tree() call, and see what get_mm_tree() returns:
So, range optimizer only got range on key number 0, which is KEY b (b). We don't get ranges on fulltext keys. | |||||||||||||||||
| Comment by Sergei Petrunia [ 2015-10-15 ] | |||||||||||||||||
|
Trying a fulltext predicate
One can see that fulltext index is not in the list of indexes being considered. | |||||||||||||||||
| Comment by Sergei Petrunia [ 2015-10-15 ] | |||||||||||||||||
|
Ok, here is the query that hits the case that this patch has in mind:
Here, we arrive in SQL_SELECT::test_quick_select() with keys_to_use= {map = 2}. That is, the bitmap only includes the fulltext index. The problem is that I don't see why further analysis is harmful. Check out below:
This means range analysis will not attempt to analyze full text keys. We will have zero keys for which to do range analysis for:
Range analyzer will traverse the WHERE condition down to its individual predicates. But then will not do anything. For the example above, we enter here:
and then there is a loop
which we execute 0 times. | |||||||||||||||||
| Comment by Sergei Petrunia [ 2015-10-15 ] | |||||||||||||||||
|
I conclude that this patch is not needed. | |||||||||||||||||
| Comment by Sergei Petrunia [ 2015-10-15 ] | |||||||||||||||||
|
hours logged | |||||||||||||||||
| Comment by Sergei Petrunia [ 2015-10-15 ] | |||||||||||||||||
|
kentoku, if you disagree, feel free to re-open the bug and provide an example where this patch is useful. |