Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
caa7f06d
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看板
提交
caa7f06d
编写于
11月 10, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change int to int32_t
上级
86d78a29
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
16 deletion
+16
-16
src/plugins/http/src/httpQueue.c
src/plugins/http/src/httpQueue.c
+3
-3
src/plugins/http/src/httpSql.c
src/plugins/http/src/httpSql.c
+13
-13
未找到文件。
src/plugins/http/src/httpQueue.c
浏览文件 @
caa7f06d
...
@@ -65,9 +65,9 @@ void httpDispatchToResultQueue(void *param, TAOS_RES *result, int32_t code, int3
...
@@ -65,9 +65,9 @@ void httpDispatchToResultQueue(void *param, TAOS_RES *result, int32_t code, int3
static
void
*
httpProcessResultQueue
(
void
*
param
)
{
static
void
*
httpProcessResultQueue
(
void
*
param
)
{
SHttpResult
*
pMsg
;
SHttpResult
*
pMsg
;
int32_t
type
;
int32_t
type
;
void
*
unUsed
;
void
*
unUsed
;
while
(
1
)
{
while
(
1
)
{
if
(
taosReadQitemFromQset
(
tsHttpQset
,
&
type
,
(
void
**
)
&
pMsg
,
&
unUsed
)
==
0
)
{
if
(
taosReadQitemFromQset
(
tsHttpQset
,
&
type
,
(
void
**
)
&
pMsg
,
&
unUsed
)
==
0
)
{
httpDebug
(
"qset:%p, http queue got no message from qset, exiting"
,
tsHttpQset
);
httpDebug
(
"qset:%p, http queue got no message from qset, exiting"
,
tsHttpQset
);
...
...
src/plugins/http/src/httpSql.c
浏览文件 @
caa7f06d
...
@@ -29,9 +29,9 @@
...
@@ -29,9 +29,9 @@
void
httpProcessMultiSql
(
HttpContext
*
pContext
);
void
httpProcessMultiSql
(
HttpContext
*
pContext
);
void
httpProcessMultiSqlRetrieveCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
numOfRows
);
void
httpProcessMultiSqlRetrieveCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
numOfRows
);
void
httpProcessMultiSqlRetrieveCallBackImp
(
void
*
param
,
TAOS_RES
*
result
,
int
code
,
in
t
numOfRows
)
{
void
httpProcessMultiSqlRetrieveCallBackImp
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
code
,
int32_
t
numOfRows
)
{
HttpContext
*
pContext
=
(
HttpContext
*
)
param
;
HttpContext
*
pContext
=
(
HttpContext
*
)
param
;
if
(
pContext
==
NULL
)
return
;
if
(
pContext
==
NULL
)
return
;
...
@@ -73,12 +73,12 @@ void httpProcessMultiSqlRetrieveCallBackImp(void *param, TAOS_RES *result, int c
...
@@ -73,12 +73,12 @@ void httpProcessMultiSqlRetrieveCallBackImp(void *param, TAOS_RES *result, int c
}
}
}
}
void
httpProcessMultiSqlRetrieveCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
numOfRows
)
{
void
httpProcessMultiSqlRetrieveCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
numOfRows
)
{
int32_t
code
=
taos_errno
(
result
);
int32_t
code
=
taos_errno
(
result
);
httpDispatchToResultQueue
(
param
,
result
,
code
,
numOfRows
,
httpProcessMultiSqlRetrieveCallBackImp
);
httpDispatchToResultQueue
(
param
,
result
,
code
,
numOfRows
,
httpProcessMultiSqlRetrieveCallBackImp
);
}
}
void
httpProcessMultiSqlCallBackImp
(
void
*
param
,
TAOS_RES
*
result
,
int
code
,
in
t
affectRowsInput
)
{
void
httpProcessMultiSqlCallBackImp
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
code
,
int32_
t
affectRowsInput
)
{
HttpContext
*
pContext
=
(
HttpContext
*
)
param
;
HttpContext
*
pContext
=
(
HttpContext
*
)
param
;
if
(
pContext
==
NULL
)
return
;
if
(
pContext
==
NULL
)
return
;
...
@@ -119,7 +119,7 @@ void httpProcessMultiSqlCallBackImp(void *param, TAOS_RES *result, int code, int
...
@@ -119,7 +119,7 @@ void httpProcessMultiSqlCallBackImp(void *param, TAOS_RES *result, int code, int
bool
isUpdate
=
tscIsUpdateQuery
(
result
);
bool
isUpdate
=
tscIsUpdateQuery
(
result
);
if
(
isUpdate
)
{
if
(
isUpdate
)
{
// not select or show commands
// not select or show commands
int
affectRows
=
taos_affected_rows
(
result
);
int
32_t
affectRows
=
taos_affected_rows
(
result
);
httpDebug
(
"context:%p, fd:%d, user:%s, process pos:%d, affect rows:%d, sql:%s"
,
pContext
,
pContext
->
fd
,
httpDebug
(
"context:%p, fd:%d, user:%s, process pos:%d, affect rows:%d, sql:%s"
,
pContext
,
pContext
->
fd
,
pContext
->
user
,
multiCmds
->
pos
,
affectRows
,
sql
);
pContext
->
user
,
multiCmds
->
pos
,
affectRows
,
sql
);
...
@@ -156,7 +156,7 @@ void httpProcessMultiSqlCallBackImp(void *param, TAOS_RES *result, int code, int
...
@@ -156,7 +156,7 @@ void httpProcessMultiSqlCallBackImp(void *param, TAOS_RES *result, int code, int
}
}
}
}
void
httpProcessMultiSqlCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
unUsedCode
)
{
void
httpProcessMultiSqlCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
unUsedCode
)
{
int32_t
code
=
taos_errno
(
result
);
int32_t
code
=
taos_errno
(
result
);
int32_t
affectRows
=
taos_affected_rows
(
result
);
int32_t
affectRows
=
taos_affected_rows
(
result
);
httpDispatchToResultQueue
(
param
,
result
,
code
,
affectRows
,
httpProcessMultiSqlCallBackImp
);
httpDispatchToResultQueue
(
param
,
result
,
code
,
affectRows
,
httpProcessMultiSqlCallBackImp
);
...
@@ -204,9 +204,9 @@ void httpProcessMultiSqlCmd(HttpContext *pContext) {
...
@@ -204,9 +204,9 @@ void httpProcessMultiSqlCmd(HttpContext *pContext) {
httpProcessMultiSql
(
pContext
);
httpProcessMultiSql
(
pContext
);
}
}
void
httpProcessSingleSqlRetrieveCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
numOfRows
);
void
httpProcessSingleSqlRetrieveCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
numOfRows
);
void
httpProcessSingleSqlRetrieveCallBackImp
(
void
*
param
,
TAOS_RES
*
result
,
int
code
,
in
t
numOfRows
)
{
void
httpProcessSingleSqlRetrieveCallBackImp
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
code
,
int32_
t
numOfRows
)
{
HttpContext
*
pContext
=
(
HttpContext
*
)
param
;
HttpContext
*
pContext
=
(
HttpContext
*
)
param
;
if
(
pContext
==
NULL
)
return
;
if
(
pContext
==
NULL
)
return
;
...
@@ -244,12 +244,12 @@ void httpProcessSingleSqlRetrieveCallBackImp(void *param, TAOS_RES *result, int
...
@@ -244,12 +244,12 @@ void httpProcessSingleSqlRetrieveCallBackImp(void *param, TAOS_RES *result, int
}
}
}
}
void
httpProcessSingleSqlRetrieveCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
numOfRows
)
{
void
httpProcessSingleSqlRetrieveCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
numOfRows
)
{
int32_t
code
=
taos_errno
(
result
);
int32_t
code
=
taos_errno
(
result
);
httpDispatchToResultQueue
(
param
,
result
,
code
,
numOfRows
,
httpProcessSingleSqlRetrieveCallBackImp
);
httpDispatchToResultQueue
(
param
,
result
,
code
,
numOfRows
,
httpProcessSingleSqlRetrieveCallBackImp
);
}
}
void
httpProcessSingleSqlCallBackImp
(
void
*
param
,
TAOS_RES
*
result
,
int
code
,
in
t
affectRowsInput
)
{
void
httpProcessSingleSqlCallBackImp
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
code
,
int32_
t
affectRowsInput
)
{
HttpContext
*
pContext
=
(
HttpContext
*
)
param
;
HttpContext
*
pContext
=
(
HttpContext
*
)
param
;
if
(
pContext
==
NULL
)
return
;
if
(
pContext
==
NULL
)
return
;
...
@@ -280,7 +280,7 @@ void httpProcessSingleSqlCallBackImp(void *param, TAOS_RES *result, int code, in
...
@@ -280,7 +280,7 @@ void httpProcessSingleSqlCallBackImp(void *param, TAOS_RES *result, int code, in
bool
isUpdate
=
tscIsUpdateQuery
(
result
);
bool
isUpdate
=
tscIsUpdateQuery
(
result
);
if
(
isUpdate
)
{
if
(
isUpdate
)
{
// not select or show commands
// not select or show commands
int
affectRows
=
taos_affected_rows
(
result
);
int
32_t
affectRows
=
taos_affected_rows
(
result
);
assert
(
affectRows
==
affectRowsInput
);
assert
(
affectRows
==
affectRowsInput
);
httpDebug
(
"context:%p, fd:%d, user:%s, affect rows:%d, stop query, sqlObj:%p"
,
pContext
,
pContext
->
fd
,
httpDebug
(
"context:%p, fd:%d, user:%s, affect rows:%d, stop query, sqlObj:%p"
,
pContext
,
pContext
->
fd
,
...
@@ -311,7 +311,7 @@ void httpProcessSingleSqlCallBackImp(void *param, TAOS_RES *result, int code, in
...
@@ -311,7 +311,7 @@ void httpProcessSingleSqlCallBackImp(void *param, TAOS_RES *result, int code, in
}
}
}
}
void
httpProcessSingleSqlCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
unUsedCode
)
{
void
httpProcessSingleSqlCallBack
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
unUsedCode
)
{
int32_t
code
=
taos_errno
(
result
);
int32_t
code
=
taos_errno
(
result
);
int32_t
affectRows
=
taos_affected_rows
(
result
);
int32_t
affectRows
=
taos_affected_rows
(
result
);
httpDispatchToResultQueue
(
param
,
result
,
code
,
affectRows
,
httpProcessSingleSqlCallBackImp
);
httpDispatchToResultQueue
(
param
,
result
,
code
,
affectRows
,
httpProcessSingleSqlCallBackImp
);
...
@@ -378,7 +378,7 @@ void httpExecCmd(HttpContext *pContext) {
...
@@ -378,7 +378,7 @@ void httpExecCmd(HttpContext *pContext) {
}
}
}
}
void
httpProcessRequestCb
(
void
*
param
,
TAOS_RES
*
result
,
int
code
)
{
void
httpProcessRequestCb
(
void
*
param
,
TAOS_RES
*
result
,
int
32_t
code
)
{
HttpContext
*
pContext
=
param
;
HttpContext
*
pContext
=
param
;
taos_free_result
(
result
);
taos_free_result
(
result
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录