From 9a2af8580c7f971999ea549ba9be8b052a4531f2 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 30 Jun 2022 15:06:52 +0800 Subject: [PATCH] fix:compile error in sml --- source/client/src/clientSml.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 8a9905935a..e724637620 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -2450,6 +2450,7 @@ TAOS_RES* taos_schemaless_insert(TAOS* taos, char* lines[], int numLines, int pr return NULL; } + int batchs = 0; pTscObj->schemalessType = 1; SSmlMsgBuf msg = {ERROR_MSG_BUF_DEFAULT_SIZE, request->msgBuf}; @@ -2497,8 +2498,8 @@ TAOS_RES* taos_schemaless_insert(TAOS* taos, char* lines[], int numLines, int pr goto end; } - int cnt = ceil(((double)numLines) / LINE_BATCH); - for (int i = 0; i < cnt; ++i) { + batchs = ceil(((double)numLines) / LINE_BATCH); + for (int i = 0; i < batchs; ++i) { SRequestObj* req = (SRequestObj*)createRequest(pTscObj, TSDB_SQL_INSERT); if(!req){ request->code = TSDB_CODE_OUT_OF_MEMORY; -- GitLab