[td-225] fix error for super table subqueries.

This commit is contained in:
Haojun Liao 2020-06-11 19:13:58 +08:00
parent f4f196e93b
commit 60c357a5d0
6 changed files with 68 additions and 61 deletions

View File

@ -219,7 +219,7 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcIpSet *pIpSet) {
STscObj *pObj = pSql->pTscObj;
// tscTrace("%p msg:%s is received from server", pSql, taosMsg[rpcMsg->msgType]);
if (pObj->signature != pObj) {
if (pObj->signature != pObj || pSql->freed == 1) {
tscTrace("%p sql is already released or DB connection is closed, freed:%d pObj:%p signature:%p", pSql, pSql->freed,
pObj, pObj->signature);
tscFreeSqlObj(pSql);

View File

@ -522,7 +522,14 @@ void taos_free_result(TAOS_RES *res) {
// in case of sync model query, waits for response and then goes on
if (pSql->fp == waitForQueryRsp || pSql->fp == waitForRetrieveRsp) {
sem_wait(&pSql->rspSem);
tscFreeSqlObj(pSql);
tscTrace("%p sqlObj is freed by app", pSql);
} else {
tscTrace("%p sqlObj will be freed while rsp received", pSql);
}
return;
}
tscFreeSqlObj(pSql);

View File

@ -90,7 +90,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SReadMsg *pReadMsg) {
assert(pReadMsg->rpcMsg.contLen > 0 && killQueryMsg->free == 1);
qKillQuery((qinfo_t) killQueryMsg->qhandle);
return TSDB_CODE_SUCCESS;
return TSDB_CODE_TSC_QUERY_CANCELLED; // todo error
}
int32_t code = TSDB_CODE_SUCCESS;