[scn] fix failure of mittest after refresh feature scn

This commit is contained in:
obdev
2022-11-28 01:46:42 +00:00
committed by ob-robot
parent 49a02f3304
commit 54b64a7263
1898 changed files with 255804 additions and 280809 deletions

View File

@ -116,11 +116,10 @@ int ObLoadDataResolver::resolve(const ParseNode &parse_tree)
} else {
ObString file_name(file_name_node->str_len_, file_name_node->str_value_);
if (ObLoadFileLocation::OSS != load_args.load_file_storage_) {
load_args.file_name_ = file_name;
char *full_path_buf = nullptr;
char *actual_path = nullptr;
if (OB_FAIL(ob_write_string(*allocator_, file_name, load_args.file_name_, true))) {
LOG_WARN("fail to write string", K(ret));
} else if (OB_ISNULL(full_path_buf = static_cast<char*>(allocator_->alloc(DEFAULT_BUF_LENGTH)))) {
if (OB_ISNULL(full_path_buf = static_cast<char*>(allocator_->alloc(DEFAULT_BUF_LENGTH)))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("fail to allocate memory", K(ret));
} else if (OB_ISNULL(actual_path = realpath(file_name_node->str_value_, full_path_buf))) {
@ -139,16 +138,12 @@ int ObLoadDataResolver::resolve(const ParseNode &parse_tree)
}
}
} else {
ObString temp_file_name = file_name.split_on('?');
ObString storage_info;
if (OB_FAIL(ob_write_string(*allocator_, temp_file_name, load_args.file_name_, true))) {
LOG_WARN("fail to copy string", K(ret));
} else if (OB_FAIL(ob_write_string(*allocator_, file_name, storage_info, true))) {
LOG_WARN("fail to copy string", K(ret));
} else if (temp_file_name.length() <= 0 || storage_info.length() <= 0) {
load_args.file_name_ = file_name.split_on('?');
if (load_args.file_name_.length() <= 0
|| file_name <= 0) {
ret = OB_INVALID_ARGUMENT;
LOG_USER_ERROR(OB_INVALID_ARGUMENT, "file name or access key");
} else if (OB_FAIL(load_args.access_info_.set(load_args.file_name_.ptr(), storage_info.ptr()))) {
} else if (OB_FAIL(load_args.access_info_.set(load_args.file_name_.ptr(), file_name.ptr()))) {
LOG_WARN("failed to set access info", K(ret));
}
}
@ -1151,7 +1146,6 @@ int ObLoadDataResolver::resolve_string_node(const ParseNode &node, ObString &tar
case T_OPTIONALLY_CLOSED_STR:
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "optionally enclosed string");
break;
default:
ret = OB_ERR_UNEXPECTED;
LOG_WARN("node type must be varchar or ?", K(ret), K(node.type_));