diff --git a/src/client/src/tscParseOpenTSDB.c b/src/client/src/tscParseOpenTSDB.c index 072b5926ee33ff481bd7d4d870d7be3045e2b780..e1486c22dc250af210beb853b9562534149a55a4 100644 --- a/src/client/src/tscParseOpenTSDB.c +++ b/src/client/src/tscParseOpenTSDB.c @@ -420,9 +420,10 @@ int tscSmlInsert2(TAOS* taos, TAOS_SML_DATA_POINT* points, int numPoint, SSmlLin static int64_t l = 0; for (int i = 0; i < numPoint; ++i) { char sql[512]; - sprintf(sql, "insert into `sml`(`ts`,`value`) values(%" PRId64 ",%f)", ts+ atomic_add_fetch_64(&l, 1), 4.2); + sprintf(sql, "insert into `sml`(`ts`,`value`) values(%" PRId64 ",%f)", ts+l, 4.2); TAOS_RES* res = taos_query(taos, sql); taos_free_result(res); + ++l; } info->affectedRows = numPoint; return TSDB_CODE_SUCCESS;