schemaless: add regfree and change uerror to udebug

This commit is contained in:
shenglian zhou 2021-08-30 09:24:13 +08:00
parent 85ddd76db2
commit 28f2f0d70b
2 changed files with 2 additions and 1 deletions

View File

@ -4531,6 +4531,7 @@ static int32_t validateMatchExpr(tSqlExpr* pExpr, STableMeta* pTableMeta, int32_
tscError("Failed to compile regex pattern %s. reason %s", pattern, regErrBuf); tscError("Failed to compile regex pattern %s. reason %s", pattern, regErrBuf);
return invalidOperationMsg(msgBuf, msg3); return invalidOperationMsg(msgBuf, msg3);
} }
regfree(&regex);
} }
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;

View File

@ -378,7 +378,7 @@ int32_t compareStrRegexComp(const void* pLeft, const void* pRight) {
errCode = regexec(&regex, str, 0, NULL, 0); errCode = regexec(&regex, str, 0, NULL, 0);
if (errCode != 0 && errCode != REG_NOMATCH) { if (errCode != 0 && errCode != REG_NOMATCH) {
regerror(errCode, &regex, msgbuf, sizeof(msgbuf)); regerror(errCode, &regex, msgbuf, sizeof(msgbuf));
uError("Failed to match %s with pattern %s, reason %s", str, pattern, msgbuf) uDebug("Failed to match %s with pattern %s, reason %s", str, pattern, msgbuf)
} }
int32_t result = (errCode == 0) ? 0 : 1; int32_t result = (errCode == 0) ? 0 : 1;
regfree(&regex); regfree(&regex);