去除alter外键约束时ob_ddl_timeout的约束,修改当前代码中遗失返回码和dead code的问题 (#344)

* 去除alter外键约束时ob_ddl_timeout的约束,修改遗失返回码和dead code的问题

* 修改log记录的信息,修改移除dead code的代码
This commit is contained in:
Wan
2021-09-09 11:24:34 +08:00
committed by GitHub
parent 2fd258cc46
commit 726dad3ff7
3 changed files with 9 additions and 7 deletions

View File

@ -1742,6 +1742,8 @@ int ObAlterTableExecutor::check_fk_constraint_data_validity(ObExecContext& ctx,
const ObString& origin_database_name = alter_table_schema.get_origin_database_name();
const ObString& origin_table_name = alter_table_schema.get_origin_table_name();
const ObTableSchema* orig_table_schema = NULL;
THIS_WORKER.set_timeout_ts(ObTimeUtility::current_time() + OB_MAX_USER_SPECIFIED_TIMEOUT);
const int64_t start_time = ObTimeUtility::current_time();
if (OB_ISNULL(gctx.schema_service_)) {
ret = OB_ERR_UNEXPECTED;
@ -1777,6 +1779,9 @@ int ObAlterTableExecutor::check_fk_constraint_data_validity(ObExecContext& ctx,
LOG_WARN("fail to check data validity by inner sql", K(ret));
}
}
const int64_t end_time = ObTimeUtility::current_time();
LOG_DEBUG("elapsed time for check_fk_constraint_data_validity:", K(start_time), K(end_time), K(end_time-start_time));
return ret;
}