Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
63792dae
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
提交
63792dae
编写于
8月 25, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: user permission error with sysinfo 0
上级
1c26d444
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
28 deletion
+17
-28
source/common/src/systable.c
source/common/src/systable.c
+1
-1
source/dnode/mnode/impl/src/mndSma.c
source/dnode/mnode/impl/src/mndSma.c
+2
-2
source/libs/parser/test/parInitialCTest.cpp
source/libs/parser/test/parInitialCTest.cpp
+7
-17
source/libs/planner/test/planOtherTest.cpp
source/libs/planner/test/planOtherTest.cpp
+2
-2
tests/script/tsim/user/privilege_sysinfo.sim
tests/script/tsim/user/privilege_sysinfo.sim
+5
-6
未找到文件。
source/common/src/systable.c
浏览文件 @
63792dae
...
...
@@ -350,7 +350,7 @@ static const SSysTableMeta perfsMeta[] = {
{
TSDB_PERFS_TABLE_SUBSCRIPTIONS
,
subscriptionSchema
,
tListLen
(
subscriptionSchema
),
false
},
// {TSDB_PERFS_TABLE_OFFSETS, offsetSchema, tListLen(offsetSchema)},
{
TSDB_PERFS_TABLE_TRANS
,
transSchema
,
tListLen
(
transSchema
),
false
},
{
TSDB_PERFS_TABLE_SMAS
,
smaSchema
,
tListLen
(
smaSchema
),
false
},
//
{TSDB_PERFS_TABLE_SMAS, smaSchema, tListLen(smaSchema), false},
{
TSDB_PERFS_TABLE_STREAMS
,
streamSchema
,
tListLen
(
streamSchema
),
false
},
{
TSDB_PERFS_TABLE_APPS
,
appSchema
,
tListLen
(
appSchema
),
false
}};
// clang-format on
...
...
source/dnode/mnode/impl/src/mndSma.c
浏览文件 @
63792dae
...
...
@@ -65,8 +65,8 @@ int32_t mndInitSma(SMnode *pMnode) {
mndSetMsgHandle
(
pMnode
,
TDMT_MND_GET_INDEX
,
mndProcessGetSmaReq
);
mndSetMsgHandle
(
pMnode
,
TDMT_MND_GET_TABLE_INDEX
,
mndProcessGetTbSmaReq
);
mndAddShowRetrieveHandle
(
pMnode
,
TSDB_MGMT_TABLE_
SMAS
,
mndRetrieveSma
);
mndAddShowFreeIterHandle
(
pMnode
,
TSDB_MGMT_TABLE_
SMAS
,
mndCancelGetNextSma
);
mndAddShowRetrieveHandle
(
pMnode
,
TSDB_MGMT_TABLE_
INDEX
,
mndRetrieveSma
);
mndAddShowFreeIterHandle
(
pMnode
,
TSDB_MGMT_TABLE_
INDEX
,
mndCancelGetNextSma
);
return
sdbSetTable
(
pMnode
->
pSdb
,
table
);
}
...
...
source/libs/parser/test/parInitialCTest.cpp
浏览文件 @
63792dae
...
...
@@ -568,15 +568,13 @@ TEST_F(ParserInitialCTest, createStream) {
memset
(
&
expect
,
0
,
sizeof
(
SCMCreateStreamReq
));
};
auto
setCreateStreamReqFunc
=
[
&
](
const
char
*
pStream
,
const
char
*
pSrcDb
,
const
char
*
pSql
,
const
char
*
pDstStb
=
nullptr
,
int8_t
igExists
=
0
,
int
8_t
triggerType
=
STREAM_TRIGGER_AT_ONCE
,
int64_t
maxDelay
=
0
,
int
64_t
watermark
=
0
,
int
8_t
igExpired
=
STREAM_DEFAULT_IGNORE_EXPIRED
)
{
auto
setCreateStreamReqFunc
=
[
&
](
const
char
*
pStream
,
const
char
*
pSrcDb
,
const
char
*
pSql
,
const
char
*
pDstStb
,
int8_t
igExists
=
0
,
int8_t
triggerType
=
STREAM_TRIGGER_AT_ONCE
,
int
64_t
maxDelay
=
0
,
int64_t
watermark
=
0
,
int8_t
igExpired
=
STREAM_DEFAULT_IGNORE_EXPIRED
)
{
snprintf
(
expect
.
name
,
sizeof
(
expect
.
name
),
"0.%s"
,
pStream
);
snprintf
(
expect
.
sourceDB
,
sizeof
(
expect
.
sourceDB
),
"0.%s"
,
pSrcDb
);
if
(
NULL
!=
pDstStb
)
{
snprintf
(
expect
.
targetStbFullName
,
sizeof
(
expect
.
targetStbFullName
),
"0.test.%s"
,
pDstStb
);
}
snprintf
(
expect
.
targetStbFullName
,
sizeof
(
expect
.
targetStbFullName
),
"0.test.%s"
,
pDstStb
);
expect
.
igExists
=
igExists
;
expect
.
sql
=
strdup
(
pSql
);
expect
.
triggerType
=
triggerType
;
...
...
@@ -603,15 +601,6 @@ TEST_F(ParserInitialCTest, createStream) {
tFreeSCMCreateStreamReq
(
&
req
);
});
setCreateStreamReqFunc
(
"s1"
,
"test"
,
"create stream s1 as select count(*) from t1 interval(10s)"
);
run
(
"CREATE STREAM s1 AS SELECT COUNT(*) FROM t1 INTERVAL(10S)"
);
clearCreateStreamReq
();
setCreateStreamReqFunc
(
"s1"
,
"test"
,
"create stream if not exists s1 as select count(*) from t1 interval(10s)"
,
nullptr
,
1
);
run
(
"CREATE STREAM IF NOT EXISTS s1 AS SELECT COUNT(*) FROM t1 INTERVAL(10S)"
);
clearCreateStreamReq
();
setCreateStreamReqFunc
(
"s1"
,
"test"
,
"create stream s1 into st1 as select count(*) from t1 interval(10s)"
,
"st1"
);
run
(
"CREATE STREAM s1 INTO st1 AS SELECT COUNT(*) FROM t1 INTERVAL(10S)"
);
clearCreateStreamReq
();
...
...
@@ -629,7 +618,8 @@ TEST_F(ParserInitialCTest, createStream) {
TEST_F
(
ParserInitialCTest
,
createStreamSemanticCheck
)
{
useDb
(
"root"
,
"test"
);
run
(
"CREATE STREAM s1 AS SELECT PERCENTILE(c1, 30) FROM t1 INTERVAL(10S)"
,
TSDB_CODE_PAR_STREAM_NOT_ALLOWED_FUNC
);
run
(
"CREATE STREAM s1 INTO st1 AS SELECT PERCENTILE(c1, 30) FROM t1 INTERVAL(10S)"
,
TSDB_CODE_PAR_STREAM_NOT_ALLOWED_FUNC
);
}
TEST_F
(
ParserInitialCTest
,
createTable
)
{
...
...
source/libs/planner/test/planOtherTest.cpp
浏览文件 @
63792dae
...
...
@@ -37,9 +37,9 @@ TEST_F(PlanOtherTest, createStream) {
TEST_F
(
PlanOtherTest
,
createStreamUseSTable
)
{
useDb
(
"root"
,
"test"
);
run
(
"CREATE STREAM IF NOT EXISTS s1 as SELECT COUNT(*) FROM st1 INTERVAL(10s)"
);
run
(
"CREATE STREAM IF NOT EXISTS s1
into st1
as SELECT COUNT(*) FROM st1 INTERVAL(10s)"
);
run
(
"CREATE STREAM IF NOT EXISTS s1 as SELECT COUNT(*) FROM st1 PARTITION BY TBNAME INTERVAL(10s)"
);
run
(
"CREATE STREAM IF NOT EXISTS s1
into st1
as SELECT COUNT(*) FROM st1 PARTITION BY TBNAME INTERVAL(10s)"
);
}
TEST_F
(
PlanOtherTest
,
createSmaIndex
)
{
...
...
tests/script/tsim/user/privilege_sysinfo.sim
浏览文件 @
63792dae
...
...
@@ -133,8 +133,8 @@ sql_error show grants
sql show queries
sql show connections
sql show apps
sql
_error
show transactions
#
sql_error show create database d2
sql
show transactions
sql_error show create database d2
sql show create table d2.stb2;
sql show create table d2.ctb2;
sql show create table d2.ntb2;
...
...
@@ -175,9 +175,8 @@ sql select * from performance_schema.perf_queries
sql select * from performance_schema.perf_topics
sql select * from performance_schema.perf_consumers
sql select * from performance_schema.perf_subscriptions
#sql_error select * from performance_schema.perf_trans
#sql_error select * from performance_schema.perf_smas
#sql_error select * from information_schema.perf_streams
#sql_error select * from information_schema.perf_apps
sql select * from performance_schema.perf_trans
sql select * from performance_schema.perf_streams
sql select * from performance_schema.perf_apps
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录