From a8f4390a83b41de4c7b8f3522f678f5f27f306b8 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 24 Jun 2024 15:53:35 +0800 Subject: [PATCH] fix:add db configuration that not reportted --- source/client/src/clientEnv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 7c95526f26..d361148701 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -221,9 +221,8 @@ static void deregisterRequest(SRequestObj *pRequest) { } } - if (duration >= ((pTscObj->pAppInfo->monitorParas.tsSlowLogThreshold * 1000000UL || - duration >= tsSlowLogThresholdTest * 1000000UL) && - strcmp(pRequest->pDb, tsSlowLogExceptDb) != 0)) { + if (duration >= ((pTscObj->pAppInfo->monitorParas.tsSlowLogThreshold * 1000000UL || duration >= tsSlowLogThresholdTest * 1000000UL) && + (pRequest->pDb == NULL || strcmp(pRequest->pDb, tsSlowLogExceptDb) != 0))) { atomic_add_fetch_64((int64_t *)&pActivity->numOfSlowQueries, 1); if (pTscObj->pAppInfo->monitorParas.tsSlowLogScope & reqType) { taosPrintSlowLog("PID:%d, Conn:%u, QID:0x%" PRIx64 ", Start:%" PRId64 " us, Duration:%" PRId64 "us, SQL:%s",