From f755ed40a18730911680ed164e729e7ccb00e55b Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 20 May 2020 17:54:21 +0800 Subject: [PATCH] [TD-375] --- src/util/src/tutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/src/tutil.c b/src/util/src/tutil.c index 52f70bdf5e..989273e051 100644 --- a/src/util/src/tutil.c +++ b/src/util/src/tutil.c @@ -416,12 +416,12 @@ void getTmpfilePath(const char *fileNamePrefix, char *dstPath) { #else char *tmpDir = "/tmp/"; #endif - + int64_t ts = taosGetTimestampUs(); strcpy(tmpPath, tmpDir); strcat(tmpPath, tdengineTmpFileNamePrefix); strcat(tmpPath, fileNamePrefix); - strcat(tmpPath, "-%llu-%u"); - snprintf(dstPath, PATH_MAX, tmpPath, taosGetPthreadId(), atomic_add_fetch_32(&tmpFileSerialNum, 1)); + strcat(tmpPath, "-%d-%"PRIu64"-%u-%"PRIu64); + snprintf(dstPath, PATH_MAX, tmpPath, getpid(), taosGetPthreadId(), atomic_add_fetch_32(&tmpFileSerialNum, 1), ts); } int tasoUcs4Compare(void* f1_ucs4, void *f2_ucs4, int bytes) { -- GitLab