From 97b6f96fd1919550f298422aea473ce8e98266dd Mon Sep 17 00:00:00 2001 From: lihui Date: Wed, 15 Jan 2020 07:59:32 -0400 Subject: [PATCH] [get db from meterMetInfo] --- src/client/src/tscServer.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 0fad02da99..17e14a42e6 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -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;