diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 8c741dfdc88906be04b2cece45ac27a4a76fbfc1..c4fe0b202bc7a05163bd25f6f2cb17482b450781 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -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); }