From b94905d0560aeb770a61a45e73393674e68b4b7e Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 28 May 2020 17:45:21 +0800 Subject: [PATCH] [td-409]fix bug that callback function is not set correctly in sub-insert object. --- src/client/src/tscSubquery.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 8c741dfdc8..c4fe0b202b 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); }