fix: set terrno
This commit is contained in:
parent
e0f9dc1dce
commit
c135ee8358
|
@ -1280,6 +1280,7 @@ static UsingRegex *getRegComp(const char *pPattern) {
|
||||||
UsingRegex *pUsingRegex = taosMemoryMalloc(sizeof(UsingRegex));
|
UsingRegex *pUsingRegex = taosMemoryMalloc(sizeof(UsingRegex));
|
||||||
if (pUsingRegex == NULL) {
|
if (pUsingRegex == NULL) {
|
||||||
uError("Failed to Malloc when compile regex pattern %s.", pPattern);
|
uError("Failed to Malloc when compile regex pattern %s.", pPattern);
|
||||||
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
int32_t cflags = REG_EXTENDED;
|
int32_t cflags = REG_EXTENDED;
|
||||||
|
@ -1306,11 +1307,13 @@ static UsingRegex *getRegComp(const char *pPattern) {
|
||||||
} else {
|
} else {
|
||||||
uError("Failed to get regex pattern %s from cache, exception internal error.", pPattern);
|
uError("Failed to get regex pattern %s from cache, exception internal error.", pPattern);
|
||||||
taosThreadRwlockUnlock(&sRegexCache.regexLock);
|
taosThreadRwlockUnlock(&sRegexCache.regexLock);
|
||||||
|
terrno = TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uError("Failed to put regex pattern %s into cache, exception internal error.", pPattern);
|
uError("Failed to put regex pattern %s into cache, exception internal error.", pPattern);
|
||||||
taosThreadRwlockUnlock(&sRegexCache.regexLock);
|
taosThreadRwlockUnlock(&sRegexCache.regexLock);
|
||||||
|
terrno = TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue