-
Venkata Sidagam authored
Brief description: Insert some rows to MEMORY table with HASH key on varchar field. A select on specific existing tuple is showing empty set. Problem Analysis/solution: In hp_key_cmp() when the seg->type == HA_KEYTYPE_VARTEXT1 the char_length_rec is the length of pos string and it is compared with key string for char_length_key bytes. Here both char_length_rec and char_length_key will be of different values when we have hash index on column prefix. So the comparition is failing and the result set is empty. So the fix is, if char_length_rec has more value than the char_length_key make char_length_rec as same as char_length_key
Venkata Sidagam authoredBrief description: Insert some rows to MEMORY table with HASH key on varchar field. A select on specific existing tuple is showing empty set. Problem Analysis/solution: In hp_key_cmp() when the seg->type == HA_KEYTYPE_VARTEXT1 the char_length_rec is the length of pos string and it is compared with key string for char_length_key bytes. Here both char_length_rec and char_length_key will be of different values when we have hash index on column prefix. So the comparition is failing and the result set is empty. So the fix is, if char_length_rec has more value than the char_length_key make char_length_rec as same as char_length_key
Loading