maria-developers team mailing list archive
Mailing list archive
Re: Sachin weekly report
On Aug 23, Sachin Setia wrote:
> > Looks simpler, agree. The length of the keypart should not matter,
> > because it should never be used. May be it would be good to set it to -1
> > as it might help to catch errors (where it is erroneously used).
> I think it should , because we make buffer size according to key_ptr->length.
> For example , this code at test_quick_select
> (param.min_key= (uchar*)alloc_root(&alloc,max_key_len)
> here max_key_length is sum of lengths of all key_part->store_length
> and also in function get_mm_leaf we use
> field->get_key_image(str+maybe_null, key_part->length,
> So I think length will matter.
For normal keys, yes. But for your HA_UNIQUE_HASH keys the buffer size
is not the sum of key_part lengths. So using key_part->length to
calculate the buffer size for HA_UNIQUE_HASH is wrong, I'd say.
Chief Architect MariaDB