[bugfix] fix column equal encoding exception offset array overflow

This commit is contained in:
saltonz
2023-05-16 04:16:42 +00:00
committed by ob-robot
parent 4f31c69e63
commit 4e78cd9426
2 changed files with 106 additions and 2 deletions

View File

@ -290,7 +290,15 @@ template <ObObjTypeStoreClass StoreClass>
OB_INLINE void ObBitMapMetaWriter<StoreClass>::fill_param()
{
if (0 > exc_fix_size_) {
index_byte_ = exc_total_size_ <= UINT8_MAX ? 1 : 2;
if (exc_total_size_ <= UINT8_MAX) {
index_byte_ = 1;
} else if (exc_total_size_ <= UINT16_MAX) {
index_byte_ = 2;
} else if (exc_total_size_ <= UINT32_MAX) {
index_byte_ = 4;
} else {
index_byte_ = 8;
}
} else {
exc_total_size_ = exc_fix_size_ * exc_row_ids_->count();
}