提交 09cc26f0 编写于 作者: S slzhou

fix: return syntax error when field num is zero in line protocol

上级 8905096b
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册