需求issue修改:修改当模糊匹配的前缀长度大于填充后总长度时的不正常报错
This commit is contained in:
@ -4054,6 +4054,12 @@ static Const* pad_string_in_like(PadContent content, const Const* strConst, int
|
|||||||
char* buf = isPadMax ? content.maxSortBuf : content.minSortBuf;
|
char* buf = isPadMax ? content.maxSortBuf : content.minSortBuf;
|
||||||
int buflen = isPadMax ? content.maxBufLen : content.minBufLen;
|
int buflen = isPadMax ? content.maxBufLen : content.minBufLen;
|
||||||
int padLen = length - pg_mbstrlen_with_len(workstr, curLen);
|
int padLen = length - pg_mbstrlen_with_len(workstr, curLen);
|
||||||
|
/* When the pad length is less than or equal to zero,
|
||||||
|
* we don't generate the index condition.
|
||||||
|
*/
|
||||||
|
if (padLen <= 0) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
errno_t rc = EOK;
|
errno_t rc = EOK;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user