mariadb/mysql-test/suite/parts
Yuchen Pei 7d7d552b03
MDEV-37330 Allow unordered index scan for tables partitioned by range when a priority queue is not needed
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.

This includes:

Case 1. The PARTITION BY RANGE expression is a col that is a prefix of
the active index and we are in
index_first/index_last/index_read_map/read_range_first/multi_range_read_next,
OR

Case 2. The PARTITION BY RANGE expression is col1 and the active
index is (prefix_cols, col1, ...), and we are in
index_read_map(prefix_cols=prefix_value), or
read_range_first(start_key= {prefix_value, ...},
end_key={prefix_value, ...}), or
multi_range_read_next(start_key= {prefix_value, ...},
end_key={prefix_value, ...})

Limitation: not supporting reverse index

test passed with:

mtrdefault --suite main --do-test=.*partition
mtrdefault --suite parts
2025-11-21 14:49:39 +11:00
..
inc Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
r MDEV-37330 Allow unordered index scan for tables partitioned by range when a priority queue is not needed 2025-11-21 14:49:39 +11:00
t MDEV-38040 Fix uninitialised key_compare_result_on_equal 2025-11-21 14:47:17 +11:00
disabled.def Disabled failing test case. 2013-09-30 14:56:19 +04:00