fix duplicate table bug

This commit is contained in:
Hongze Cheng 2020-05-22 05:07:53 +00:00
parent 264622366e
commit 4e130634e5
1 changed files with 7 additions and 0 deletions

View File

@ -289,6 +289,13 @@ int tsdbCreateTable(TsdbRepoT *repo, STableCfg *pCfg) {
if (tsdbCheckTableCfg(pCfg) < 0) return -1;
STable *pTable = tsdbGetTableByUid(pMeta, pCfg->tableId.uid);
if (pTable != NULL) {
tsdbError("vgId:%d table %s already exists, tid %d uid %" PRId64, pRepo->config.tsdbId, varDataVal(pTable->name),
pTable->tableId.tid, pTable->tableId.uid);
return TSDB_CODE_TABLE_ALREADY_EXIST;
}
STable *super = NULL;
int newSuper = 0;