fix duplicate table bug
This commit is contained in:
parent
264622366e
commit
4e130634e5
|
@ -289,6 +289,13 @@ int tsdbCreateTable(TsdbRepoT *repo, STableCfg *pCfg) {
|
||||||
|
|
||||||
if (tsdbCheckTableCfg(pCfg) < 0) return -1;
|
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;
|
STable *super = NULL;
|
||||||
int newSuper = 0;
|
int newSuper = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue