[get db from meterMetInfo]

This commit is contained in:
lihui 2020-01-15 07:59:32 -04:00
parent c5dc9a1d7e
commit 97b6f96fd1
1 changed files with 10 additions and 2 deletions

View File

@ -2124,10 +2124,18 @@ int32_t tscBuildDropTableMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
SSqlCmd *pCmd = &pSql->cmd;
pMsg = doBuildMsgHeader(pSql, &pStart);
//pMsg = doBuildMsgHeader(pSql, &pStart);
SMeterMetaInfo *pMeterMetaInfo = tscGetMeterMetaInfo(pCmd, pCmd->clauseIndex, 0);
pMsg = pCmd->payload + tsRpcHeadSize;
pStart = pMsg;
SMgmtHead *pMgmt = (SMgmtHead *)pMsg;
tscGetDBInfoFromMeterId(pMeterMetaInfo->name, pMgmt->db);
pMsg += sizeof(SMgmtHead);
pDropTableMsg = (SDropTableMsg *)pMsg;
SMeterMetaInfo *pMeterMetaInfo = tscGetMeterMetaInfo(pCmd, pCmd->clauseIndex, 0);
strcpy(pDropTableMsg->meterId, pMeterMetaInfo->name);
pDropTableMsg->igNotExists = pInfo->pDCLInfo->existsCheck ? 1 : 0;