Fix ObTempRowStore filling in uniform const format value causing crash
This commit is contained in:
		@ -331,9 +331,11 @@ int ObTempRowStore::Iterator::get_next_batch(const IVectorPtrs &vectors,
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
  if (OB_SUCC(ret) && read_rows > 0) {
 | 
					  if (OB_SUCC(ret) && read_rows > 0) {
 | 
				
			||||||
    for (int64_t col_idx = 0; OB_SUCC(ret) && col_idx < vectors.count(); col_idx ++) {
 | 
					    for (int64_t col_idx = 0; OB_SUCC(ret) && col_idx < vectors.count(); col_idx ++) {
 | 
				
			||||||
 | 
					      if (VEC_UNIFORM_CONST != vectors.at(col_idx)->get_format()) {
 | 
				
			||||||
        ret = vectors.at(col_idx)->from_rows(row_store_->row_meta_, rows, read_rows, col_idx);
 | 
					        ret = vectors.at(col_idx)->from_rows(row_store_->row_meta_, rows, read_rows, col_idx);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  return ret;
 | 
					  return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -3867,7 +3867,7 @@ int ObSql::pc_get_plan(ObPlanCacheCtx &pc_ctx,
 | 
				
			|||||||
      tmp_ret = OB_E(EventTable::EN_PC_NOT_SWALLOW_ERROR) OB_SUCCESS;
 | 
					      tmp_ret = OB_E(EventTable::EN_PC_NOT_SWALLOW_ERROR) OB_SUCCESS;
 | 
				
			||||||
      if (OB_SUCCESS != tmp_ret) {
 | 
					      if (OB_SUCCESS != tmp_ret) {
 | 
				
			||||||
         // do nothing
 | 
					         // do nothing
 | 
				
			||||||
        if (OB_SQL_PC_NOT_EXIST == ret) {
 | 
					        if (OB_SQL_PC_NOT_EXIST == ret || OB_REACH_MEMORY_LIMIT == ret) {
 | 
				
			||||||
          ret = OB_SUCCESS;
 | 
					          ret = OB_SUCCESS;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
@ -4202,7 +4202,7 @@ int ObSql::parser_and_check(const ObString &outlined_stmt,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (OB_SUCC(ret)) {
 | 
					  if (OB_SUCC(ret)) {
 | 
				
			||||||
    //租户级别的read only检查
 | 
					    //租户级别的read only检查
 | 
				
			||||||
    if ((session->is_inner() && !pc_ctx.sql_ctx_.is_from_pl_) || pc_ctx.is_begin_commit_stmt()) {
 | 
					    if (session->is_inner() || pc_ctx.is_begin_commit_stmt()) {
 | 
				
			||||||
      // FIXME:
 | 
					      // FIXME:
 | 
				
			||||||
      // schema拆分后,为了避免建租户时获取不到租户read only属性导致建租户失败,对于inner sql
 | 
					      // schema拆分后,为了避免建租户时获取不到租户read only属性导致建租户失败,对于inner sql
 | 
				
			||||||
      // 暂时跳过read only检查。实际上,对于tenant space系统表,不应该检查read only属性。
 | 
					      // 暂时跳过read only检查。实际上,对于tenant space系统表,不应该检查read only属性。
 | 
				
			||||||
 | 
				
			|||||||
@ -247,7 +247,7 @@ int ObPCVSet::inner_add_cache_obj(ObILibCacheCtx &ctx,
 | 
				
			|||||||
             K(pc_ctx.sql_ctx_.session_info_));
 | 
					             K(pc_ctx.sql_ctx_.session_info_));
 | 
				
			||||||
  } else if (get_plan_num() >= MAX_PCV_SET_PLAN_NUM) {
 | 
					  } else if (get_plan_num() >= MAX_PCV_SET_PLAN_NUM) {
 | 
				
			||||||
    static const int64_t PRINT_PLAN_EXCEEDS_LOG_INTERVAL = 20 * 1000 * 1000; // 20s
 | 
					    static const int64_t PRINT_PLAN_EXCEEDS_LOG_INTERVAL = 20 * 1000 * 1000; // 20s
 | 
				
			||||||
    ret = OB_ERR_UNEXPECTED;
 | 
					    ret = OB_REACH_MEMORY_LIMIT;
 | 
				
			||||||
    if (REACH_TIME_INTERVAL(PRINT_PLAN_EXCEEDS_LOG_INTERVAL)) {
 | 
					    if (REACH_TIME_INTERVAL(PRINT_PLAN_EXCEEDS_LOG_INTERVAL)) {
 | 
				
			||||||
      LOG_INFO("number of plans in a single pcv_set reach limit", K(ret), K(get_plan_num()), K(pc_ctx));
 | 
					      LOG_INFO("number of plans in a single pcv_set reach limit", K(ret), K(get_plan_num()), K(pc_ctx));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -594,7 +594,7 @@ int ObPlanCache::get_plan(common::ObIAllocator &allocator,
 | 
				
			|||||||
        if (GCONF.enable_perf_event) {
 | 
					        if (GCONF.enable_perf_event) {
 | 
				
			||||||
          uint64_t tenant_id = pc_ctx.sql_ctx_.session_info_->get_effective_tenant_id();
 | 
					          uint64_t tenant_id = pc_ctx.sql_ctx_.session_info_->get_effective_tenant_id();
 | 
				
			||||||
          bool read_only = false;
 | 
					          bool read_only = false;
 | 
				
			||||||
          if ((pc_ctx.sql_ctx_.session_info_->is_inner() && !pc_ctx.sql_ctx_.is_from_pl_)) {
 | 
					          if (pc_ctx.sql_ctx_.session_info_->is_inner()) {
 | 
				
			||||||
            // do nothing
 | 
					            // do nothing
 | 
				
			||||||
          } else if (OB_FAIL(pc_ctx.sql_ctx_.schema_guard_->get_tenant_read_only(tenant_id,
 | 
					          } else if (OB_FAIL(pc_ctx.sql_ctx_.schema_guard_->get_tenant_read_only(tenant_id,
 | 
				
			||||||
                                                                                 read_only))) {
 | 
					                                                                                 read_only))) {
 | 
				
			||||||
@ -2266,7 +2266,7 @@ int ObPlanCache::get_ps_plan(ObCacheObjGuard& guard,
 | 
				
			|||||||
  if (OB_SUCC(ret) && GCONF.enable_perf_event) {
 | 
					  if (OB_SUCC(ret) && GCONF.enable_perf_event) {
 | 
				
			||||||
    uint64_t tenant_id = pc_ctx.sql_ctx_.session_info_->get_effective_tenant_id();
 | 
					    uint64_t tenant_id = pc_ctx.sql_ctx_.session_info_->get_effective_tenant_id();
 | 
				
			||||||
    bool read_only = false;
 | 
					    bool read_only = false;
 | 
				
			||||||
    if ((pc_ctx.sql_ctx_.session_info_->is_inner() && !pc_ctx.sql_ctx_.is_from_pl_)) {
 | 
					    if (pc_ctx.sql_ctx_.session_info_->is_inner()) {
 | 
				
			||||||
      // do nothing
 | 
					      // do nothing
 | 
				
			||||||
    } else if (OB_FAIL(pc_ctx.sql_ctx_.schema_guard_->get_tenant_read_only(tenant_id, read_only))) {
 | 
					    } else if (OB_FAIL(pc_ctx.sql_ctx_.schema_guard_->get_tenant_read_only(tenant_id, read_only))) {
 | 
				
			||||||
      SQL_PC_LOG(WARN, "fail to get tenant read only attribute", K(tenant_id), K(ret));
 | 
					      SQL_PC_LOG(WARN, "fail to get tenant read only attribute", K(tenant_id), K(ret));
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user