From 146c36b0ad168bc93a4d86d9eb569b701e662ecd Mon Sep 17 00:00:00 2001 From: Bob Liu Date: Mon, 20 Nov 2023 19:25:31 +0800 Subject: [PATCH] rm unused --- source/dnode/mgmt/node_mgmt/src/dmEnv.c | 1 - source/libs/nodes/src/nodesCodeFuncs.c | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/source/dnode/mgmt/node_mgmt/src/dmEnv.c b/source/dnode/mgmt/node_mgmt/src/dmEnv.c index acbb3554ce..6f13abcebc 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmEnv.c +++ b/source/dnode/mgmt/node_mgmt/src/dmEnv.c @@ -17,7 +17,6 @@ #include "dmMgmt.h" #include "audit.h" #include "libs/function/tudf.h" -#include "nodes.h" #define DM_INIT_AUDIT() \ do { \ diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index d4cd37750b..0a4f9ccdd5 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -46,7 +46,6 @@ typedef struct SBuiltinNodeDefinition { SBuiltinNodeDefinition funcNodes[QUERY_NODE_END] = {NULL}; static TdThreadOnce functionNodeInit = PTHREAD_ONCE_INIT; -volatile int32_t initNodeCode = -1; static void setFunc(const char* name, int32_t type, int32_t nodeSize, FExecNodeToJson toJsonFunc, @@ -65,7 +64,7 @@ bool funcArrayCheck(int32_t type) { nodesError("funcArrayCheck out of range type = %d", type); return false; } - // only init once, do nothing when initNodeCode == 0 + // only init once, do nothing when run funcArrayCheck again taosThreadOnce(&functionNodeInit, doInitNodeFuncArray); if (!funcNodes[type].name) { @@ -7437,10 +7436,6 @@ void nodesDestroyNode(SNode* pNode) { // clang-format off static void doInitNodeFuncArray() { - if (initNodeCode == 0) { - return; - } - setFunc("Column", QUERY_NODE_COLUMN, sizeof(SColumnNode), @@ -8848,7 +8843,6 @@ static void doInitNodeFuncArray() { jsonToPhysiHashJoinNode, destoryHashJoinPhysiNode ); - initNodeCode = 0; } // clang-format on