fix some bugs
This commit is contained in:
parent
8b6b9d8df0
commit
7d7c37db03
@ -11981,6 +11981,8 @@ int ObLogPlan::choose_duplicate_table_replica(ObLogicalOperator *op,
|
||||
} else if (is_stack_overflow) {
|
||||
ret = OB_SIZE_OVERFLOW;
|
||||
LOG_WARN("too deep recursive", K(ret));
|
||||
} else if (log_op_def::LOG_TEMP_TABLE_INSERT == op->get_type()) {
|
||||
// do nothing
|
||||
} else if (log_op_def::LOG_TABLE_SCAN == op->get_type() &&
|
||||
NULL != op->get_strong_sharding() &&
|
||||
op->get_strong_sharding()->get_can_reselect_replica() &&
|
||||
|
@ -190,6 +190,7 @@ int ObOptimizer::generate_plan_for_temp_table(ObDMLStmt &stmt)
|
||||
ObSelectStmt *ref_query = NULL;
|
||||
ObSelectLogPlan *temp_plan = NULL;
|
||||
ObLogicalOperator *temp_op = NULL;
|
||||
ObShardingInfo *sharding_info = NULL;
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < temp_table_infos.count(); i++) {
|
||||
ObRawExpr *temp_table_nonwhere_filter = NULL;
|
||||
ObRawExpr *temp_table_where_filter = NULL;
|
||||
@ -224,10 +225,18 @@ int ObOptimizer::generate_plan_for_temp_table(ObDMLStmt &stmt)
|
||||
LOG_WARN("Failed to generate temp_plan for sub_stmt", K(ret));
|
||||
} else if (OB_FAIL(temp_plan->get_candidate_plans().get_best_plan(temp_op))) {
|
||||
LOG_WARN("failed to get best plan", K(ret));
|
||||
} else if (OB_FAIL(temp_plan->choose_duplicate_table_replica(temp_op,
|
||||
ctx_.get_local_server_addr(),
|
||||
true))) {
|
||||
LOG_WARN("failed to choose duplicate table replica", K(ret));
|
||||
} else if (OB_ISNULL(temp_op)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("get unexpected null", K(ret));
|
||||
} else {
|
||||
sharding_info = temp_op->get_strong_sharding();
|
||||
if (NULL != sharding_info && sharding_info->get_can_reselect_replica()) {
|
||||
sharding_info->set_can_reselect_replica(false);
|
||||
}
|
||||
if (NULL != temp_table_nonwhere_filter) {
|
||||
ObSEArray<ObRawExpr *, 1> expr_array;
|
||||
if (OB_FAIL(expr_array.push_back(temp_table_nonwhere_filter))) {
|
||||
|
@ -1987,14 +1987,11 @@ int ObTransformSimplifySubquery::try_trans_any_all_as_exists(ObDMLStmt *stmt,
|
||||
}
|
||||
} else {
|
||||
//check children
|
||||
bool child_is_bool_expr = expr->get_expr_type() == T_OP_OR ||
|
||||
expr->get_expr_type() == T_OP_AND ||
|
||||
expr->get_expr_type() == T_OP_XOR;
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < expr->get_param_count(); ++i) {
|
||||
if (OB_FAIL(SMART_CALL(try_trans_any_all_as_exists(stmt,
|
||||
expr->get_param_expr(i),
|
||||
not_null_ctx,
|
||||
child_is_bool_expr,
|
||||
false,
|
||||
is_happened)))) {
|
||||
LOG_WARN("failed to try_transform_any_all for param", K(ret));
|
||||
} else {
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user