mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
BUG#18659: In get_part_iter_for_interval_via_walking(), when we need to
obtain partition number, call partition_info->get_part_partition_id() when the table has subpartitions, and get_partition_id() otherwise. (The bug was that we were always doing the latter) mysql-test/r/partition_pruning.result: Testcase for BUG#18659 mysql-test/t/partition_pruning.test: Testcase for BUG#18659
This commit is contained in:
@@ -5521,7 +5521,11 @@ int get_part_iter_for_interval_via_walking(partition_info *part_info,
|
||||
else
|
||||
{
|
||||
longlong dummy;
|
||||
if (!part_info->get_partition_id(part_info, &part_id, &dummy))
|
||||
int res= part_info->is_sub_partitioned() ?
|
||||
part_info->get_part_partition_id(part_info, &part_id,
|
||||
&dummy):
|
||||
part_info->get_partition_id(part_info, &part_id, &dummy);
|
||||
if (!res)
|
||||
{
|
||||
init_single_partition_iterator(part_id, part_iter);
|
||||
return 1; /* Ok, iterator initialized */
|
||||
|
Reference in New Issue
Block a user