From 4e6781d7531ba5ac9648a2cb9e3f66aff0c2ba04 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 2 Sep 2024 16:50:30 +0800 Subject: [PATCH] fix: add encode debug info --- source/common/src/tdatablock.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 718763e063..8cf7094fc3 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -3009,6 +3009,13 @@ int32_t blockEncode(const SSDataBlock* pBlock, char* data, int32_t numOfCols) { data += colSizes[col]; } + if (colSizes[col] <= 0) { + uError("Invalid colSize:%d while encoding block", colSizes[col]); + ASSERT(0); + terrno = TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR; + return -1; + } + colSizes[col] = htonl(colSizes[col]); // uError("blockEncode col bytes:%d, type:%d, size:%d, htonl size:%d", pColRes->info.bytes, pColRes->info.type, // htonl(colSizes[col]), colSizes[col]);