disable predicate moving into values_table_query
This commit is contained in:
parent
6d5c70d2b4
commit
d79c4f9031
@ -311,7 +311,12 @@ int ObLogExprValues::allocate_expr_post(ObAllocExprContext &ctx)
|
||||
LOG_WARN("failed to construct sequence values", K(ret));
|
||||
} else if (OB_FAIL(mark_probably_local_exprs())) {
|
||||
LOG_WARN("failed to mark local exprs", K(ret));
|
||||
} else { /*do nothing*/ }
|
||||
} else if (is_values_table_) { /* defence code */
|
||||
if (OB_UNLIKELY(value_desc_.count() != get_output_exprs().count())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("defence code, EXPRESSION request output_exprs equals to value_desc", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -2841,6 +2841,9 @@ int ObTransformPredicateMoveAround::pushdown_into_semi_info(ObDMLStmt *stmt,
|
||||
OB_ISNULL(right_table = stmt->get_table_item_by_id(semi_info->right_table_id_))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("params have null", K(ret), K(stmt), K(semi_info), K(right_table));
|
||||
} else if (right_table->is_values_table()) {
|
||||
/* not allow predicate moving into values table */
|
||||
OPT_TRACE("right table is values table");
|
||||
} else if (OB_FAIL(stmt->get_table_rel_ids(semi_info->left_table_ids_, left_rel_ids))) {
|
||||
LOG_WARN("failed to get left rel ids", K(ret));
|
||||
} else if (OB_FAIL(stmt->get_table_rel_ids(semi_info->right_table_id_, right_rel_ids))) {
|
||||
@ -3044,6 +3047,10 @@ int ObTransformPredicateMoveAround::pushdown_into_table(ObDMLStmt *stmt,
|
||||
!table_item->is_generated_table() &&
|
||||
!table_item->is_temp_table()) {
|
||||
// do nothing
|
||||
} else if (table_item->is_generated_table() &&
|
||||
NULL != table_item->ref_query_ &&
|
||||
table_item->ref_query_->is_values_table_query()) {
|
||||
/* not allow predicate moving into values table query */
|
||||
} else if (OB_FAIL(rename_preds.assign(table_preds))) {
|
||||
LOG_WARN("failed to assgin exprs", K(ret));
|
||||
} else if (OB_FAIL(ObTransformUtils::extract_table_exprs(*stmt,
|
||||
|
@ -369,7 +369,8 @@ int ObTransformViewMerge::check_semi_right_table_can_be_merged(ObDMLStmt *stmt,
|
||||
|| ref_query->has_sequence()
|
||||
|| ref_query->is_hierarchical_query()
|
||||
|| ref_query->has_ora_rowscn()
|
||||
|| (lib::is_mysql_mode() && ref_query->has_for_update())) {
|
||||
|| (lib::is_mysql_mode() && ref_query->has_for_update())
|
||||
|| ref_query->is_values_table_query()) {
|
||||
can_be = false;
|
||||
} else if (OB_FAIL(ref_query->has_rownum(has_rownum))) {
|
||||
LOG_WARN("failed to check has rownum expr", K(ret));
|
||||
|
@ -1238,7 +1238,7 @@ int ObWhereSubQueryPullup::check_subquery_validity(ObDMLStmt &stmt,
|
||||
} else if (!is_valid) {
|
||||
// do nothing
|
||||
OPT_TRACE("hint reject transform");
|
||||
} else if (!subquery->is_spj() || subquery->has_subquery()) {
|
||||
} else if (!subquery->is_spj() || subquery->has_subquery() || subquery->is_values_table_query()) {
|
||||
is_valid = false;
|
||||
OPT_TRACE("subquery is not spj or has subquery");
|
||||
} else if (OB_FAIL(subquery->get_column_exprs(columns))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user