Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1929e5b6
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1929e5b6
编写于
2月 25, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
show variables error
上级
71b562e5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
19 deletion
+22
-19
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+22
-19
未找到文件。
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
1929e5b6
...
@@ -22,11 +22,11 @@
...
@@ -22,11 +22,11 @@
#include "mndUser.h"
#include "mndUser.h"
#include "mndVgroup.h"
#include "mndVgroup.h"
#define TSDB_DNODE_VER_NUMBER 1
#define TSDB_DNODE_VER_NUMBER
1
#define TSDB_DNODE_RESERVE_SIZE 64
#define TSDB_DNODE_RESERVE_SIZE 64
#define TSDB_CONFIG_OPTION_LEN 16
#define TSDB_CONFIG_OPTION_LEN
16
#define TSDB_CONIIG_VALUE_LEN 48
#define TSDB_CONIIG_VALUE_LEN
48
#define TSDB_CONFIG_NUMBER 8
#define TSDB_CONFIG_NUMBER
8
static
const
char
*
offlineReason
[]
=
{
static
const
char
*
offlineReason
[]
=
{
""
,
""
,
...
@@ -631,13 +631,13 @@ static int32_t mndGetConfigMeta(SMnodeMsg *pReq, SShowObj *pShow, STableMetaRsp
...
@@ -631,13 +631,13 @@ static int32_t mndGetConfigMeta(SMnodeMsg *pReq, SShowObj *pShow, STableMetaRsp
pShow
->
bytes
[
cols
]
=
TSDB_CONFIG_OPTION_LEN
+
VARSTR_HEADER_SIZE
;
pShow
->
bytes
[
cols
]
=
TSDB_CONFIG_OPTION_LEN
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
tstrncpy
(
pSchema
[
cols
].
name
,
"name"
,
sizeof
(
pSchema
[
cols
].
name
)
);
strcpy
(
pSchema
[
cols
].
name
,
"name"
);
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
cols
++
;
cols
++
;
pShow
->
bytes
[
cols
]
=
TSDB_CONIIG_VALUE_LEN
+
VARSTR_HEADER_SIZE
;
pShow
->
bytes
[
cols
]
=
TSDB_CONIIG_VALUE_LEN
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
tstrncpy
(
pSchema
[
cols
].
name
,
"value"
,
sizeof
(
pSchema
[
cols
].
name
)
);
strcpy
(
pSchema
[
cols
].
name
,
"value"
);
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
cols
++
;
cols
++
;
...
@@ -658,29 +658,30 @@ static int32_t mndGetConfigMeta(SMnodeMsg *pReq, SShowObj *pShow, STableMetaRsp
...
@@ -658,29 +658,30 @@ static int32_t mndGetConfigMeta(SMnodeMsg *pReq, SShowObj *pShow, STableMetaRsp
static
int32_t
mndRetrieveConfigs
(
SMnodeMsg
*
pReq
,
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
)
{
static
int32_t
mndRetrieveConfigs
(
SMnodeMsg
*
pReq
,
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
)
{
SMnode
*
pMnode
=
pReq
->
pMnode
;
SMnode
*
pMnode
=
pReq
->
pMnode
;
int32_t
totalRows
=
0
;
int32_t
numOfRows
=
0
;
int32_t
numOfRows
=
0
;
char
*
cfgOpts
[
TSDB_CONFIG_NUMBER
]
=
{
0
};
char
*
cfgOpts
[
TSDB_CONFIG_NUMBER
]
=
{
0
};
char
cfgVals
[
TSDB_CONFIG_NUMBER
][
TSDB_CONIIG_VALUE_LEN
+
1
]
=
{
0
};
char
cfgVals
[
TSDB_CONFIG_NUMBER
][
TSDB_CONIIG_VALUE_LEN
+
1
]
=
{
0
};
char
*
pWrite
;
char
*
pWrite
;
int32_t
cols
=
0
;
int32_t
cols
=
0
;
cfgOpts
[
numOf
Rows
]
=
"statusInterval"
;
cfgOpts
[
total
Rows
]
=
"statusInterval"
;
snprintf
(
cfgVals
[
numOf
Rows
],
TSDB_CONIIG_VALUE_LEN
,
"%d"
,
tsStatusInterval
);
snprintf
(
cfgVals
[
total
Rows
],
TSDB_CONIIG_VALUE_LEN
,
"%d"
,
tsStatusInterval
);
numOf
Rows
++
;
total
Rows
++
;
cfgOpts
[
numOf
Rows
]
=
"timezone"
;
cfgOpts
[
total
Rows
]
=
"timezone"
;
snprintf
(
cfgVals
[
numOf
Rows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
tsTimezone
);
snprintf
(
cfgVals
[
total
Rows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
tsTimezone
);
numOf
Rows
++
;
total
Rows
++
;
cfgOpts
[
numOf
Rows
]
=
"locale"
;
cfgOpts
[
total
Rows
]
=
"locale"
;
snprintf
(
cfgVals
[
numOf
Rows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
tsLocale
);
snprintf
(
cfgVals
[
total
Rows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
tsLocale
);
numOf
Rows
++
;
total
Rows
++
;
cfgOpts
[
numOf
Rows
]
=
"charset"
;
cfgOpts
[
total
Rows
]
=
"charset"
;
snprintf
(
cfgVals
[
numOf
Rows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
tsCharset
);
snprintf
(
cfgVals
[
total
Rows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
tsCharset
);
numOf
Rows
++
;
total
Rows
++
;
for
(
int32_t
i
=
0
;
i
<
numOf
Rows
;
i
++
)
{
for
(
int32_t
i
=
0
;
i
<
total
Rows
;
i
++
)
{
cols
=
0
;
cols
=
0
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
@@ -690,6 +691,8 @@ static int32_t mndRetrieveConfigs(SMnodeMsg *pReq, SShowObj *pShow, char *data,
...
@@ -690,6 +691,8 @@ static int32_t mndRetrieveConfigs(SMnodeMsg *pReq, SShowObj *pShow, char *data,
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
cfgVals
[
i
],
TSDB_CONIIG_VALUE_LEN
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
cfgVals
[
i
],
TSDB_CONIIG_VALUE_LEN
);
cols
++
;
cols
++
;
numOfRows
++
;
}
}
mndVacuumResult
(
data
,
pShow
->
numOfColumns
,
numOfRows
,
rows
,
pShow
);
mndVacuumResult
(
data
,
pShow
->
numOfColumns
,
numOfRows
,
rows
,
pShow
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录