提交 bb82a7aa 编写于 作者: wmmhello's avatar wmmhello

TD-6129<feature> fix error if json key not the same type

上级 a34f209d
...@@ -122,14 +122,12 @@ int tsdbCreateTable(STsdbRepo *repo, STableCfg *pCfg) { ...@@ -122,14 +122,12 @@ int tsdbCreateTable(STsdbRepo *repo, STableCfg *pCfg) {
if (tsdbAddTableToMeta(pRepo, super, true, false) < 0) { if (tsdbAddTableToMeta(pRepo, super, true, false) < 0) {
super = NULL; super = NULL;
tsdbUnlockRepoMeta(pRepo); tsdbUnlockRepoMeta(pRepo);
super = NULL;
goto _err; goto _err;
} }
} }
if (tsdbAddTableToMeta(pRepo, table, true, false) < 0) { if (tsdbAddTableToMeta(pRepo, table, true, false) < 0) {
table = NULL; table = NULL;
tsdbUnlockRepoMeta(pRepo); tsdbUnlockRepoMeta(pRepo);
table = NULL;
goto _err; goto _err;
} }
tsdbUnlockRepoMeta(pRepo); tsdbUnlockRepoMeta(pRepo);
...@@ -1086,6 +1084,7 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper ...@@ -1086,6 +1084,7 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper
ASSERT(pSTable != NULL); ASSERT(pSTable != NULL);
pTable->pSuper = pSTable; pTable->pSuper = pSTable;
if (refSuper) T_REF_INC(pSTable);
if(pSTable->tagSchema->columns[0].type == TSDB_DATA_TYPE_JSON){ if(pSTable->tagSchema->columns[0].type == TSDB_DATA_TYPE_JSON){
ASSERT(pSTable->tagSchema->numOfCols == 1); ASSERT(pSTable->tagSchema->numOfCols == 1);
...@@ -1165,7 +1164,6 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper ...@@ -1165,7 +1164,6 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper
tSkipListPut(pSTable->pIndex, (void *)pTable); tSkipListPut(pSTable->pIndex, (void *)pTable);
} }
if (refSuper) T_REF_INC(pSTable);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册