There are two types of partition index scans. Ordered and unordered.
The ordered scan utilises a priority queue of size equal to the number
of partitions. Thus when the number of partitions is large and a
SELECT query with ORDER BY request only a few results (e.g. LIMIT 1),
populating the partitions can be wasteful. Therefore in this patch we
allow the use of unordered scan when a priority queue is not needed.
test passed with:
mtrdefault --suite main --do-test=.*partition
mtrdefault --suite parts