fix sql empty issue

This commit is contained in:
dapan1121 2021-01-26 10:54:06 +08:00
parent 3480099198
commit cdb0a639bb
1 changed files with 5 additions and 0 deletions

View File

@ -6424,6 +6424,11 @@ static int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SArray **pTableIdList,
pMsg += pQueryMsg->tbnameCondLen;
}
//skip ts buf
if ((pQueryMsg->tsOffset + pQueryMsg->tsLen) > 0) {
pMsg = (char *)pQueryMsg + pQueryMsg->tsOffset + pQueryMsg->tsLen;
}
*sql = strndup(pMsg, pQueryMsg->sqlstrLen);
if (!validateQuerySourceCols(pQueryMsg, *pExpr, *tagCols)) {