From d338e4dc60a9834d2cec4f2d9f0a5b041ee70b04 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 30 Aug 2022 10:38:32 +0800 Subject: [PATCH] fix(query): set correct length value. --- source/libs/function/src/builtinsimpl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index 417875838a..1633065ea9 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -3627,8 +3627,7 @@ static int32_t doUpdateTupleData(SSerializeDataHandle* pHandle, const void* pBuf } static int32_t updateTupleData(SqlFunctionCtx* pCtx, int32_t rowIndex, const SSDataBlock* pSrcBlock, STuplePos* pPos) { - int32_t rowLen = 0; - int32_t completeRowSize = rowLen + pCtx->subsidiaries.num * sizeof(bool); + int32_t completeRowSize = pCtx->subsidiaries.rowLen + pCtx->subsidiaries.num * sizeof(bool); char* buf = serializeTupleData(pSrcBlock, rowIndex, &pCtx->subsidiaries, pCtx->subsidiaries.buf); doUpdateTupleData(&pCtx->saveHandle, buf, completeRowSize, pPos); return TSDB_CODE_SUCCESS; -- GitLab