diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 71345df747eaeb3a7df77de63f9db748ff69f0e4..e799ef4adcb79ca3551fb0260a2673cc305bc050 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -374,6 +374,13 @@ int metaCreateTable(SMeta *pMeta, int64_t version, SVCreateTbReq *pReq) { } 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 me.version = version; me.type = pReq->type;