fix: taosSetAllDebugFlag ignore flag=0

This commit is contained in:
Shungang Li 2024-07-25 14:31:10 +08:00
parent 5b8a67e59e
commit 3fde6efb4e
1 changed files with 2 additions and 1 deletions

View File

@ -1884,7 +1884,8 @@ int32_t taosSetGlobalDebugFlag(int32_t flag) { return taosSetAllDebugFlag(tsCfg,
// NOTE: set all command does not change the tmrDebugFlag // NOTE: set all command does not change the tmrDebugFlag
static int32_t taosSetAllDebugFlag(SConfig *pCfg, int32_t flag) { static int32_t taosSetAllDebugFlag(SConfig *pCfg, int32_t flag) {
if (flag <= 0) TAOS_RETURN(TSDB_CODE_INVALID_PARA); if (flag < 0) TAOS_RETURN(TSDB_CODE_INVALID_PARA);
if (flag == 0) TAOS_RETURN(TSDB_CODE_SUCCESS); // just ignore
SArray *noNeedToSetVars = NULL; SArray *noNeedToSetVars = NULL;
SConfigItem *pItem = cfgGetItem(pCfg, "debugFlag"); SConfigItem *pItem = cfgGetItem(pCfg, "debugFlag");