Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c0edaaf7
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看板
未验证
提交
c0edaaf7
编写于
11月 24, 2022
作者:
D
dapan1121
提交者:
GitHub
11月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18391 from taosdata/szhou/fixbugs26
fix: core dump due to assert reallocation result when reallocate fails
上级
820ac209
e1279897
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
6 deletion
+16
-6
src/query/inc/qExtbuffer.h
src/query/inc/qExtbuffer.h
+1
-3
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+7
-1
src/query/src/qExtbuffer.c
src/query/src/qExtbuffer.c
+8
-2
未找到文件。
src/query/inc/qExtbuffer.h
浏览文件 @
c0edaaf7
...
@@ -227,8 +227,6 @@ tOrderDescriptor *tOrderDesCreate(const int32_t *orderColIdx, int32_t numOfOrder
...
@@ -227,8 +227,6 @@ tOrderDescriptor *tOrderDesCreate(const int32_t *orderColIdx, int32_t numOfOrder
void
tOrderDescDestroy
(
tOrderDescriptor
*
pDesc
);
void
tOrderDescDestroy
(
tOrderDescriptor
*
pDesc
);
void
taoscQSort
(
void
**
pCols
,
SSchema
*
pSchema
,
int32_t
numOfCols
,
int32_t
numOfRows
,
int32_t
index
,
__compar_fn_t
compareFn
);
void
tColModelAppend
(
SColumnModel
*
dstModel
,
tFilePage
*
dstPage
,
void
*
srcData
,
int32_t
srcStartRows
,
void
tColModelAppend
(
SColumnModel
*
dstModel
,
tFilePage
*
dstPage
,
void
*
srcData
,
int32_t
srcStartRows
,
int32_t
numOfRowsToWrite
,
int32_t
srcCapacity
);
int32_t
numOfRowsToWrite
,
int32_t
srcCapacity
);
...
@@ -239,7 +237,7 @@ void tColDataQSort(tOrderDescriptor *, int32_t numOfRows, int32_t start, int32_t
...
@@ -239,7 +237,7 @@ void tColDataQSort(tOrderDescriptor *, int32_t numOfRows, int32_t start, int32_t
void
tColDataMergeSort
(
tOrderDescriptor
*
,
int32_t
numOfRows
,
int32_t
start
,
int32_t
end
,
char
*
data
,
int32_t
orderType
);
void
tColDataMergeSort
(
tOrderDescriptor
*
,
int32_t
numOfRows
,
int32_t
start
,
int32_t
end
,
char
*
data
,
int32_t
orderType
);
void
taoscQSort
(
void
**
pCols
,
SSchema
*
pSchema
,
int32_t
numOfCols
,
int32_t
numOfRows
,
int32_t
index
,
__compar_fn_t
compareFn
);
int32_t
taoscQSort
(
void
**
pCols
,
SSchema
*
pSchema
,
int32_t
numOfCols
,
int32_t
numOfRows
,
int32_t
index
,
__compar_fn_t
compareFn
);
int32_t
compare_sa
(
tOrderDescriptor
*
,
int32_t
numOfRows
,
int32_t
idx1
,
int32_t
idx2
,
char
*
data
);
int32_t
compare_sa
(
tOrderDescriptor
*
,
int32_t
numOfRows
,
int32_t
idx1
,
int32_t
idx2
,
char
*
data
);
...
...
src/query/src/qExecutor.c
浏览文件 @
c0edaaf7
...
@@ -6311,7 +6311,13 @@ static SSDataBlock* doSort(void* param, bool* newgroup) {
...
@@ -6311,7 +6311,13 @@ static SSDataBlock* doSort(void* param, bool* newgroup) {
__compar_fn_t
comp
=
getKeyComparFunc
(
pSchema
[
pInfo
->
colIndex
].
type
,
pInfo
->
order
);
__compar_fn_t
comp
=
getKeyComparFunc
(
pSchema
[
pInfo
->
colIndex
].
type
,
pInfo
->
order
);
if
(
pInfo
->
pDataBlock
->
info
.
rows
)
{
if
(
pInfo
->
pDataBlock
->
info
.
rows
)
{
taoscQSort
(
pCols
,
pSchema
,
numOfCols
,
pInfo
->
pDataBlock
->
info
.
rows
,
pInfo
->
colIndex
,
comp
);
int32_t
code
=
taoscQSort
(
pCols
,
pSchema
,
numOfCols
,
pInfo
->
pDataBlock
->
info
.
rows
,
pInfo
->
colIndex
,
comp
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
qError
(
"QInfo:0x%"
PRIx64
" can not sort since %s"
,
GET_QID
(
pOperator
->
pRuntimeEnv
),
tstrerror
(
code
));
tfree
(
pCols
);
tfree
(
pSchema
);
longjmp
(
pOperator
->
pRuntimeEnv
->
env
,
code
);
}
}
}
tfree
(
pCols
);
tfree
(
pCols
);
...
...
src/query/src/qExtbuffer.c
浏览文件 @
c0edaaf7
...
@@ -1257,7 +1257,7 @@ void tOrderDescDestroy(tOrderDescriptor *pDesc) {
...
@@ -1257,7 +1257,7 @@ void tOrderDescDestroy(tOrderDescriptor *pDesc) {
tfree
(
pDesc
);
tfree
(
pDesc
);
}
}
void
taoscQSort
(
void
**
pCols
,
SSchema
*
pSchema
,
int32_t
numOfCols
,
int32_t
numOfRows
,
int32_t
idx
,
__compar_fn_t
compareFn
)
{
int32_t
taoscQSort
(
void
**
pCols
,
SSchema
*
pSchema
,
int32_t
numOfCols
,
int32_t
numOfRows
,
int32_t
idx
,
__compar_fn_t
compareFn
)
{
assert
(
numOfRows
>
0
&&
numOfCols
>
0
&&
idx
>=
0
&&
idx
<
numOfCols
);
assert
(
numOfRows
>
0
&&
numOfCols
>
0
&&
idx
>=
0
&&
idx
<
numOfCols
);
int32_t
bytes
=
pSchema
[
idx
].
bytes
;
int32_t
bytes
=
pSchema
[
idx
].
bytes
;
...
@@ -1289,7 +1289,12 @@ void taoscQSort(void** pCols, SSchema* pSchema, int32_t numOfCols, int32_t numOf
...
@@ -1289,7 +1289,12 @@ void taoscQSort(void** pCols, SSchema* pSchema, int32_t numOfCols, int32_t numOf
// make sure memory buffer is enough
// make sure memory buffer is enough
if
(
prevLength
<
bytes1
)
{
if
(
prevLength
<
bytes1
)
{
char
*
tmp
=
realloc
(
p
,
bytes1
*
numOfRows
);
char
*
tmp
=
realloc
(
p
,
bytes1
*
numOfRows
);
assert
(
tmp
);
if
(
tmp
==
NULL
)
{
qError
(
"can not allocated memory. bytes:%d"
,
bytes
*
numOfRows
);
tfree
(
p
);
tfree
(
buf
);
return
TSDB_CODE_QRY_OUT_OF_MEMORY
;
}
p
=
tmp
;
p
=
tmp
;
prevLength
=
bytes1
;
prevLength
=
bytes1
;
...
@@ -1309,4 +1314,5 @@ void taoscQSort(void** pCols, SSchema* pSchema, int32_t numOfCols, int32_t numOf
...
@@ -1309,4 +1314,5 @@ void taoscQSort(void** pCols, SSchema* pSchema, int32_t numOfCols, int32_t numOf
tfree
(
buf
);
tfree
(
buf
);
tfree
(
p
);
tfree
(
p
);
return
TSDB_CODE_SUCCESS
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录