Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
259b7e8a
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看板
提交
259b7e8a
编写于
12月 06, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compile issue
上级
899d7b0b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
36 addition
and
37 deletion
+36
-37
source/common/src/tdataformat.c
source/common/src/tdataformat.c
+2
-2
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+7
-4
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+9
-9
source/libs/parser/src/parInsertUtil.c
source/libs/parser/src/parInsertUtil.c
+15
-15
source/libs/qcom/src/queryUtil.c
source/libs/qcom/src/queryUtil.c
+2
-6
source/libs/scheduler/src/schRemote.c
source/libs/scheduler/src/schRemote.c
+1
-1
未找到文件。
source/common/src/tdataformat.c
浏览文件 @
259b7e8a
...
...
@@ -537,7 +537,7 @@ static int32_t tRowMergeImpl(SArray *aRowP, STSchema *pTSchema, int32_t iStart,
aIter
=
taosMemoryCalloc
(
nRow
,
sizeof
(
SRowIter
*
));
if
(
aIter
==
NULL
)
{
code
=
TSDB_CODE_
TDB_
OUT_OF_MEMORY
;
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_exit
;
}
...
...
@@ -551,7 +551,7 @@ static int32_t tRowMergeImpl(SArray *aRowP, STSchema *pTSchema, int32_t iStart,
// merge
aColVal
=
taosArrayInit
(
pTSchema
->
numOfCols
,
sizeof
(
SColVal
));
if
(
aColVal
==
NULL
)
{
code
=
TSDB_CODE_
TDB_
OUT_OF_MEMORY
;
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_exit
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
259b7e8a
...
...
@@ -3551,10 +3551,11 @@ int32_t tsdbGetNextRowInMem(STableBlockScanInfo* pBlockScanInfo, STsdbReader* pR
}
int32_t
doAppendRowFromTSRow
(
SSDataBlock
*
pBlock
,
STsdbReader
*
pReader
,
SRow
*
pTSRow
,
STableBlockScanInfo
*
pScanInfo
)
{
int32_t
numOfRows
=
pBlock
->
info
.
rows
;
int32_t
numOfCols
=
(
int32_t
)
taosArrayGetSize
(
pBlock
->
pDataBlock
);
int32_t
outputRowIndex
=
pBlock
->
info
.
rows
;
int64_t
uid
=
pScanInfo
->
uid
;
int32_t
numOfCols
=
(
int32_t
)
taosArrayGetSize
(
pBlock
->
pDataBlock
);
SBlockLoadSuppInfo
*
pSupInfo
=
&
pReader
->
suppInfo
;
STSchema
*
pSchema
=
doGetSchemaForTSRow
(
pTSRow
->
sver
,
pReader
,
uid
);
...
...
@@ -3571,8 +3572,10 @@ int32_t doAppendRowFromTSRow(SSDataBlock* pBlock, STsdbReader* pReader, SRow* pT
col_id_t
colId
=
pSupInfo
->
colId
[
i
];
if
(
colId
==
pSchema
->
columns
[
j
].
colId
)
{
SColumnInfoData
*
pColInfoData
=
taosArrayGet
(
pBlock
->
pDataBlock
,
pSupInfo
->
slotId
[
i
]);
tRowGet
(
pTSRow
,
pSchema
,
j
,
&
colVal
);
doCopyColVal
(
pColInfoData
,
numOfRows
,
i
,
&
colVal
,
pSupInfo
);
doCopyColVal
(
pColInfoData
,
outputRowIndex
,
i
,
&
colVal
,
pSupInfo
);
i
+=
1
;
j
+=
1
;
}
else
if
(
colId
<
pSchema
->
columns
[
j
].
colId
)
{
...
...
@@ -3911,7 +3914,7 @@ void tsdbReaderClose(STsdbReader* pReader) {
tBlockDataDestroy
(
&
pReader
->
status
.
fileBlockData
);
taosMemoryFree
(
pSupInfo
->
colId
);
tBlockDataDestroy
(
&
pReader
->
status
.
fileBlockData
,
true
);
tBlockDataDestroy
(
&
pReader
->
status
.
fileBlockData
);
cleanupDataBlockIterator
(
&
pReader
->
status
.
blockIter
);
size_t
numOfTables
=
taosHashGetSize
(
pReader
->
status
.
pTableMap
);
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
259b7e8a
...
...
@@ -956,7 +956,7 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
if
(
pSubmitRsp
->
aCreateTbRsp
==
NULL
&&
(
pSubmitRsp
->
aCreateTbRsp
=
taosArrayInit
(
TARRAY_SIZE
(
pSubmitReq
->
aSubmitTbData
),
sizeof
(
SVCreateTbRsp
)))
==
NULL
)
{
code
=
TSDB_CODE_
TDB_
OUT_OF_MEMORY
;
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_exit
;
}
...
...
@@ -968,7 +968,7 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
if
(
newTbUids
==
NULL
&&
(
newTbUids
=
taosArrayInit
(
TARRAY_SIZE
(
pSubmitReq
->
aSubmitTbData
),
sizeof
(
int64_t
)))
==
NULL
)
{
code
=
TSDB_CODE_
TDB_
OUT_OF_MEMORY
;
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_exit
;
}
...
...
@@ -1029,13 +1029,13 @@ _exit:
#else
SSubmitReq
*
pSubmitReq
=
(
SSubmitReq
*
)
pReq
;
SSubmitRsp
submitRsp
=
{
0
};
int32_t
nRows
=
0
;
int32_t
tsize
,
ret
;
SEncoder
encoder
=
{
0
};
SArray
*
newTbUids
=
NULL
;
SVStatis
statis
=
{
0
};
bool
tbCreated
=
false
;
SSubmitRsp
submitRsp
=
{
0
};
int32_t
nRows
=
0
;
int32_t
tsize
,
ret
;
SEncoder
encoder
=
{
0
};
SArray
*
newTbUids
=
NULL
;
SVStatis
statis
=
{
0
};
bool
tbCreated
=
false
;
terrno
=
TSDB_CODE_SUCCESS
;
pRsp
->
code
=
0
;
...
...
source/libs/parser/src/parInsertUtil.c
浏览文件 @
259b7e8a
...
...
@@ -204,7 +204,6 @@ void qDestroyBoundColInfo(void* pInfo) {
taosMemoryFreeClear
(
pBoundInfo
->
pColIndex
);
}
static
int32_t
createDataBlock
(
size_t
defaultSize
,
int32_t
rowSize
,
int32_t
startOffset
,
STableMeta
*
pTableMeta
,
STableDataBlocks
**
dataBlocks
)
{
STableDataBlocks
*
dataBuf
=
(
STableDataBlocks
*
)
taosMemoryCalloc
(
1
,
sizeof
(
STableDataBlocks
));
...
...
@@ -1012,7 +1011,8 @@ void insCheckTableDataOrder(STableDataCxt* pTableCxt, TSKEY tsKey) {
void
destroyBoundColInfo
(
SBoundColInfo
*
pInfo
)
{
taosMemoryFreeClear
(
pInfo
->
pColIndex
);
}
static
int32_t
createTableDataCxt
(
STableMeta
*
pTableMeta
,
SVCreateTbReq
**
pCreateTbReq
,
STableDataCxt
**
pOutput
,
bool
colMode
)
{
static
int32_t
createTableDataCxt
(
STableMeta
*
pTableMeta
,
SVCreateTbReq
**
pCreateTbReq
,
STableDataCxt
**
pOutput
,
bool
colMode
)
{
STableDataCxt
*
pTableCxt
=
taosMemoryCalloc
(
1
,
sizeof
(
STableDataCxt
));
if
(
NULL
==
pTableCxt
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -1229,33 +1229,33 @@ int32_t insMergeTableDataCxt(SHashObj* pTableHash, SArray** pVgDataBlocks) {
if
(
NULL
==
pVgroupHash
||
NULL
==
pVgroupList
)
{
taosHashCleanup
(
pVgroupHash
);
taosArrayDestroy
(
pVgroupList
);
return
TSDB_CODE_
TSC_
OUT_OF_MEMORY
;
return
TSDB_CODE_OUT_OF_MEMORY
;
}
int32_t
code
=
TSDB_CODE_SUCCESS
;
bool
colFormat
=
false
;
bool
colFormat
=
false
;
void
*
p
=
taosHashIterate
(
pTableHash
,
NULL
);
if
(
p
)
{
STableDataCxt
*
pTableCxt
=
*
(
STableDataCxt
**
)
p
;
colFormat
=
(
0
!=
(
pTableCxt
->
pData
->
flags
&
SUBMIT_REQ_COLUMN_DATA_FORMAT
));
}
while
(
TSDB_CODE_SUCCESS
==
code
&&
NULL
!=
p
)
{
STableDataCxt
*
pTableCxt
=
*
(
STableDataCxt
**
)
p
;
if
(
colFormat
)
{
SColData
*
pCol
=
taosArrayGet
(
pTableCxt
->
pData
->
aCol
,
0
);
SColData
*
pCol
=
taosArrayGet
(
pTableCxt
->
pData
->
aCol
,
0
);
if
(
pCol
->
nVal
<=
0
)
{
p
=
taosHashIterate
(
pTableHash
,
p
);
continue
;
}
if
(
pTableCxt
->
pData
->
pCreateTbReq
)
{
pTableCxt
->
pData
->
flags
|=
SUBMIT_REQ_AUTO_CREATE_TABLE
;
}
taosArraySort
(
pTableCxt
->
pData
->
aCol
,
insColDataComp
);
tColDataSortMerge
(
pTableCxt
->
pData
->
aCol
);
}
else
{
if
(
!
pTableCxt
->
ordered
)
{
...
...
@@ -1265,7 +1265,7 @@ int32_t insMergeTableDataCxt(SHashObj* pTableHash, SArray** pVgDataBlocks) {
code
=
tRowMerge
(
pTableCxt
->
pData
->
aRowP
,
pTableCxt
->
pSchema
,
0
);
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
SVgroupDataCxt
*
pVgCxt
=
NULL
;
int32_t
vgId
=
pTableCxt
->
pMeta
->
vgId
;
...
...
@@ -1304,7 +1304,7 @@ static int32_t buildSubmitReq(int32_t vgId, SSubmitReq2* pReq, void** pData, uin
len
+=
sizeof
(
SMsgHead
);
pBuf
=
taosMemoryMalloc
(
len
);
if
(
NULL
==
pBuf
)
{
return
TSDB_CODE_
TSC_
OUT_OF_MEMORY
;
return
TSDB_CODE_OUT_OF_MEMORY
;
}
((
SMsgHead
*
)
pBuf
)
->
vgId
=
htonl
(
vgId
);
((
SMsgHead
*
)
pBuf
)
->
contLen
=
htonl
(
len
);
...
...
@@ -1332,7 +1332,7 @@ int32_t insBuildVgDataBlocks(SHashObj* pVgroupsHashObj, SArray* pVgDataCxtList,
size_t
numOfVg
=
taosArrayGetSize
(
pVgDataCxtList
);
SArray
*
pDataBlocks
=
taosArrayInit
(
numOfVg
,
POINTER_BYTES
);
if
(
NULL
==
pDataBlocks
)
{
return
TSDB_CODE_
TSC_
OUT_OF_MEMORY
;
return
TSDB_CODE_OUT_OF_MEMORY
;
}
int32_t
code
=
TSDB_CODE_SUCCESS
;
...
...
@@ -1340,7 +1340,7 @@ int32_t insBuildVgDataBlocks(SHashObj* pVgroupsHashObj, SArray* pVgDataCxtList,
SVgroupDataCxt
*
src
=
taosArrayGetP
(
pVgDataCxtList
,
i
);
SVgDataBlocks
*
dst
=
taosMemoryCalloc
(
1
,
sizeof
(
SVgDataBlocks
));
if
(
NULL
==
dst
)
{
code
=
TSDB_CODE_
TSC_
OUT_OF_MEMORY
;
code
=
TSDB_CODE_OUT_OF_MEMORY
;
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
dst
->
numOfTables
=
taosArrayGetSize
(
src
->
pData
->
aSubmitTbData
);
...
...
@@ -1350,7 +1350,7 @@ int32_t insBuildVgDataBlocks(SHashObj* pVgroupsHashObj, SArray* pVgDataCxtList,
code
=
buildSubmitReq
(
src
->
vgId
,
src
->
pData
,
&
dst
->
pData
,
&
dst
->
size
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
(
NULL
==
taosArrayPush
(
pDataBlocks
,
&
dst
)
?
TSDB_CODE_
TSC_
OUT_OF_MEMORY
:
TSDB_CODE_SUCCESS
);
code
=
(
NULL
==
taosArrayPush
(
pDataBlocks
,
&
dst
)
?
TSDB_CODE_OUT_OF_MEMORY
:
TSDB_CODE_SUCCESS
);
}
}
...
...
source/libs/qcom/src/queryUtil.c
浏览文件 @
259b7e8a
...
...
@@ -448,7 +448,6 @@ int32_t cloneTableMeta(STableMeta* pSrc, STableMeta** pDst) {
return
TSDB_CODE_SUCCESS
;
}
void
freeVgInfo
(
SDBVgInfo
*
vgInfo
)
{
if
(
NULL
==
vgInfo
)
{
return
;
...
...
@@ -460,7 +459,6 @@ void freeVgInfo(SDBVgInfo* vgInfo) {
taosMemoryFreeClear
(
vgInfo
);
}
int32_t
cloneDbVgInfo
(
SDBVgInfo
*
pSrc
,
SDBVgInfo
**
pDst
)
{
if
(
NULL
==
pSrc
)
{
*
pDst
=
NULL
;
...
...
@@ -508,7 +506,7 @@ int32_t cloneSVreateTbReq(SVCreateTbReq* pSrc, SVCreateTbReq** pDst) {
*
pDst
=
taosMemoryCalloc
(
1
,
sizeof
(
SVCreateTbReq
));
if
(
NULL
==
*
pDst
)
{
return
TSDB_CODE_
TSC_
OUT_OF_MEMORY
;
return
TSDB_CODE_OUT_OF_MEMORY
;
}
(
*
pDst
)
->
flags
=
pSrc
->
flags
;
...
...
@@ -533,7 +531,7 @@ int32_t cloneSVreateTbReq(SVCreateTbReq* pSrc, SVCreateTbReq** pDst) {
if
(
pSrc
->
ctb
.
tagName
)
{
(
*
pDst
)
->
ctb
.
tagName
=
taosArrayDup
(
pSrc
->
ctb
.
tagName
,
NULL
);
}
STag
*
pTag
=
(
STag
*
)
pSrc
->
ctb
.
pTag
;
STag
*
pTag
=
(
STag
*
)
pSrc
->
ctb
.
pTag
;
if
(
pTag
)
{
(
*
pDst
)
->
ctb
.
pTag
=
taosMemoryMalloc
(
pTag
->
len
);
memcpy
((
*
pDst
)
->
ctb
.
pTag
,
pTag
,
pTag
->
len
);
...
...
@@ -549,5 +547,3 @@ int32_t cloneSVreateTbReq(SVCreateTbReq* pSrc, SVCreateTbReq** pDst) {
return
TSDB_CODE_SUCCESS
;
}
source/libs/scheduler/src/schRemote.c
浏览文件 @
259b7e8a
...
...
@@ -270,7 +270,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
SCH_ERR_JRET
(
code
);
}
atomic_add_fetch_
32
(
&
pJob
->
resNumOfRows
,
rsp
->
affectedRows
);
atomic_add_fetch_
64
(
&
pJob
->
resNumOfRows
,
rsp
->
affectedRows
);
int32_t
createTbRspNum
=
taosArrayGetSize
(
rsp
->
aCreateTbRsp
);
SCH_TASK_DLOG
(
"submit succeed, affectedRows:%d, createTbRspNum:%d"
,
rsp
->
affectedRows
,
createTbRspNum
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录