Details
Description
/sql/ha_partition.cc : 6261
HA_READ_KEY_EXACT is defined as 0, so bitwise & gives 0 regardless of start_key->flag value and the whole if condition is always false. As a result get_partition_set is never executed, which might affect performance.
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
To fix that we need to compare using == instead of &:
if (start_key->key && (start_key->flag == HA_READ_KEY_EXACT))
Attachments
Issue Links
- causes
-
MDEV-32534 Assertion `marked_for_read()' fails in Field::hash_not_null
- Open