Skip to content

Commit

Permalink
MDEV-24712 get_partition_set is never executed in ha_partition::multi…
Browse files Browse the repository at this point in the history
…_range_key_create_key due to bitwise & with 0 constant

use == to compare enum (despite the name it is not a bit flag)
  • Loading branch information
YuryChaikou-ServiceNow authored and sanja-byelkin committed Jul 7, 2023
1 parent 94a8921 commit 8fb863e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/ha_partition.cc
Expand Up @@ -6265,7 +6265,7 @@ int ha_partition::multi_range_key_create_key(RANGE_SEQ_IF *seq,
m_mrr_range_current->ptr= m_mrr_range_current->key_multi_range.ptr;
m_mrr_range_current->key_multi_range.ptr= m_mrr_range_current;

if (start_key->key && (start_key->flag & HA_READ_KEY_EXACT))
if (start_key->key && (start_key->flag == HA_READ_KEY_EXACT))
get_partition_set(table, table->record[0], active_index,
start_key, &m_part_spec);
else
Expand Down

0 comments on commit 8fb863e

Please sign in to comment.