enh: drop table with uid

This commit is contained in:
kailixu 2024-09-19 18:55:26 +08:00
parent 9cc0702a77
commit 6f0fafdc92
3 changed files with 3 additions and 3 deletions

View File

@ -462,7 +462,7 @@ typedef enum ENodeType {
typedef struct {
int32_t vgId;
uint8_t option; // 0x01 tableUid
uint8_t option; // 0x0 REQ_OPT_TBNAME, 0x01 REQ_OPT_TBUID
const char* dbFName;
const char* tbName;
} SBuildTableInput;

View File

@ -1376,7 +1376,7 @@ int32_t ctgGetTbMetaFromVnode(SCatalog* pCtg, SRequestConnInfo* pConn, const SNa
vgroupInfo->epSet.numOfEps, pEp->fqdn, pEp->port, tbFName);
SBuildTableInput bInput = {.vgId = vgroupInfo->vgId,
.option = reqType == TDMT_VND_TABLE_NAME ? REQ_OPT_TBNAME : REQ_OPT_TBUID,
.option = reqType == TDMT_VND_TABLE_NAME ? REQ_OPT_TBUID : REQ_OPT_TBNAME,
.dbFName = dbFName,
.tbName = (char*)tNameGetTableName(pTableName)};
char* msg = NULL;

View File

@ -14647,7 +14647,7 @@ static int32_t rewriteDropSuperTablewithOpt(STranslateContext* pCxt, SQuery* pQu
toName(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, &name);
code = getTargetName(pCxt, &name, pTableName);
if (TSDB_CODE_SUCCESS != code) {
return generateSyntaxErrMsgExt(&pCxt->msgBuf, code, "Super table uid does not exist: '%s'", pStmt->tableName);
return generateSyntaxErrMsgExt(&pCxt->msgBuf, code, "Table uid does not exist: '%s'", pStmt->tableName);
}
tstrncpy(pStmt->tableName, pTableName, TSDB_TABLE_NAME_LEN); // rewrite table uid to table name