fix latin1 bug: hash_sort_8bit_bin

This commit is contained in:
akaError
2023-02-24 12:01:04 +00:00
committed by ob-robot
parent 75a8d8397a
commit 4d06b2886d

View File

@ -386,13 +386,14 @@ loop:
return 0; return 0;
} }
void ob_hash_sort_8bit_bin(const ObCharsetInfo *cs __attribute__((unused)), void ob_hash_sort_8bit_bin(const ObCharsetInfo *cs __attribute__((unused)),
const uchar *key, size_t len, ulong *nr1, ulong *nr2, const bool calc_end_space __attribute__((unused)), const uchar *key, size_t len, ulong *nr1, ulong *nr2, const bool calc_end_space, hash_algo hash_algo)
hash_algo hash_algo)
{ {
const uchar *pos = key; const uchar *pos = key;
key += len; key += len;
//trailing space to make 'A ' == 'A' //trailing space to make 'A ' == 'A'
key = skip_trailing_space(key, len, 0); if (!calc_end_space) {
key = skip_trailing_space(pos, len, 0);
}
if (NULL == hash_algo) if (NULL == hash_algo)
{ {
for (; pos < (uchar*) key ; pos++) for (; pos < (uchar*) key ; pos++)