[CP] fix: fix the core induced by not push back the part expr of foreign key that is parent table mock

This commit is contained in:
obdev
2023-10-10 10:09:47 +00:00
committed by ob-robot
parent 3d363ea059
commit af4801cfc0

View File

@ -1344,10 +1344,10 @@ int ObLogDelUpd::generate_fk_lookup_part_id_expr(IndexDMLInfo &index_dml_info)
for (int64_t i = 0; OB_SUCC(ret) && i < fk_infos->count(); i++) {
const ObForeignKeyInfo &fk_info = fk_infos->at(i);
ObRawExpr* fk_scan_part_expr = nullptr;
if (fk_info.table_id_ != fk_info.child_table_id_) {
if (fk_info.table_id_ != fk_info.child_table_id_ || fk_info.is_parent_table_mock_) {
// update parent table, check child table, don't use das task to perform foreign key check
ret = index_dml_info.fk_lookup_part_id_expr_.push_back(fk_scan_part_expr);
} else if (!fk_info.is_parent_table_mock_) {
} else {
const uint64_t parent_table_id = fk_info.parent_table_id_;
const ObTableSchema *parent_table_schema = NULL;
uint64_t scan_index_tid = OB_INVALID_ID;