From bb82a7aa3148e2345ae6a8651247614e67af3ec1 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 19 Oct 2021 15:36:09 +0800 Subject: [PATCH] TD-6129 fix error if json key not the same type --- src/tsdb/src/tsdbMeta.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index 4ae4d03cb0..c3e161e28c 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -122,14 +122,12 @@ int tsdbCreateTable(STsdbRepo *repo, STableCfg *pCfg) { if (tsdbAddTableToMeta(pRepo, super, true, false) < 0) { super = NULL; tsdbUnlockRepoMeta(pRepo); - super = NULL; goto _err; } } if (tsdbAddTableToMeta(pRepo, table, true, false) < 0) { table = NULL; tsdbUnlockRepoMeta(pRepo); - table = NULL; goto _err; } tsdbUnlockRepoMeta(pRepo); @@ -1086,6 +1084,7 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper ASSERT(pSTable != NULL); pTable->pSuper = pSTable; + if (refSuper) T_REF_INC(pSTable); if(pSTable->tagSchema->columns[0].type == TSDB_DATA_TYPE_JSON){ ASSERT(pSTable->tagSchema->numOfCols == 1); @@ -1165,7 +1164,6 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper tSkipListPut(pSTable->pIndex, (void *)pTable); } - if (refSuper) T_REF_INC(pSTable); return 0; } -- GitLab