Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
f223f4d2
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f223f4d2
编写于
5月 06, 2021
作者:
sangshuduo
提交者:
GitHub
5月 06, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-3857]<fix>: taosdump database properties. (#6020)
Co-authored-by:
N
Shuduo Sang
<
sdsang@taosdata.com
>
上级
6a618dd2
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
117 addition
and
113 deletion
+117
-113
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+117
-113
未找到文件。
src/kit/taosdump/taosdump.c
浏览文件 @
f223f4d2
...
@@ -72,6 +72,7 @@ enum _show_db_index {
...
@@ -72,6 +72,7 @@ enum _show_db_index {
TSDB_SHOW_DB_WALLEVEL_INDEX
,
TSDB_SHOW_DB_WALLEVEL_INDEX
,
TSDB_SHOW_DB_FSYNC_INDEX
,
TSDB_SHOW_DB_FSYNC_INDEX
,
TSDB_SHOW_DB_COMP_INDEX
,
TSDB_SHOW_DB_COMP_INDEX
,
TSDB_SHOW_DB_CACHELAST_INDEX
,
TSDB_SHOW_DB_PRECISION_INDEX
,
TSDB_SHOW_DB_PRECISION_INDEX
,
TSDB_SHOW_DB_UPDATE_INDEX
,
TSDB_SHOW_DB_UPDATE_INDEX
,
TSDB_SHOW_DB_STATUS_INDEX
,
TSDB_SHOW_DB_STATUS_INDEX
,
...
@@ -134,6 +135,7 @@ typedef struct {
...
@@ -134,6 +135,7 @@ typedef struct {
int8_t
wallevel
;
int8_t
wallevel
;
int32_t
fsync
;
int32_t
fsync
;
int8_t
comp
;
int8_t
comp
;
int8_t
cachelast
;
char
precision
[
8
];
// time resolution
char
precision
[
8
];
// time resolution
int8_t
update
;
int8_t
update
;
char
status
[
16
];
char
status
[
16
];
...
@@ -976,6 +978,7 @@ int taosDumpOut(struct arguments *arguments) {
...
@@ -976,6 +978,7 @@ int taosDumpOut(struct arguments *arguments) {
dbInfos
[
count
]
->
wallevel
=
*
((
int8_t
*
)
row
[
TSDB_SHOW_DB_WALLEVEL_INDEX
]);
dbInfos
[
count
]
->
wallevel
=
*
((
int8_t
*
)
row
[
TSDB_SHOW_DB_WALLEVEL_INDEX
]);
dbInfos
[
count
]
->
fsync
=
*
((
int32_t
*
)
row
[
TSDB_SHOW_DB_FSYNC_INDEX
]);
dbInfos
[
count
]
->
fsync
=
*
((
int32_t
*
)
row
[
TSDB_SHOW_DB_FSYNC_INDEX
]);
dbInfos
[
count
]
->
comp
=
(
int8_t
)(
*
((
int8_t
*
)
row
[
TSDB_SHOW_DB_COMP_INDEX
]));
dbInfos
[
count
]
->
comp
=
(
int8_t
)(
*
((
int8_t
*
)
row
[
TSDB_SHOW_DB_COMP_INDEX
]));
dbInfos
[
count
]
->
cachelast
=
(
int8_t
)(
*
((
int8_t
*
)
row
[
TSDB_SHOW_DB_CACHELAST_INDEX
]));
strncpy
(
dbInfos
[
count
]
->
precision
,
(
char
*
)
row
[
TSDB_SHOW_DB_PRECISION_INDEX
],
fields
[
TSDB_SHOW_DB_PRECISION_INDEX
].
bytes
);
strncpy
(
dbInfos
[
count
]
->
precision
,
(
char
*
)
row
[
TSDB_SHOW_DB_PRECISION_INDEX
],
fields
[
TSDB_SHOW_DB_PRECISION_INDEX
].
bytes
);
//dbInfos[count]->precision = *((int8_t *)row[TSDB_SHOW_DB_PRECISION_INDEX]);
//dbInfos[count]->precision = *((int8_t *)row[TSDB_SHOW_DB_PRECISION_INDEX]);
...
@@ -1282,9 +1285,10 @@ void taosDumpCreateDbClause(SDbInfo *dbInfo, bool isDumpProperty, FILE *fp) {
...
@@ -1282,9 +1285,10 @@ void taosDumpCreateDbClause(SDbInfo *dbInfo, bool isDumpProperty, FILE *fp) {
pstr
+=
sprintf
(
pstr
,
"CREATE DATABASE IF NOT EXISTS %s "
,
dbInfo
->
name
);
pstr
+=
sprintf
(
pstr
,
"CREATE DATABASE IF NOT EXISTS %s "
,
dbInfo
->
name
);
if
(
isDumpProperty
)
{
if
(
isDumpProperty
)
{
pstr
+=
sprintf
(
pstr
,
pstr
+=
sprintf
(
pstr
,
"TABLES %d VGROUPS %d REPLICA %d QUORUM %d DAYS %d KEEP %s CACHE %d BLOCKS %d MINROWS %d MAXROWS %d WALLEVEL %d FYNC %d COMP %d PRECISION '%s' UPDATE %d"
,
"REPLICA %d QUORUM %d DAYS %d KEEP %s CACHE %d BLOCKS %d MINROWS %d MAXROWS %d FSYNC %d CACHELAST %d COMP %d PRECISION '%s' UPDATE %d"
,
dbInfo
->
ntables
,
dbInfo
->
vgroups
,
dbInfo
->
replica
,
dbInfo
->
quorum
,
dbInfo
->
days
,
dbInfo
->
keeplist
,
dbInfo
->
cache
,
dbInfo
->
replica
,
dbInfo
->
quorum
,
dbInfo
->
days
,
dbInfo
->
keeplist
,
dbInfo
->
cache
,
dbInfo
->
blocks
,
dbInfo
->
minrows
,
dbInfo
->
maxrows
,
dbInfo
->
wallevel
,
dbInfo
->
fsync
,
dbInfo
->
comp
,
dbInfo
->
precision
,
dbInfo
->
update
);
dbInfo
->
blocks
,
dbInfo
->
minrows
,
dbInfo
->
maxrows
,
dbInfo
->
fsync
,
dbInfo
->
cachelast
,
dbInfo
->
comp
,
dbInfo
->
precision
,
dbInfo
->
update
);
}
}
pstr
+=
sprintf
(
pstr
,
";"
);
pstr
+=
sprintf
(
pstr
,
";"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录