From dd1d9301d0e1d9d690da7d4398bf1fc54d11663c Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Fri, 3 Dec 2021 11:36:40 +0800 Subject: [PATCH] Revert "with atomic variable" This reverts commit 975890643339d2e022e6b2bc07b7a1c7d274c316. --- src/client/src/tscParseOpenTSDB.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscParseOpenTSDB.c b/src/client/src/tscParseOpenTSDB.c index 072b5926ee..e1486c22dc 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; -- GitLab