Fix bug#13293 Wrongly used index results in endless loop.
Loose index scan using only second part of multipart index was choosen, which results in creating wrong keys and endless loop. get_best_group_min_max() now allows loose index scan for distinct only if used keyparts forms a prefix of the index. mysql-test/t/group_min_max.test: Test case for bug #13293 Wrongly used index results in endless loop. mysql-test/r/group_min_max.result: Test case for bug #13293 Wrongly used index results in endless loop. sql/opt_range.cc: Fix bug #13293 Wrongly used index results in endless loop. get_best_group_min_max() now allows loose index scan for distinct only if used keyparts forms a prefix of the index.
Showing
Please register or sign in to comment