提交 dd1d9301 编写于 作者: S shenglian zhou

Revert "with atomic variable"

This reverts commit 97589064.
上级 97589064
...@@ -420,9 +420,10 @@ int tscSmlInsert2(TAOS* taos, TAOS_SML_DATA_POINT* points, int numPoint, SSmlLin ...@@ -420,9 +420,10 @@ int tscSmlInsert2(TAOS* taos, TAOS_SML_DATA_POINT* points, int numPoint, SSmlLin
static int64_t l = 0; static int64_t l = 0;
for (int i = 0; i < numPoint; ++i) { for (int i = 0; i < numPoint; ++i) {
char sql[512]; 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_RES* res = taos_query(taos, sql);
taos_free_result(res); taos_free_result(res);
++l;
} }
info->affectedRows = numPoint; info->affectedRows = numPoint;
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册