[CP] fix a core caused by omitting the deep copy

This commit is contained in:
obdev
2022-11-15 07:38:00 +00:00
committed by wangzelin.wzl
parent 6343ac5c05
commit dbbbb29f9d
2 changed files with 6 additions and 6 deletions

View File

@ -5592,9 +5592,9 @@ int ObDDLResolver::check_column_in_foreign_key_for_oracle(
ret = OB_ALLOCATE_MEMORY_FAILED; ret = OB_ALLOCATE_MEMORY_FAILED;
SQL_RESV_LOG(ERROR, "failed to allocate memory", K(ret)); SQL_RESV_LOG(ERROR, "failed to allocate memory", K(ret));
} else if (FALSE_IT(foreign_key_arg = new (tmp_ptr)ObDropForeignKeyArg())) { } else if (FALSE_IT(foreign_key_arg = new (tmp_ptr)ObDropForeignKeyArg())) {
} else if (FALSE_IT(foreign_key_arg->foreign_key_name_.assign_ptr( } else if (OB_FAIL(deep_copy_str(foreign_key_info.foreign_key_name_,
foreign_key_info.foreign_key_name_.ptr(), foreign_key_arg->foreign_key_name_))) {
foreign_key_info.foreign_key_name_.length()))) { LOG_WARN("failed to deep copy foreign_key_name", K(ret), K(foreign_key_info));
} else if (OB_ISNULL(alter_table_stmt)) { } else if (OB_ISNULL(alter_table_stmt)) {
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
SQL_RESV_LOG(WARN, "alter table stmt should not be null", K(ret)); SQL_RESV_LOG(WARN, "alter table stmt should not be null", K(ret));