[CP] disallow ddl with predefined rules with trigger.

This commit is contained in:
obdev
2023-07-20 01:12:08 +00:00
committed by ob-robot
parent f39de9dd64
commit b4eaec0f1c
2 changed files with 6 additions and 6 deletions

View File

@ -1082,8 +1082,8 @@ int ObIndexBuildTask::update_column_checksum_calc_status(
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid argument", K(ret), K(tablet_id));
} else if (ObDDLTaskStatus::VALIDATE_CHECKSUM != task_status_) {
ret = OB_STATE_NOT_MATCH;
LOG_WARN("task status not match", K(ret), K(task_status_));
ret = OB_TASK_EXPIRED;
LOG_WARN("task expired", K(ret), K(task_status_));
} else {
if (OB_FAIL(wait_column_checksum_ctx_.update_status(tablet_id, ret_code))) {
LOG_WARN("update column checksum calculation status failed", K(ret), K(tablet_id), K(ret_code));

View File

@ -4311,10 +4311,6 @@ int ObTableSchema::check_prohibition_rules(const ObColumnSchemaV2 &src_schema,
// The column contains the check constraint to prohibit modification of the type in mysql mode
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Alter column with check constraint");
} else if (is_offline && OB_FAIL(check_has_trigger_on_table(schema_guard, is_enable))) {
LOG_WARN("failed to check alter column in trigger", K(ret));
} else if (is_enable) {
// do nothing, change/modify column is allowed on table with trigger(enable/disable).
} else if (is_oracle_mode && src_schema.is_tbl_part_key_column()) {
// Partition key prohibited to modify the type in oracle mode
ret = OB_NOT_SUPPORTED;
@ -4335,6 +4331,10 @@ int ObTableSchema::check_prohibition_rules(const ObColumnSchemaV2 &src_schema,
&& is_column_in_fk) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Alter column charset or collation with foreign key");
} else if (is_offline && OB_FAIL(check_has_trigger_on_table(schema_guard, is_enable))) {
LOG_WARN("failed to check alter column in trigger", K(ret));
} else if (is_enable) {
// do nothing, change/modify column is allowed on table with trigger(enable/disable).
}
return ret;
}