Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
48bc3772
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
48bc3772
编写于
7月 11, 2023
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add show command for system db
上级
13bc1e74
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
15 deletion
+23
-15
source/libs/command/src/command.c
source/libs/command/src/command.c
+19
-15
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+4
-0
未找到文件。
source/libs/command/src/command.c
浏览文件 @
48bc3772
...
...
@@ -286,21 +286,25 @@ static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, ch
hashPrefix
=
pCfg
->
hashPrefix
+
dbFNameLen
+
1
;
}
len
+=
sprintf
(
buf2
+
VARSTR_HEADER_SIZE
,
"CREATE DATABASE `%s` BUFFER %d CACHESIZE %d CACHEMODEL '%s' COMP %d DURATION %dm "
"WAL_FSYNC_PERIOD %d MAXROWS %d MINROWS %d STT_TRIGGER %d KEEP %dm,%dm,%dm PAGES %d PAGESIZE %d PRECISION '%s' REPLICA %d "
"WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d TABLE_PREFIX %d TABLE_SUFFIX %d TSDB_PAGESIZE %d "
"WAL_RETENTION_PERIOD %d WAL_RETENTION_SIZE %"
PRId64
" WAL_ROLL_PERIOD %d WAL_SEGMENT_SIZE %"
PRId64
,
dbName
,
pCfg
->
buffer
,
pCfg
->
cacheSize
,
cacheModelStr
(
pCfg
->
cacheLast
),
pCfg
->
compression
,
pCfg
->
daysPerFile
,
pCfg
->
walFsyncPeriod
,
pCfg
->
maxRows
,
pCfg
->
minRows
,
pCfg
->
sstTrigger
,
pCfg
->
daysToKeep0
,
pCfg
->
daysToKeep1
,
pCfg
->
daysToKeep2
,
pCfg
->
pages
,
pCfg
->
pageSize
,
prec
,
pCfg
->
replications
,
pCfg
->
walLevel
,
pCfg
->
numOfVgroups
,
1
==
pCfg
->
numOfStables
,
hashPrefix
,
pCfg
->
hashSuffix
,
pCfg
->
tsdbPageSize
,
pCfg
->
walRetentionPeriod
,
pCfg
->
walRetentionSize
,
pCfg
->
walRollPeriod
,
pCfg
->
walSegmentSize
);
if
(
retentions
)
{
len
+=
sprintf
(
buf2
+
VARSTR_HEADER_SIZE
+
len
,
" RETENTIONS %s"
,
retentions
);
taosMemoryFree
(
retentions
);
if
(
IS_SYS_DBNAME
(
dbName
))
{
len
+=
sprintf
(
buf2
+
VARSTR_HEADER_SIZE
,
"CREATE DATABASE `%s` "
,
dbName
);
}
else
{
len
+=
sprintf
(
buf2
+
VARSTR_HEADER_SIZE
,
"CREATE DATABASE `%s` BUFFER %d CACHESIZE %d CACHEMODEL '%s' COMP %d DURATION %dm "
"WAL_FSYNC_PERIOD %d MAXROWS %d MINROWS %d STT_TRIGGER %d KEEP %dm,%dm,%dm PAGES %d PAGESIZE %d PRECISION '%s' REPLICA %d "
"WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d TABLE_PREFIX %d TABLE_SUFFIX %d TSDB_PAGESIZE %d "
"WAL_RETENTION_PERIOD %d WAL_RETENTION_SIZE %"
PRId64
" WAL_ROLL_PERIOD %d WAL_SEGMENT_SIZE %"
PRId64
,
dbName
,
pCfg
->
buffer
,
pCfg
->
cacheSize
,
cacheModelStr
(
pCfg
->
cacheLast
),
pCfg
->
compression
,
pCfg
->
daysPerFile
,
pCfg
->
walFsyncPeriod
,
pCfg
->
maxRows
,
pCfg
->
minRows
,
pCfg
->
sstTrigger
,
pCfg
->
daysToKeep0
,
pCfg
->
daysToKeep1
,
pCfg
->
daysToKeep2
,
pCfg
->
pages
,
pCfg
->
pageSize
,
prec
,
pCfg
->
replications
,
pCfg
->
walLevel
,
pCfg
->
numOfVgroups
,
1
==
pCfg
->
numOfStables
,
hashPrefix
,
pCfg
->
hashSuffix
,
pCfg
->
tsdbPageSize
,
pCfg
->
walRetentionPeriod
,
pCfg
->
walRetentionSize
,
pCfg
->
walRollPeriod
,
pCfg
->
walSegmentSize
);
if
(
retentions
)
{
len
+=
sprintf
(
buf2
+
VARSTR_HEADER_SIZE
+
len
,
" RETENTIONS %s"
,
retentions
);
taosMemoryFree
(
retentions
);
}
}
(
varDataLen
(
buf2
))
=
len
;
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
48bc3772
...
...
@@ -509,6 +509,10 @@ static int32_t getDBVgVersion(STranslateContext* pCxt, const char* pDbFName, int
}
static
int32_t
getDBCfg
(
STranslateContext
*
pCxt
,
const
char
*
pDbName
,
SDbCfgInfo
*
pInfo
)
{
if
(
IS_SYS_DBNAME
(
pDbName
))
{
return
TSDB_CODE_SUCCESS
;
}
SParseContext
*
pParCxt
=
pCxt
->
pParseCxt
;
SName
name
;
tNameSetDbName
(
&
name
,
pCxt
->
pParseCxt
->
acctId
,
pDbName
,
strlen
(
pDbName
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录