Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
644bed2d
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
644bed2d
编写于
5月 27, 2021
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225]
上级
315ce829
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
15 deletion
+15
-15
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+2
-2
src/client/src/tscServer.c
src/client/src/tscServer.c
+13
-13
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
644bed2d
...
@@ -7546,14 +7546,14 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
...
@@ -7546,14 +7546,14 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
}
}
if
(
tscQueryTags
(
pQueryInfo
))
{
if
(
tscQueryTags
(
pQueryInfo
))
{
SExprInfo
*
pExpr1
=
tsc
Sql
ExprGet
(
pQueryInfo
,
0
);
SExprInfo
*
pExpr1
=
tscExprGet
(
pQueryInfo
,
0
);
if
(
pExpr1
->
base
.
functionId
!=
TSDB_FUNC_TID_TAG
)
{
if
(
pExpr1
->
base
.
functionId
!=
TSDB_FUNC_TID_TAG
)
{
int32_t
numOfCols
=
(
int32_t
)
taosArrayGetSize
(
pQueryInfo
->
colList
);
int32_t
numOfCols
=
(
int32_t
)
taosArrayGetSize
(
pQueryInfo
->
colList
);
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
SColumn
*
pCols
=
taosArrayGetP
(
pQueryInfo
->
colList
,
i
);
SColumn
*
pCols
=
taosArrayGetP
(
pQueryInfo
->
colList
,
i
);
if
(
pCols
->
info
.
flist
.
numOfFilters
>
0
)
{
if
(
pCols
->
info
.
flist
.
numOfFilters
>
0
)
{
return
invalid
SqlErr
Msg
(
tscGetErrorMsgPayload
(
pCmd
),
msg9
);
return
invalid
Operation
Msg
(
tscGetErrorMsgPayload
(
pCmd
),
msg9
);
}
}
}
}
}
}
...
...
src/client/src/tscServer.c
浏览文件 @
644bed2d
...
@@ -1911,25 +1911,25 @@ int tscProcessTableMetaRsp(SSqlObj *pSql) {
...
@@ -1911,25 +1911,25 @@ int tscProcessTableMetaRsp(SSqlObj *pSql) {
}
}
static
SVgroupsInfo
*
createVgroupInfoFromMsg
(
char
*
pMsg
,
int32_t
*
size
,
uint64_t
id
)
{
static
SVgroupsInfo
*
createVgroupInfoFromMsg
(
char
*
pMsg
,
int32_t
*
size
,
uint64_t
id
)
{
SVgroupsMsg
*
pVgroupMsg
=
(
SVgroupsMsg
*
)
pMsg
;
SVgroupsMsg
*
pVgroupMsg
=
(
SVgroupsMsg
*
)
pMsg
;
pVgroupMsg
->
numOfVgroups
=
htonl
(
pVgroupMsg
->
numOfVgroups
);
pVgroupMsg
->
numOfVgroups
=
htonl
(
pVgroupMsg
->
numOfVgroups
);
*
size
=
(
int32_t
)
(
sizeof
(
SVgroupMsg
)
*
pVgroupMsg
->
numOfVgroups
+
sizeof
(
SVgroupsMsg
));
*
size
=
(
int32_t
)(
sizeof
(
SVgroupMsg
)
*
pVgroupMsg
->
numOfVgroups
+
sizeof
(
SVgroupsMsg
));
size_t
vgroupsz
=
sizeof
(
SVgroupInfo
)
*
pVgroupMsg
->
numOfVgroups
+
sizeof
(
SVgroupsInfo
);
size_t
vgroupsz
=
sizeof
(
SVgroupInfo
)
*
pVgroupMsg
->
numOfVgroups
+
sizeof
(
SVgroupsInfo
);
SVgroupsInfo
*
pVgroupInfo
=
calloc
(
1
,
vgroupsz
);
SVgroupsInfo
*
pVgroupInfo
=
calloc
(
1
,
vgroupsz
);
assert
(
pVgroupInfo
!=
NULL
);
assert
(
pVgroupInfo
!=
NULL
);
pInfo
->
vgroupList
->
numOfVgroups
=
pVgroupMsg
->
numOfVgroups
;
pVgroupInfo
->
numOfVgroups
=
pVgroupMsg
->
numOfVgroups
;
if
(
pInfo
->
vgroupList
->
numOfVgroups
<=
0
)
{
if
(
pVgroupInfo
->
numOfVgroups
<=
0
)
{
tscDebug
(
"0x%"
PRIx64
" empty vgroup info, no corresponding tables for stable"
,
pSql
->
self
);
tscDebug
(
"0x%"
PRIx64
" empty vgroup info, no corresponding tables for stable"
,
id
);
}
else
{
}
else
{
for
(
int32_t
j
=
0
;
j
<
pInfo
->
vgroupList
->
numOfVgroups
;
++
j
)
{
for
(
int32_t
j
=
0
;
j
<
pVgroupInfo
->
numOfVgroups
;
++
j
)
{
// just init, no need to lock
// just init, no need to lock
SVgroupInfo
*
pVgroup
=
&
pInfo
->
vgroupList
->
vgroups
[
j
];
SVgroupInfo
*
pVgroup
=
&
pVgroupInfo
->
vgroups
[
j
];
SVgroupMsg
*
vmsg
=
&
pVgroupMsg
->
vgroups
[
j
];
SVgroupMsg
*
vmsg
=
&
pVgroupMsg
->
vgroups
[
j
];
vmsg
->
vgId
=
htonl
(
vmsg
->
vgId
);
vmsg
->
vgId
=
htonl
(
vmsg
->
vgId
);
vmsg
->
numOfEps
=
vmsg
->
numOfEps
;
vmsg
->
numOfEps
=
vmsg
->
numOfEps
;
for
(
int32_t
k
=
0
;
k
<
vmsg
->
numOfEps
;
++
k
)
{
for
(
int32_t
k
=
0
;
k
<
vmsg
->
numOfEps
;
++
k
)
{
vmsg
->
epAddr
[
k
].
port
=
htons
(
vmsg
->
epAddr
[
k
].
port
);
vmsg
->
epAddr
[
k
].
port
=
htons
(
vmsg
->
epAddr
[
k
].
port
);
...
@@ -1951,7 +1951,7 @@ static SVgroupsInfo* createVgroupInfoFromMsg(char* pMsg, int32_t* size, uint64_t
...
@@ -1951,7 +1951,7 @@ static SVgroupsInfo* createVgroupInfoFromMsg(char* pMsg, int32_t* size, uint64_t
if
(((
existVgroupInfo
.
inUse
>=
0
)
&&
!
vgroupInfoIdentical
(
&
existVgroupInfo
,
vmsg
))
||
if
(((
existVgroupInfo
.
inUse
>=
0
)
&&
!
vgroupInfoIdentical
(
&
existVgroupInfo
,
vmsg
))
||
(
existVgroupInfo
.
inUse
<
0
))
{
// vgroup info exists, compare with it
(
existVgroupInfo
.
inUse
<
0
))
{
// vgroup info exists, compare with it
taosHashPut
(
tscVgroupMap
,
&
newVi
.
vgId
,
sizeof
(
newVi
.
vgId
),
&
newVi
,
sizeof
(
newVi
));
taosHashPut
(
tscVgroupMap
,
&
newVi
.
vgId
,
sizeof
(
newVi
.
vgId
),
&
newVi
,
sizeof
(
newVi
));
tscDebug
(
"0x%"
PRIx64
" add new VgroupInfo, vgId:%d, total cached:%d"
,
id
,
newVi
.
vgId
,
(
int32_t
)
taosHashGetSize
(
tscVgroupMap
));
tscDebug
(
"0x%"
PRIx64
" add new VgroupInfo, vgId:%d, total cached:%d"
,
id
,
newVi
.
vgId
,
(
int32_t
)
taosHashGetSize
(
tscVgroupMap
));
}
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录