Fix sort error invalid idx

This commit is contained in:
obdev
2024-07-22 13:19:38 +00:00
committed by ob-robot
parent 35db8e8d98
commit 96ca3131b4
2 changed files with 6 additions and 12 deletions

View File

@ -1421,14 +1421,11 @@ int ObSortOpImpl::prepare_bucket_array(ArrayType *&buckets, uint64_t bucket_num)
SQL_ENG_LOG(WARN, "failed to init bucket", K(ret), K(bucket_num));
}
} else {
int64_t max_bucket_cnt = buckets->get_capacity();
if (max_bucket_cnt < bucket_num) {
buckets->reuse();
if (OB_FAIL(buckets->init(bucket_num))) {
LOG_WARN("failed to init bucket array", K(ret), K(bucket_num));
}
}
}
return ret;
}

View File

@ -381,14 +381,11 @@ protected:
SQL_ENG_LOG(WARN, "failed to init bucket", K(ret), K(bucket_num));
}
} else {
int64_t max_bucket_cnt = buckets->get_capacity();
if (max_bucket_cnt < bucket_num) {
buckets->reuse();
if (OB_FAIL(buckets->init(bucket_num))) {
LOG_WARN("failed to init bucket array", K(ret), K(bucket_num));
}
}
}
return ret;
}