fix(query): fix string compare function.
This commit is contained in:
parent
96f21afe8f
commit
04ce7ffcb8
|
@ -189,7 +189,11 @@ int32_t compareLenPrefixedStr(const void *pLeft, const void *pRight) {
|
|||
int32_t minLen = MIN(len1, len2);
|
||||
int32_t ret = strncmp(varDataVal(pLeft), varDataVal(pRight), minLen);
|
||||
if (ret == 0) {
|
||||
if (len1 == len2) {
|
||||
return 0;
|
||||
} else {
|
||||
return len1 > len2 ? 1 : -1;
|
||||
}
|
||||
} else {
|
||||
return ret > 0 ? 1 : -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue