Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
550028db
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看板
提交
550028db
编写于
6月 20, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225] fix compiler error
上级
327cfce6
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
10 addition
and
10 deletion
+10
-10
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+10
-10
未找到文件。
src/client/src/tscSubquery.c
浏览文件 @
550028db
...
...
@@ -1914,6 +1914,7 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
pSql
->
pSubs
[
0
]
=
pSql
;
// the first sub insert points back to itself
tscTrace
(
"%p sub:%p create subObj success. orderOfSub:%d"
,
pSql
,
pSql
,
0
);
int32_t
numOfSub
=
1
;
int32_t
code
=
tscCopyDataBlockToPayload
(
pSql
,
pDataBlocks
->
pData
[
0
]);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
tscTrace
(
"%p prepare submit data block failed in async insertion, vnodeIdx:%d, total:%d, code:%d"
,
pSql
,
0
,
...
...
@@ -1921,15 +1922,14 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
goto
_error
;
}
int32_t
i
=
1
;
for
(;
i
<
pSql
->
numOfSubs
;
++
i
)
{
for
(;
numOfSub
<
pSql
->
numOfSubs
;
++
numOfSub
)
{
SInsertSupporter
*
pSupporter1
=
calloc
(
1
,
sizeof
(
SInsertSupporter
));
pSupporter1
->
pSql
=
pSql
;
pSupporter1
->
pState
=
pState
;
SSqlObj
*
pNew
=
createSubqueryObj
(
pSql
,
0
,
multiVnodeInsertFinalize
,
pSupporter1
,
TSDB_SQL_INSERT
,
NULL
);
if
(
pNew
==
NULL
)
{
tscError
(
"%p failed to malloc buffer for subObj, orderOfSub:%d, reason:%s"
,
pSql
,
i
,
strerror
(
errno
));
tscError
(
"%p failed to malloc buffer for subObj, orderOfSub:%d, reason:%s"
,
pSql
,
numOfSub
,
strerror
(
errno
));
goto
_error
;
}
...
...
@@ -1938,26 +1938,25 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
* the callback function (multiVnodeInsertFinalize) correctly.
*/
pNew
->
fetchFp
=
pNew
->
fp
;
pSql
->
pSubs
[
i
]
=
pNew
;
pSql
->
pSubs
[
numOfSub
]
=
pNew
;
code
=
tscCopyDataBlockToPayload
(
pNew
,
pDataBlocks
->
pData
[
i
]);
code
=
tscCopyDataBlockToPayload
(
pNew
,
pDataBlocks
->
pData
[
numOfSub
]);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
tscTrace
(
"%p prepare submit data block failed in async insertion, vnodeIdx:%d, total:%d, code:%d"
,
pSql
,
i
,
tscTrace
(
"%p prepare submit data block failed in async insertion, vnodeIdx:%d, total:%d, code:%d"
,
pSql
,
numOfSub
,
pDataBlocks
->
nSize
,
code
);
goto
_error
;
}
else
{
tscTrace
(
"%p sub:%p create subObj success. orderOfSub:%d"
,
pSql
,
pNew
,
i
);
tscTrace
(
"%p sub:%p create subObj success. orderOfSub:%d"
,
pSql
,
pNew
,
numOfSub
);
}
}
if
(
i
<
pSql
->
numOfSubs
)
{
if
(
numOfSub
<
pSql
->
numOfSubs
)
{
tscError
(
"%p failed to prepare subObj structure and launch sub-insertion"
,
pSql
);
pRes
->
code
=
TSDB_CODE_TSC_OUT_OF_MEMORY
;
return
pRes
->
code
;
// free all allocated resource
}
// use the local variable
int32_t
numOfSub
=
pSql
->
numOfSubs
;
for
(
int32_t
j
=
0
;
j
<
numOfSub
;
++
j
)
{
SSqlObj
*
pSub
=
pSql
->
pSubs
[
j
];
tscTrace
(
"%p sub:%p launch sub insert, orderOfSub:%d"
,
pSql
,
pSub
,
j
);
...
...
@@ -1969,11 +1968,12 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
_error:
// restore the udf fp
pSql
->
fp
=
pSql
->
fetchFp
;
pSql
->
pSubs
[
0
]
=
NULL
;
tfree
(
pState
);
tfree
(
pSql
->
param
);
for
(
int32_t
j
=
1
;
j
<
i
;
++
j
)
{
for
(
int32_t
j
=
1
;
j
<
numOfSub
;
++
j
)
{
tfree
(
pSql
->
pSubs
[
j
]
->
param
);
taos_free_result
(
pSql
->
pSubs
[
j
]);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录