diff --git a/src/sql/engine/dml/ob_table_insert_up_op.cpp b/src/sql/engine/dml/ob_table_insert_up_op.cpp index 7c6b098edfbdb822f6666c182f155c3667519035..e3141bebd1e69680a9de75c90dcb4292820b9f0f 100644 --- a/src/sql/engine/dml/ob_table_insert_up_op.cpp +++ b/src/sql/engine/dml/ob_table_insert_up_op.cpp @@ -885,8 +885,8 @@ int ObTableInsertUpOp::load_batch_insert_up_rows(bool &is_iter_end, int64_t &ins int64_t simulate_batch_row_cnt = - EVENT_CALL(EventTable::EN_TABLE_INSERT_UP_BATCH_ROW_COUNT); int64_t default_row_batch_cnt = simulate_batch_row_cnt > 0 ? simulate_batch_row_cnt : INT64_MAX; - if (is_ignore_) { - // If it is ignore mode, degenerate into single line execution + if (is_ignore_ || execute_single_row_) { + // If it is ignore mode or need excute row by row, degenerate into single line execution default_row_batch_cnt = 1; } LOG_DEBUG("simulate lookup row batch count", K(simulate_batch_row_cnt), K(default_row_batch_cnt)); diff --git a/src/sql/engine/dml/ob_table_replace_op.cpp b/src/sql/engine/dml/ob_table_replace_op.cpp index dc0676f03735cfa236913d98555dfdd857e4d375..0c7916c63af788364be25ef55377b9ee9cc3d928 100644 --- a/src/sql/engine/dml/ob_table_replace_op.cpp +++ b/src/sql/engine/dml/ob_table_replace_op.cpp @@ -270,7 +270,10 @@ OB_INLINE int ObTableReplaceOp::load_all_replace_row(bool &is_iter_end) int64_t default_row_batch_cnt = simulate_batch_row_cnt > 0 ? simulate_batch_row_cnt : DEFAULT_REPLACE_BATCH_ROW_COUNT; LOG_DEBUG("simulate lookup row batch count", K(simulate_batch_row_cnt), K(default_row_batch_cnt)); - while (OB_SUCC(ret) && ++row_cnt < default_row_batch_cnt) { + if (execute_single_row_) { + default_row_batch_cnt = 1; + } + while (OB_SUCC(ret) && ++row_cnt <= default_row_batch_cnt) { // todo @kaizhan.dkz @wangbo.wb 增加行前trigger逻辑在这里 // 新行的外键检查也在这里做 if (OB_FAIL(get_next_row_from_child())) {