Ensure keyread_tmp variable is assigned.
In the case of calcuating cost for a ref access for which there exists a usable range, the variable keyread_tmp would always be 0. If there is also another index that could be used as a filter, the cost of that filter would be wrong. In many cases 'the worst_seeks optimzation' would disable the filter from getting used, which is why this bug has not been noticed before. The next commit, which allows one to disable worst_seeks, will have a test case for this bug.
Showing
Please register or sign in to comment