提交 df1c2d9f 编写于 作者: R raywill 提交者: wangzelin.wzl

[CP] fix errorcode overwrite error, prevent data error

上级 9cb52970
......@@ -7037,7 +7037,7 @@ int ObPartitionUtils::get_all_part(
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get invalid part array", K(part));
} else {
for (int64_t i = 0; i < table_schema.get_part_option().get_part_num(); i++) {
for (int64_t i = 0; OB_SUCC(ret) && i < table_schema.get_part_option().get_part_num(); i++) {
if (OB_ISNULL(part[i])) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get invalid partition info", K(ret), K(i));
......
......@@ -1994,8 +1994,10 @@ int ObTableLocation::calculate_partition_ids(ObExecContext& exec_ctx, common::Ob
LOG_WARN("Get virtual table fake id error", K(ret));
}
}
if (OB_FAIL(partition_ids.push_back(fake_id))) {
LOG_WARN("Add fake partition id error", K(ret));
if (OB_SUCC(ret)) {
if (OB_FAIL(partition_ids.push_back(fake_id))) {
LOG_WARN("Add fake partition id error", K(ret));
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册