diff --git a/src/query/src/qResultbuf.c b/src/query/src/qResultbuf.c index 2443381194342c90582492536b1826409d1f5fca..c1ce43b9ddf59178dde90b37b05c2f38817fddb5 100644 --- a/src/query/src/qResultbuf.c +++ b/src/query/src/qResultbuf.c @@ -54,7 +54,7 @@ int32_t getResBufSize(SDiskbasedResultBuf* pResultBuf) { return pResultBuf->tota static int32_t createDiskResidesBuf(SDiskbasedResultBuf* pResultBuf) { // pResultBuf->fd = open(pResultBuf->path, O_CREAT | O_RDWR, 0666); - pResultBuf->file = fopen(pResultBuf->path, "r+"); + pResultBuf->file = fopen(pResultBuf->path, "w"); if (pResultBuf->file == NULL) { qError("failed to create tmp file: %s on disk. %s", pResultBuf->path, strerror(errno)); return TAOS_SYSTEM_ERROR(errno);