From 33452da7bdadce1dd283722b27324bedc6db906f Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Wed, 22 Jun 2022 19:45:41 +0800 Subject: [PATCH] feat: alter local command --- include/util/tconfig.h | 3 ++- source/libs/command/src/command.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/util/tconfig.h b/include/util/tconfig.h index fd6360aaf6..102656da2b 100644 --- a/include/util/tconfig.h +++ b/include/util/tconfig.h @@ -33,7 +33,8 @@ typedef enum { CFG_STYPE_ENV_CMD, CFG_STYPE_APOLLO_URL, CFG_STYPE_ARG_LIST, - CFG_STYPE_TAOS_OPTIONS + CFG_STYPE_TAOS_OPTIONS, + CFG_STYPE_ALTER_CMD, } ECfgSrcType; typedef enum { diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 6b0a84a37e..8869e679ae 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -550,7 +550,13 @@ static int32_t execShowCreateSTable(SShowCreateTableStmt* pStmt, SRetrieveTableR return execShowCreateTable(pStmt, pRsp); } -static int32_t execAlterLocal(SAlterLocalStmt* pStmt) { return TSDB_CODE_FAILED; } +static int32_t execAlterLocal(SAlterLocalStmt* pStmt) { + if (cfgSetItem(tsCfg, pStmt->config, pStmt->value, CFG_STYPE_ALTER_CMD)) { + return terrno; + } + + return TSDB_CODE_SUCCESS; +} static SSDataBlock* buildLocalVariablesResultDataBlock() { SSDataBlock* pBlock = taosMemoryCalloc(1, sizeof(SSDataBlock));