diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 615183f9f3863695134dd6f706034b12987bac47..54bd4807415fc34d4945828ae442c93813f4faae 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -5161,7 +5161,7 @@ int parseJsontoTagData(char* json, SKVRowBuilder* kvRowBuilder, char* errMsg, in goto end; } - int jsonIndex = startColId++; + int jsonIndex = ++startColId; for(int i = 0; i < size; i++) { cJSON* item = cJSON_GetArrayItem(root, i); if (!item) { diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index 14d0ee9b4ff2aa5871e1f4e02eb3eca532f129b3..441648fc306e1c750f28d40478631362a75aab2e 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -1122,7 +1122,7 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper tablist = (SArray**)&tablistNew; } JsonMapValue jmvalue = {TABLE_UID(pTable), pColIdx->colId}; - taosArrayPush(*tablist, &jmvalue); + taosArrayAddBatch(*tablist, &jmvalue, 1); taosArraySort(*tablist, tscCompareJsonMapValue); } }else{