pullup_expr & replace_const outline failed bugfix
This commit is contained in:
@ -294,6 +294,21 @@ int ObTransformConstPropagate::do_transform(ObDMLStmt *stmt,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OB_SUCC(ret) && !const_ctx.active_const_infos_.empty() &&
|
||||||
|
(stmt->is_insert_stmt() || stmt->is_merge_stmt())) {
|
||||||
|
is_happened = false;
|
||||||
|
ObDelUpdStmt *insert = static_cast<ObDelUpdStmt *>(stmt);
|
||||||
|
if (OB_FAIL(collect_equal_pair_from_condition(stmt,
|
||||||
|
insert->get_sharding_conditions(),
|
||||||
|
const_ctx,
|
||||||
|
is_happened))) {
|
||||||
|
LOG_WARN("failed to collect const info from sharding condition", K(ret));
|
||||||
|
} else {
|
||||||
|
trans_happened |= is_happened;
|
||||||
|
LOG_TRACE("succeed to do const propagation while collect from sharding", K(is_happened));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (OB_SUCC(ret) && !const_ctx.active_const_infos_.empty() &&
|
if (OB_SUCC(ret) && !const_ctx.active_const_infos_.empty() &&
|
||||||
(stmt->is_insert_stmt() || stmt->is_merge_stmt())) {
|
(stmt->is_insert_stmt() || stmt->is_merge_stmt())) {
|
||||||
ObDelUpdStmt *insert = static_cast<ObDelUpdStmt *>(stmt);
|
ObDelUpdStmt *insert = static_cast<ObDelUpdStmt *>(stmt);
|
||||||
|
@ -173,7 +173,7 @@ int ObTransformExprPullup::need_transform(const ObIArray<ObParentDMLStmt> &paren
|
|||||||
need_trans = false;
|
need_trans = false;
|
||||||
OPT_TRACE("outline reject transform");
|
OPT_TRACE("outline reject transform");
|
||||||
} else {
|
} else {
|
||||||
for (int64_t i = 0; OB_SUCC(ret) && i < stmt.get_table_size(); ++i) {
|
for (int64_t i = 0; !need_trans && OB_SUCC(ret) && i < stmt.get_table_size(); ++i) {
|
||||||
const TableItem *table = NULL;
|
const TableItem *table = NULL;
|
||||||
if (OB_ISNULL(table = stmt.get_table_item(i))) {
|
if (OB_ISNULL(table = stmt.get_table_item(i))) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
|
Reference in New Issue
Block a user