enh: support drop table with uid
This commit is contained in:
parent
33047e7d7f
commit
cac1ce28ad
|
@ -377,7 +377,6 @@ static int32_t collectMetaKeyFromCreateSubTableFromFile(SCollectMetaKeyCxt*
|
|||
static int32_t collectMetaKeyFromDropTable(SCollectMetaKeyCxt* pCxt, SDropTableStmt* pStmt) {
|
||||
int32_t code = TSDB_CODE_SUCCESS;
|
||||
SNode* pNode = NULL;
|
||||
// char tableName[50] = "aa\u00bf\u200bstb0";
|
||||
FOREACH(pNode, pStmt->pTables) {
|
||||
SDropTableClause* pClause = (SDropTableClause*)pNode;
|
||||
if (pStmt->withOpt) {
|
||||
|
@ -409,18 +408,8 @@ static int32_t collectMetaKeyFromDropTable(SCollectMetaKeyCxt* pCxt, SDropTableS
|
|||
}
|
||||
|
||||
static int32_t collectMetaKeyFromDropStable(SCollectMetaKeyCxt* pCxt, SDropSuperTableStmt* pStmt) {
|
||||
int32_t code = TSDB_CODE_SUCCESS;
|
||||
if (pStmt->withOpt) {
|
||||
code = reserveTableUidInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, pCxt->pMetaCache);
|
||||
#if 0
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
code = reserveDbVgInfoInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache);
|
||||
}
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
code = reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache);
|
||||
}
|
||||
#endif
|
||||
return code;
|
||||
return reserveTableUidInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, pCxt->pMetaCache);
|
||||
}
|
||||
return reserveUserAuthInCache(pCxt->pParseCxt->acctId, pCxt->pParseCxt->pUser, pStmt->dbName, pStmt->tableName,
|
||||
AUTH_TYPE_WRITE, pCxt->pMetaCache);
|
||||
|
|
|
@ -116,6 +116,12 @@ class TDTestCase:
|
|||
tdSql.query(f'select * from {stbname} where {k} = {self.ts}')
|
||||
tdSql.checkRows(self.tbnum)
|
||||
tdSql.execute(f'drop database {self.dbname}')
|
||||
def drop_table_with_check(self):
|
||||
stb_names = [ f'stb0', f'aa\u00bf\u200bstb0']
|
||||
ctb_names = [ f'ctb0', f'aa\u00bf\u200bctb0']
|
||||
ntb_names = [ f'ntb0', f'aa\u00bf\u200bntb0']
|
||||
tdSql.execute(f'create database {self.dbname} replica {self.replicaVar} wal_retention_period 3600')
|
||||
tdSql.execute(f'drop database {self.dbname}')
|
||||
def drop_topic_check(self):
|
||||
tdSql.execute(f'create database {self.dbname} replica {self.replicaVar} wal_retention_period 3600')
|
||||
tdSql.execute(f'use {self.dbname}')
|
||||
|
@ -161,6 +167,7 @@ class TDTestCase:
|
|||
def run(self):
|
||||
self.drop_ntb_check()
|
||||
self.drop_stb_ctb_check()
|
||||
self.drop_table_with_check()
|
||||
self.drop_topic_check()
|
||||
if platform.system().lower() == 'windows':
|
||||
self.drop_stream_check()
|
||||
|
|
Loading…
Reference in New Issue