Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
a5df5d93
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看板
提交
a5df5d93
编写于
12月 09, 2019
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
suppress compile warnings
上级
c12fb22e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
10 deletion
+13
-10
src/client/src/tscAst.c
src/client/src/tscAst.c
+3
-4
src/client/src/tscServer.c
src/client/src/tscServer.c
+6
-3
src/client/src/tscSub.c
src/client/src/tscSub.c
+2
-2
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+2
-1
未找到文件。
src/client/src/tscAst.c
浏览文件 @
a5df5d93
...
...
@@ -643,13 +643,12 @@ int32_t intersect(tQueryResultset *pLeft, tQueryResultset *pRight, tQueryResults
}
/*
*
*
traverse the result and apply the function to each item to check if the item is qualified or not
*/
void
tSQLListTraverseOnResult
(
struct
tSQLBinaryExpr
*
pExpr
,
bool
(
*
fp
)(
tSkipListNode
*
,
void
*
),
tQueryResultset
*
pResult
)
{
static
void
tSQLListTraverseOnResult
(
struct
tSQLBinaryExpr
*
pExpr
,
__result_filter_fn_t
fp
,
tQueryResultset
*
pResult
)
{
assert
(
pExpr
->
pLeft
->
nodeType
==
TSQL_NODE_COL
&&
pExpr
->
pRight
->
nodeType
==
TSQL_NODE_VALUE
);
// brutal force s
earch
// brutal force s
can the result list and check for each item in the list
int64_t
num
=
pResult
->
num
;
for
(
int32_t
i
=
0
,
j
=
0
;
i
<
pResult
->
num
;
++
i
)
{
if
(
fp
==
NULL
||
(
fp
(
pResult
->
pRes
[
i
],
pExpr
->
info
)
==
true
))
{
...
...
src/client/src/tscServer.c
浏览文件 @
a5df5d93
...
...
@@ -3350,7 +3350,7 @@ int tscProcessShowRsp(SSqlObj *pSql) {
}
int
tscProcessConnectRsp
(
SSqlObj
*
pSql
)
{
char
temp
[
TSDB_METER_ID_LEN
];
char
temp
[
TSDB_METER_ID_LEN
*
2
];
SConnectRsp
*
pConnect
;
STscObj
*
pObj
=
pSql
->
pTscObj
;
...
...
@@ -3358,8 +3358,11 @@ int tscProcessConnectRsp(SSqlObj *pSql) {
pConnect
=
(
SConnectRsp
*
)
pRes
->
pRsp
;
strcpy
(
pObj
->
acctId
,
pConnect
->
acctId
);
// copy acctId from response
sprintf
(
temp
,
"%s%s%s"
,
pObj
->
acctId
,
TS_PATH_DELIMITER
,
pObj
->
db
);
strcpy
(
pObj
->
db
,
temp
);
int32_t
len
=
sprintf
(
temp
,
"%s%s%s"
,
pObj
->
acctId
,
TS_PATH_DELIMITER
,
pObj
->
db
);
assert
(
len
<=
tListLen
(
pObj
->
db
));
strncpy
(
pObj
->
db
,
temp
,
tListLen
(
pObj
->
db
));
#ifdef CLUSTER
SIpList
*
pIpList
;
char
*
rsp
=
pRes
->
pRsp
+
sizeof
(
SConnectRsp
);
...
...
src/client/src/tscSub.c
浏览文件 @
a5df5d93
...
...
@@ -56,7 +56,7 @@ TAOS_SUB *taos_subscribe(const char *host, const char *user, const char *pass, c
if
(
pSub
->
taos
==
NULL
)
{
tfree
(
pSub
);
}
else
{
char
qstr
[
128
]
;
char
qstr
[
256
]
=
{
0
}
;
sprintf
(
qstr
,
"use %s"
,
db
);
int
res
=
taos_query
(
pSub
->
taos
,
qstr
);
if
(
res
!=
0
)
{
...
...
@@ -64,7 +64,7 @@ TAOS_SUB *taos_subscribe(const char *host, const char *user, const char *pass, c
taos_close
(
pSub
->
taos
);
tfree
(
pSub
);
}
else
{
s
printf
(
qstr
,
"select * from %s where _c0 > now+1000d"
,
pSub
->
name
);
s
nprintf
(
qstr
,
tListLen
(
qstr
)
,
"select * from %s where _c0 > now+1000d"
,
pSub
->
name
);
if
(
taos_query
(
pSub
->
taos
,
qstr
))
{
tscTrace
(
"failed to select, reason:%s"
,
taos_errstr
(
pSub
->
taos
));
taos_close
(
pSub
->
taos
);
...
...
src/client/src/tscUtil.c
浏览文件 @
a5df5d93
...
...
@@ -1138,7 +1138,8 @@ void tscColumnFilterInfoCopy(SColumnFilterInfo* dst, const SColumnFilterInfo* sr
*
dst
=
*
src
;
if
(
dst
->
filterOnBinary
)
{
size_t
len
=
(
size_t
)
dst
->
len
+
1
;
dst
->
pz
=
calloc
(
1
,
len
);
char
*
pTmp
=
calloc
(
1
,
len
);
dst
->
pz
=
(
int64_t
)
pTmp
;
memcpy
((
char
*
)
dst
->
pz
,
(
char
*
)
src
->
pz
,
(
size_t
)
len
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录