提交 f4cd4696 编写于 作者: O obdev 提交者: ob-robot

test: fix some failed cases induced by single-row execution when has triggers

上级 6d566658
...@@ -885,8 +885,8 @@ int ObTableInsertUpOp::load_batch_insert_up_rows(bool &is_iter_end, int64_t &ins ...@@ -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 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 ? int64_t default_row_batch_cnt = simulate_batch_row_cnt > 0 ?
simulate_batch_row_cnt : INT64_MAX; simulate_batch_row_cnt : INT64_MAX;
if (is_ignore_) { if (is_ignore_ || execute_single_row_) {
// If it is ignore mode, degenerate into single line execution // If it is ignore mode or need excute row by row, degenerate into single line execution
default_row_batch_cnt = 1; default_row_batch_cnt = 1;
} }
LOG_DEBUG("simulate lookup row batch count", K(simulate_batch_row_cnt), K(default_row_batch_cnt)); LOG_DEBUG("simulate lookup row batch count", K(simulate_batch_row_cnt), K(default_row_batch_cnt));
......
...@@ -270,7 +270,10 @@ OB_INLINE int ObTableReplaceOp::load_all_replace_row(bool &is_iter_end) ...@@ -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 ? int64_t default_row_batch_cnt = simulate_batch_row_cnt > 0 ?
simulate_batch_row_cnt : DEFAULT_REPLACE_BATCH_ROW_COUNT; 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)); 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逻辑在这里 // todo @kaizhan.dkz @wangbo.wb 增加行前trigger逻辑在这里
// 新行的外键检查也在这里做 // 新行的外键检查也在这里做
if (OB_FAIL(get_next_row_from_child())) { if (OB_FAIL(get_next_row_from_child())) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册