... There are problems with re-initialization of MRR scans, though.
Besides that, we also need to take into account that
- if we've had a quick select that was created by the range optimizer, it should be kept and re-used.
- BUT, if the quick select was created by the get_quick_select_for_ref() call in create_sort_index(), it should be destroyed and re-created again if necessary. This is because 'ref' may contain out-of-subquery references, and so will change for each execution.
... There are problems with re-initialization of MRR scans, though.
Besides that, we also need to take into account that select_ for_ref( ) call in create_ sort_index( ), it should be destroyed and re-created again if necessary. This is because 'ref' may contain out-of-subquery references, and so will change for each execution.
- if we've had a quick select that was created by the range optimizer, it should be kept and re-used.
- BUT, if the quick select was created by the get_quick_