From ceb04101ebb2d592d02e0479c56aa881ca23f50f Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Thu, 2 Jun 2022 14:37:45 +0800 Subject: [PATCH] test: modify consumer processer --- tests/test/c/tmqSim.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test/c/tmqSim.c b/tests/test/c/tmqSim.c index 38b0313c14..d0b582f375 100644 --- a/tests/test/c/tmqSim.c +++ b/tests/test/c/tmqSim.c @@ -261,7 +261,13 @@ void addRowsToVgroupId(SThreadInfo* pInfo, int32_t vgroupId, int32_t rows) { } int32_t saveConsumeContentToTbl(SThreadInfo* pInfo, char* buf) { - char sqlStr[1024] = {0}; + char sqlStr[1100] = {0}; + + if (strlen(buf) > 1024) { + taosFprintfFile(g_fp, "The length of one row[%d] is overflow 1024\n", strlen(buf)); + taosCloseFile(&g_fp); + exit(-1); + } TAOS* pConn = taos_connect(NULL, "root", "taosdata", NULL, 0); assert(pConn != NULL);