diff --git a/src/query/src/qExtbuffer.c b/src/query/src/qExtbuffer.c index a73f38528266bfa70790414a2963eb0a8290d7b9..73b5b81e52628a4bd151869487150d97a09b8155 100644 --- a/src/query/src/qExtbuffer.c +++ b/src/query/src/qExtbuffer.c @@ -266,6 +266,7 @@ int32_t tExtMemBufferFlush(tExtMemBuffer *pMemBuffer) { size_t retVal = fwrite((char *)&(first->item), pMemBuffer->pageSize, 1, pMemBuffer->file); if (retVal <= 0) { // failed to write to buffer, may be not enough space ret = TAOS_SYSTEM_ERROR(errno); + pMemBuffer->pHead = first; return ret; }