[BUGFIX]fix signal 7 core in arm
This commit is contained in:
@ -111,7 +111,8 @@ int ObTextStringIter::init(uint32_t buffer_len,
|
|||||||
|
|
||||||
static int init_lob_access_param(storage::ObLobAccessParam ¶m,
|
static int init_lob_access_param(storage::ObLobAccessParam ¶m,
|
||||||
ObLobTextIterCtx *lob_iter_ctx,
|
ObLobTextIterCtx *lob_iter_ctx,
|
||||||
ObCollationType cs_type)
|
ObCollationType cs_type,
|
||||||
|
ObIAllocator *allocator = nullptr)
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
int64_t query_timeout = 0;
|
int64_t query_timeout = 0;
|
||||||
@ -156,7 +157,10 @@ static int init_lob_access_param(storage::ObLobAccessParam ¶m,
|
|||||||
param.sql_mode_ = (lob_iter_ctx->session_ == NULL) ? SMO_DEFAULT : lob_iter_ctx->session_->get_sql_mode();
|
param.sql_mode_ = (lob_iter_ctx->session_ == NULL) ? SMO_DEFAULT : lob_iter_ctx->session_->get_sql_mode();
|
||||||
|
|
||||||
param.tablet_id_ = ObTabletID(location_info->tablet_id_);
|
param.tablet_id_ = ObTabletID(location_info->tablet_id_);
|
||||||
param.allocator_ = lob_iter_ctx->alloc_;
|
if (allocator == nullptr) {
|
||||||
|
allocator = lob_iter_ctx->alloc_;
|
||||||
|
}
|
||||||
|
param.allocator_ = allocator;
|
||||||
int64_t disk_loc_handle_size = disk_loc_str.length();
|
int64_t disk_loc_handle_size = disk_loc_str.length();
|
||||||
param.lob_common_ = disk_loc;
|
param.lob_common_ = disk_loc;
|
||||||
param.handle_size_ = disk_loc_handle_size;
|
param.handle_size_ = disk_loc_handle_size;
|
||||||
@ -176,7 +180,7 @@ static int init_lob_access_param(storage::ObLobAccessParam ¶m,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObTextStringIter::get_outrow_lob_full_data()
|
int ObTextStringIter::get_outrow_lob_full_data(ObIAllocator *allocator /*nullptr*/ )
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
storage::ObLobManager* lob_mngr = MTL(storage::ObLobManager*);
|
storage::ObLobManager* lob_mngr = MTL(storage::ObLobManager*);
|
||||||
@ -190,7 +194,7 @@ int ObTextStringIter::get_outrow_lob_full_data()
|
|||||||
COMMON_LOG(WARN, "Lob: get lob manager failed.", K(ret));
|
COMMON_LOG(WARN, "Lob: get lob manager failed.", K(ret));
|
||||||
} else { // outrow persist lob
|
} else { // outrow persist lob
|
||||||
storage::ObLobAccessParam param;
|
storage::ObLobAccessParam param;
|
||||||
if (OB_SUCC(init_lob_access_param(param, ctx_, cs_type_))) {
|
if (OB_SUCC(init_lob_access_param(param, ctx_, cs_type_, allocator))) {
|
||||||
param.len_ = (ctx_->total_access_len_ == 0 ? param.byte_size_ : ctx_->total_access_len_);
|
param.len_ = (ctx_->total_access_len_ == 0 ? param.byte_size_ : ctx_->total_access_len_);
|
||||||
|
|
||||||
if (!param.ls_id_.is_valid() || !param.tablet_id_.is_valid()) {
|
if (!param.ls_id_.is_valid() || !param.tablet_id_.is_valid()) {
|
||||||
@ -291,7 +295,7 @@ int ObTextStringIter::get_current_block(ObString &str)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObTextStringIter::get_full_data(ObString &data_str)
|
int ObTextStringIter::get_full_data(ObString &data_str, ObIAllocator *allocator)
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
if (!is_init_ || state_ != TEXTSTRING_ITER_INIT) {
|
if (!is_init_ || state_ != TEXTSTRING_ITER_INIT) {
|
||||||
@ -309,7 +313,7 @@ int ObTextStringIter::get_full_data(ObString &data_str)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// outrow lob, read full data into a inrow local tmp lob currently
|
// outrow lob, read full data into a inrow local tmp lob currently
|
||||||
if (OB_FAIL(get_outrow_lob_full_data())) {
|
if (OB_FAIL(get_outrow_lob_full_data(allocator))) {
|
||||||
COMMON_LOG(WARN, "Lob: get lob outrow data failed", K(ret));
|
COMMON_LOG(WARN, "Lob: get lob outrow data failed", K(ret));
|
||||||
} else {
|
} else {
|
||||||
data_str.assign_ptr(ctx_->buff_, ctx_->content_byte_len_);
|
data_str.assign_ptr(ctx_->buff_, ctx_->content_byte_len_);
|
||||||
|
|||||||
@ -145,7 +145,7 @@ public:
|
|||||||
|
|
||||||
int get_current_block(ObString &str);
|
int get_current_block(ObString &str);
|
||||||
|
|
||||||
int get_full_data(ObString &data_str);
|
int get_full_data(ObString &data_str, ObIAllocator *allocator = nullptr);
|
||||||
|
|
||||||
int get_inrow_or_outrow_prefix_data(ObString &data_str,
|
int get_inrow_or_outrow_prefix_data(ObString &data_str,
|
||||||
uint32_t prefix_char_len = DEAFULT_LOB_PREFIX_CHAR_LEN);
|
uint32_t prefix_char_len = DEAFULT_LOB_PREFIX_CHAR_LEN);
|
||||||
@ -183,7 +183,7 @@ public:
|
|||||||
bool need_deep_copy = false);
|
bool need_deep_copy = false);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int get_outrow_lob_full_data();
|
int get_outrow_lob_full_data(ObIAllocator *allocator = nullptr);
|
||||||
int get_first_block(ObString &str);
|
int get_first_block(ObString &str);
|
||||||
int get_next_block_inner(ObString &str);
|
int get_next_block_inner(ObString &str);
|
||||||
int get_outrow_prefix_data(uint32_t prefix_char_len);
|
int get_outrow_prefix_data(uint32_t prefix_char_len);
|
||||||
|
|||||||
@ -3237,7 +3237,7 @@ CAST_FUNC_NAME(text, string)
|
|||||||
if (OB_FAIL(instr_iter.init(0, ctx.exec_ctx_.get_my_session(),
|
if (OB_FAIL(instr_iter.init(0, ctx.exec_ctx_.get_my_session(),
|
||||||
is_same_charset ? reinterpret_cast<ObIAllocator *>(&res_alloc) : &temp_allocator))) {
|
is_same_charset ? reinterpret_cast<ObIAllocator *>(&res_alloc) : &temp_allocator))) {
|
||||||
LOG_WARN("init lob str iter failed ", K(ret), K(in_type));
|
LOG_WARN("init lob str iter failed ", K(ret), K(in_type));
|
||||||
} else if (OB_FAIL(instr_iter.get_full_data(data))) {
|
} else if (OB_FAIL(instr_iter.get_full_data(data, &temp_allocator))) {
|
||||||
LOG_WARN("init lob str iter failed ", K(ret), K(in_type));
|
LOG_WARN("init lob str iter failed ", K(ret), K(in_type));
|
||||||
} else if (lib::is_oracle_mode()
|
} else if (lib::is_oracle_mode()
|
||||||
&& ob_is_clob(in_type, in_cs_type)
|
&& ob_is_clob(in_type, in_cs_type)
|
||||||
|
|||||||
Reference in New Issue
Block a user