fix(stream): check return value.
This commit is contained in:
parent
be162fb62f
commit
46400b2dd7
|
@ -1738,7 +1738,7 @@ static int32_t mndProcessCreateTSMAReq(SRpcMsg* pReq) {
|
|||
}
|
||||
|
||||
code = mndAcquireStream(pMnode, streamName, &pStream);
|
||||
if (pStream != NULL || code != 0) {
|
||||
if (pStream != NULL || code != TSDB_CODE_MND_STREAM_NOT_EXIST) {
|
||||
mError("tsma:%s, failed to create since stream:%s already exist", createReq.name, streamName);
|
||||
terrno = TSDB_CODE_MND_SMA_ALREADY_EXIST;
|
||||
goto _OVER;
|
||||
|
|
|
@ -284,8 +284,10 @@ static int32_t doBuildAndSendCreateTableMsg(SVnode* pVnode, char* stbFullName, S
|
|||
memcpy(&tagVal.i64, pData, pTagData->info.bytes);
|
||||
}
|
||||
void* p = taosArrayPush(tagArray, &tagVal);
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
goto _end;
|
||||
if (p == NULL) {
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
goto _end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ int32_t l2ComressInitImpl_xz(char *lossyColumns, float fPrecision, double dPreci
|
|||
}
|
||||
int32_t l2CompressImpl_xz(const char *const input, const int32_t inputSize, char *const output, int32_t outputSize,
|
||||
const char type, int8_t lvl) {
|
||||
size_t len = 0;//FL2_compress(output + 1, outputSize - 1, input, inputSize, lvl);
|
||||
size_t len = FL2_compress(output + 1, outputSize - 1, input, inputSize, lvl);
|
||||
if (len > inputSize) {
|
||||
output[0] = 0;
|
||||
memcpy(output + 1, input, inputSize);
|
||||
|
@ -264,7 +264,7 @@ int32_t l2CompressImpl_xz(const char *const input, const int32_t inputSize, char
|
|||
int32_t l2DecompressImpl_xz(const char *const input, const int32_t compressedSize, char *const output,
|
||||
int32_t outputSize, const char type) {
|
||||
if (input[0] == 1) {
|
||||
return 0;//FL2_decompress(output, outputSize, input + 1, compressedSize - 1);
|
||||
return FL2_decompress(output, outputSize, input + 1, compressedSize - 1);
|
||||
} else if (input[0] == 0) {
|
||||
memcpy(output, input + 1, compressedSize - 1);
|
||||
return compressedSize - 1;
|
||||
|
|
Loading…
Reference in New Issue