[td-11818]fix bug in drop stable.
This commit is contained in:
parent
5ef5af8865
commit
f3de50620c
|
@ -152,6 +152,7 @@ int32_t parseSql(SRequestObj* pRequest, SQueryNode** pQuery) {
|
|||
.pMsg = pRequest->msgBuf,
|
||||
.msgLen = ERROR_MSG_BUF_DEFAULT_SIZE
|
||||
};
|
||||
|
||||
int32_t code = qParseQuerySql(&cxt, pQuery);
|
||||
tfree(cxt.ctx.db);
|
||||
return code;
|
||||
|
|
|
@ -12,7 +12,7 @@ SDropUserMsg* buildDropUserMsg(SSqlInfo* pInfo, int32_t* outputLen, int64_t id,
|
|||
SShowMsg* buildShowMsg(SShowInfo* pShowInfo, SParseBasicCtx* pParseCtx, char* msgBuf, int32_t msgLen);
|
||||
SCreateDbMsg* buildCreateDbMsg(SCreateDbInfo* pCreateDbInfo, SParseBasicCtx *pCtx, SMsgBuf* pMsgBuf);
|
||||
SCreateStbMsg* buildCreateTableMsg(SCreateTableSql* pCreateTableSql, int32_t* len, SParseBasicCtx* pParseCtx, SMsgBuf* pMsgBuf);
|
||||
SDropTableMsg* buildDropTableMsg(SSqlInfo* pInfo, int32_t* len, SParseBasicCtx* pParseCtx, SMsgBuf* pMsgBuf);
|
||||
SDropStbMsg* buildDropStableMsg(SSqlInfo* pInfo, int32_t* len, SParseBasicCtx* pParseCtx, SMsgBuf* pMsgBuf);
|
||||
SCreateDnodeMsg *buildCreateDnodeMsg(SSqlInfo* pInfo, int32_t* len, SMsgBuf* pMsgBuf);
|
||||
SDropDnodeMsg *buildDropDnodeMsg(SSqlInfo* pInfo, int32_t* len, SMsgBuf* pMsgBuf);
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ SCreateStbMsg* buildCreateTableMsg(SCreateTableSql* pCreateTableSql, int32_t* le
|
|||
return pCreateTableMsg;
|
||||
}
|
||||
|
||||
SDropTableMsg* buildDropTableMsg(SSqlInfo* pInfo, int32_t* len, SParseBasicCtx* pParseCtx, SMsgBuf* pMsgBuf) {
|
||||
SDropStbMsg* buildDropStableMsg(SSqlInfo* pInfo, int32_t* len, SParseBasicCtx* pParseCtx, SMsgBuf* pMsgBuf) {
|
||||
SToken* tableName = taosArrayGet(pInfo->pMiscInfo->a, 0);
|
||||
|
||||
SName name = {0};
|
||||
|
@ -366,12 +366,12 @@ SDropTableMsg* buildDropTableMsg(SSqlInfo* pInfo, int32_t* len, SParseBasicCtx*
|
|||
return NULL;
|
||||
}
|
||||
|
||||
SDropTableMsg *pDropTableMsg = (SDropTableMsg*) calloc(1, sizeof(SDropTableMsg));
|
||||
SDropStbMsg *pDropTableMsg = (SDropStbMsg*) calloc(1, sizeof(SDropStbMsg));
|
||||
|
||||
code = tNameExtractFullName(&name, pDropTableMsg->name);
|
||||
assert(code == TSDB_CODE_SUCCESS && name.type == TSDB_TABLE_NAME_T);
|
||||
|
||||
pDropTableMsg->ignoreNotExists = pInfo->pMiscInfo->existsCheck ? 1 : 0;
|
||||
pDropTableMsg->igNotExists = pInfo->pMiscInfo->existsCheck ? 1 : 0;
|
||||
*len = sizeof(SDropTableMsg);
|
||||
return pDropTableMsg;
|
||||
}
|
||||
|
|
|
@ -710,7 +710,7 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, SDclStm
|
|||
}
|
||||
|
||||
case TSDB_SQL_DROP_TABLE: {
|
||||
pDcl->pMsg = (char*)buildDropTableMsg(pInfo, &pDcl->msgLen, pCtx, pMsgBuf);
|
||||
pDcl->pMsg = (char*)buildDropStableMsg(pInfo, &pDcl->msgLen, pCtx, pMsgBuf);
|
||||
if (pDcl->pMsg == NULL) {
|
||||
code = terrno;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue