未验证 提交 a12f3648 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #16783 from taosdata/szhou/2.4/fixbugs

fix: syntax error when no fields in line
......@@ -2608,7 +2608,7 @@ 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) {
if (smlData->fieldNum <= 1) {
tscDebug("SML:0x%"PRIx64" Parse fields error, no field in line", info->id);
taosHashCleanup(keyHashTable);
return TSDB_CODE_TSC_LINE_SYNTAX_ERROR;
......
......@@ -208,6 +208,14 @@ class TDTestCase:
tdSql.query("select * from type_json5")
tdSql.checkData(0, 2, '''{"jsonC":"0"}''')
try:
self._conn.schemaless_insert([
"measurement,host=host1 field1=12i,field2=2.0,fieldKey=\"Launch\" 1654078242716",
"measurement,host=host1"
], TDSmlProtocolType.LINE.value, TDSmlTimestampType.MILLI_SECOND.value)
tdLog.exit("%s failed: no exception happen here" % __file__)
except Exception as e:
pass
def stop(self):
tdSql.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册