mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#44821: select distinct on partitioned table returns wrong results
Range analysis did not request sorted output from the storage engine, which cause partitioned handlers to process one partition at a time while reading key prefixes in ascending order, causing values to be missed. Fixed by always requesting sorted order during range analysis. This fix is introduced in 6.0 by the fix for bug no 41136.
This commit is contained in:
@ -8556,7 +8556,7 @@ int QUICK_RANGE_SELECT::get_next_prefix(uint prefix_length,
|
||||
result= file->read_range_first(last_range->min_keypart_map ? &start_key : 0,
|
||||
last_range->max_keypart_map ? &end_key : 0,
|
||||
test(last_range->flag & EQ_RANGE),
|
||||
sorted);
|
||||
TRUE);
|
||||
if (last_range->flag == (UNIQUE_RANGE | EQ_RANGE))
|
||||
last_range= 0; // Stop searching
|
||||
|
||||
|
Reference in New Issue
Block a user