提交 f5827bd9 编写于 作者: wmmhello's avatar wmmhello

fix: fix coredump if mode function with interval

上级 82aff4ea
......@@ -330,8 +330,8 @@ SSDataBlock* createOutputBuf(SExprInfo* pExpr, int32_t numOfOutput, int32_t numO
int64_t tmp = idata.info.bytes;
tmp *= numOfRows;
if (tmp >= 1024*1024*1024) { // 1G
qError("size is too large, failed to allocate column buffer for output buffer");
if (tmp >= INT32_MAX) {
qError("size is too large, failed to allocate column buffer for output buffer:%" PRId64, tmp);
tmp = 128*1024*1024;
}
size_t size = (size_t)MAX(tmp, minSize);
......@@ -9556,7 +9556,7 @@ void setResultBufSize(SQueryAttr* pQueryAttr, SRspResultInfo* pResultInfo) {
// the minimum number of rows for projection query
const int32_t MIN_ROWS_FOR_PRJ_QUERY = 8192;
const int32_t DEFAULT_MIN_ROWS = 1024;
const int32_t DEFAULT_MIN_ROWS = 4096;
const float THRESHOLD_RATIO = 0.85f;
......
......@@ -204,7 +204,7 @@ SResultRowPool* initResultRowPool(size_t size) {
p->elemSize = (int32_t) size;
int64_t tmp = p->elemSize;
tmp *= p->numOfElemPerBlock;
if (tmp > 1024*1024*1024){
if (tmp > INT32_MAX){
qError("ResultRow blockSize is too large:%" PRId64, tmp);
return NULL;
}
......@@ -223,6 +223,7 @@ SResultRow* getNewResultRow(SResultRowPool* p) {
void* ptr = NULL;
if (p->position.pos == 0) {
ptr = calloc(1, p->blockSize);
if(ptr == NULL) return NULL;
taosArrayPush(p->pData, &ptr);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册