This commit is contained in:
yihaoDeng 2024-11-04 18:44:56 +08:00
parent b38d5a2492
commit 90222531e7
3 changed files with 9 additions and 4 deletions

View File

@ -395,10 +395,10 @@ typedef enum ENodeType {
QUERY_NODE_SHOW_TSMAS_STMT,
QUERY_NODE_SHOW_ANODES_STMT,
QUERY_NODE_SHOW_ANODES_FULL_STMT,
QUERY_NODE_SHOW_USAGE_STMT,
QUERY_NODE_CREATE_TSMA_STMT,
QUERY_NODE_SHOW_CREATE_TSMA_STMT,
QUERY_NODE_DROP_TSMA_STMT,
QUERY_NODE_SHOW_USAGE_STMT,
// logic plan node
QUERY_NODE_LOGIC_PLAN_SCAN = 1000,

View File

@ -3878,6 +3878,11 @@ _err:
}
SNode* createShowDiskUsageStmt(SAstCreateContext* pCxt, SNode* dbName, ENodeType type) {
CHECK_PARSER_STATUS(pCxt);
if (NULL == dbName) {
snprintf(pCxt->pQueryCxt->pMsg, pCxt->pQueryCxt->msgLen, "database not specified");
pCxt->errCode = TSDB_CODE_PAR_SYNTAX_ERROR;
CHECK_PARSER_STATUS(pCxt);
}
SShowStmt* pStmt = NULL;
pCxt->errCode = nodesMakeNode(type, (SNode**)&pStmt);

View File

@ -1904,7 +1904,7 @@ static EDealRes translateColumn(STranslateContext* pCxt, SColumnNode** pCol) {
if (pCxt->pParseCxt->biMode) {
SNode** ppNode = (SNode**)pCol;
bool ret;
bool ret;
pCxt->errCode = biRewriteToTbnameFunc(pCxt, ppNode, &ret);
if (TSDB_CODE_SUCCESS != pCxt->errCode) return DEAL_RES_ERROR;
if (ret) {
@ -10041,7 +10041,7 @@ static int32_t translateCreateIndex(STranslateContext* pCxt, SCreateIndexStmt* p
static int32_t translateDropIndex(STranslateContext* pCxt, SDropIndexStmt* pStmt) {
SMDropSmaReq dropSmaReq = {0};
SName name = {0};
SName name = {0};
toName(pCxt->pParseCxt->acctId, pStmt->indexDbName, pStmt->indexName, &name);
int32_t code = tNameExtractFullName(&name, dropSmaReq.name);
if (TSDB_CODE_SUCCESS != code) return code;
@ -11788,7 +11788,7 @@ static int32_t translateDropView(STranslateContext* pCxt, SDropViewStmt* pStmt)
#endif
SCMDropViewReq dropReq = {0};
SName name = {0};
SName name = {0};
int32_t code = tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->dbName, strlen(pStmt->dbName));
if (TSDB_CODE_SUCCESS == code) {
(void)tNameGetFullDbName(&name, dropReq.dbFName);