[td-409]fix bug that callback function is not set correctly in sub-insert object.

This commit is contained in:
Haojun Liao 2020-05-28 17:45:21 +08:00
parent 6d4d454dde
commit b94905d056
1 changed files with 6 additions and 1 deletions

View File

@ -1763,7 +1763,12 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
tscError("%p failed to malloc buffer for subObj, orderOfSub:%d, reason:%s", pSql, i, strerror(errno));
break;
}
/*
* assign the callback function to fetchFp to make sure that the error process function can restore
* the callback function (multiVnodeInsertMerge) correctly.
*/
pNew->fetchFp = pNew->fp;
pSql->pSubs[i] = pNew;
tscTrace("%p sub:%p create subObj success. orderOfSub:%d", pSql, pNew, i);
}