disable pdml when update multiple tables

This commit is contained in:
st0 2022-03-10 13:09:50 +08:00 committed by LINxiansheng
parent 7afcbd32d3
commit 5358649433
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<!--
Thank you for contributing to **OceanBase**! Please read the [How to Contribute](https://github.com/oceanbase/oceanbase/wiki/how_to_contribute) document **BEFORE** filing this PR.
Thank you for contributing to **OceanBase**! Please read the [CONTRIBUTING](https://github.com/oceanbase/oceanbase/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.
-->
### What changes were proposed in this pull request?

View File

@ -256,6 +256,9 @@ int ObOptimizer::check_pdml_enabled(const ObDMLStmt& stmt, const ObSQLSessionInf
is_use_pdml = false;
} else if (stmt::T_INSERT == stmt.get_stmt_type() && !static_cast<const ObInsertStmt&>(stmt).value_from_select()) {
is_use_pdml = false;
} else if ((stmt.is_update_stmt() || stmt.is_delete_stmt()) &&
static_cast<const ObDelUpdStmt &>(stmt).dml_source_from_join()) {
is_use_pdml = false;
} else if (OB_FAIL(session.get_force_parallel_dml_dop(force_pdml_dop))) {
LOG_WARN("fail get force parallel dml session val", K(ret));
} else if (force_pdml_dop > 1) {