diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index c0cc2ea3ae92866e29807f9edaaa136df6a9a678..61f9cd9e765dbd722cfc84d1807efaab94bb3428 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -225,7 +225,7 @@ int32_t addTaosFieldToHashAndArray(TAOS_SML_KV* smlKv, SHashObj* hash, SArray* a int32_t generateSchemaAction(SSchema* pointColField, SHashObj* dbAttrHash, bool isTag, char sTableName[], SSchemaAction* action, bool* actionNeeded) { SSchema** ppDbAttr = taosHashGet(dbAttrHash, pointColField->name, strlen(pointColField->name)); - if (*ppDbAttr) { + if (ppDbAttr) { SSchema* dbAttr = *ppDbAttr; if (pointColField->type != dbAttr->type) { //todo error diff --git a/tests/examples/c/apitest.c b/tests/examples/c/apitest.c index 656d5fd21745903765f53fcb59d97a2148adc0e4..5cb3f5762ad8884c94093ff3b39093f6fd7d52a1 100644 --- a/tests/examples/c/apitest.c +++ b/tests/examples/c/apitest.c @@ -958,13 +958,15 @@ int32_t verify_schema_less(TAOS* taos) { taos_free_result(result); usleep(100000); taos_select_db(taos, "test"); + result = taos_query(taos, "create stable ste(ts timestamp, f int) tags(t1 bigint)"); char* lines[] = { "st,t1=3i,t2=4,t3=\"t3\" c1=3i,c3=L\"passit\",c2=false,c4=4 1626006833639000000", "st,t1=4i,t2=5,t3=\"t4\" c1=3i,c3=L\"passitagain\",c2=true,c4=5 1626006833640000000", - "st,t1=4i,t2=5,t3=\"t4\" c1=3i,c3=L\"passitagain\",c2=true,c4=5 1626006833642000000" + "st,t1=4i,t2=5,t3=\"t4\" c1=3i,c3=L\"passitagain\",c2=true,c4=5 1626006833642000000", + "ste,t2=5,t3=L\"ste\" c1=true,c2=4 1626056811823316532" }; - int code = taos_insert_by_lines(taos, lines , 3); + int code = taos_insert_by_lines(taos, lines , 4); return code; }