[TD-2654]<fix>: fix crash caused by cancel cluster query.

This commit is contained in:
Haojun Liao 2021-01-05 14:41:15 +08:00
parent e534490a0b
commit ba96c0816a
1 changed files with 7 additions and 0 deletions

View File

@ -2094,6 +2094,13 @@ static SSqlObj *tscCreateSTableSubquery(SSqlObj *pSql, SRetrieveSupport *trsuppo
}
void tscRetrieveDataRes(void *param, TAOS_RES *tres, int code) {
// the param may be null, since it may be done by other query threads. and the asyncOnError may enter in this
// function while kill query by a user.
if (param == NULL) {
assert(code != TSDB_CODE_SUCCESS);
return;
}
SRetrieveSupport *trsupport = (SRetrieveSupport *) param;
SSqlObj* pParentSql = trsupport->pParentSql;