fix: check super table exists or not when creating child table
This commit is contained in:
parent
1c03d61edc
commit
ab00d5670b
|
@ -374,6 +374,13 @@ int metaCreateTable(SMeta *pMeta, int64_t version, SVCreateTbReq *pReq) {
|
||||||
}
|
}
|
||||||
metaReaderClear(&mr);
|
metaReaderClear(&mr);
|
||||||
|
|
||||||
|
if (pReq->type == TSDB_CHILD_TABLE) {
|
||||||
|
tb_uid_t suid = metaGetTableEntryUidByName(pMeta, pReq->ctb.name);
|
||||||
|
if (suid == 0) {
|
||||||
|
terrno = TSDB_CODE_PAR_TABLE_NOT_EXIST;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
// build SMetaEntry
|
// build SMetaEntry
|
||||||
me.version = version;
|
me.version = version;
|
||||||
me.type = pReq->type;
|
me.type = pReq->type;
|
||||||
|
|
Loading…
Reference in New Issue