diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 81056f2f774fe413415a9b251fb81131964478a2..a5673378f5646479ab53d638e5ff74dee9a4c879 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -930,7 +930,7 @@ _cleanup: free(colKVs); if (r == fromIndex) { - tscError("buffer can not fit one line"); + tscDebug("buffer can not fit one line"); *cTableSqlLen = 0; } else { *cTableSqlLen = totalLen; @@ -2608,6 +2608,12 @@ int32_t tscParseLine(const char* sql, TAOS_SML_DATA_POINT* smlData, SSmlLinesInf return ret; } tscDebug("SML:0x%"PRIx64" Parse fields finished, num of fields:%d", info->id, smlData->fieldNum); + if (smlData->fieldNum == 0) { + tscDebug("SML:0x%"PRIx64" Parse fields error, no field in line", info->id); + taosHashCleanup(keyHashTable); + return TSDB_CODE_TSC_LINE_SYNTAX_ERROR; + } + taosHashCleanup(keyHashTable); //Parse timestamp diff --git a/src/query/src/queryMain.c b/src/query/src/queryMain.c index 325225e6958e78d0a1dafa1b2a4bd021ab0c2228..7187637b705a0adb39b1da08a90989964139c746 100644 --- a/src/query/src/queryMain.c +++ b/src/query/src/queryMain.c @@ -642,7 +642,7 @@ static int compareLongQuery(const void* p1, const void* p2) { } // callback for taosCacheRefresh -static void cbFoundItem(void* handle, void* param1) { +static void cbFoundLongQuery(void* handle, void* param1) { SQInfo * qInfo = *(SQInfo**) handle; if(qInfo == NULL) return ; SArray* qids = (SArray*) param1; @@ -654,7 +654,7 @@ static void cbFoundItem(void* handle, void* param1) { SMemTable* imem = qInfo->query.memRef.snapshot.imem; if(mem == NULL || T_REF_VAL_GET(mem) == 0) usedMem = false; - if(imem == NULL || T_REF_VAL_GET(mem) == 0) + if(imem == NULL || T_REF_VAL_GET(imem) == 0) usedIMem = false ; if(!usedMem && !usedIMem) @@ -675,7 +675,7 @@ void* qObtainLongQuery(void* param){ SArray* qids = taosArrayInit(4, sizeof(int64_t*)); if(qids == NULL) return NULL; // Get each item - taosCacheRefresh(qMgmt->qinfoPool, cbFoundItem, qids); + taosCacheRefresh(qMgmt->qinfoPool, cbFoundLongQuery, qids); size_t cnt = taosArrayGetSize(qids); if(cnt == 0) {