fix mysqltest
This commit is contained in:
parent
6283feb96f
commit
7a3e524f27
@ -4814,8 +4814,7 @@ int ObSQLUtils::check_location_access_priv(const ObString &location, ObSQLSessio
|
||||
ObArenaAllocator allocator;
|
||||
ObString real_location = location;
|
||||
real_location += strlen(OB_FILE_PREFIX);
|
||||
if (!real_location.empty() && '.' == real_location[0]) {
|
||||
//Relative path
|
||||
if (!real_location.empty()) {
|
||||
ObArrayWrap<char> buffer;
|
||||
OZ (buffer.allocate_array(allocator, PATH_MAX));
|
||||
if (OB_SUCC(ret)) {
|
||||
@ -5124,4 +5123,4 @@ int ObSQLUtils::print_identifier_require_quotes(ObCollationType collation_type,
|
||||
require = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -98,16 +98,15 @@ int ObCreateDirectoryResolver::resolve(const ParseNode &parse_tree)
|
||||
} else {
|
||||
ObString real_directory_path;
|
||||
directory_path.assign_ptr(child_node->str_value_, static_cast<int32_t>(child_node->str_len_));
|
||||
directory_path.trim();
|
||||
if (!directory_path.empty() && '.' == directory_path[0]) {
|
||||
//Relative path
|
||||
if (!directory_path.empty()) {
|
||||
ObArrayWrap<char> buffer;
|
||||
OZ (buffer.allocate_array(*allocator_, PATH_MAX));
|
||||
if (OB_SUCC(ret)) {
|
||||
real_directory_path = ObString(realpath(to_cstring(directory_path), buffer.get_data()));
|
||||
if (real_directory_path.empty()) {
|
||||
real_directory_path = directory_path;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
real_directory_path = directory_path;
|
||||
}
|
||||
OZ (session_info_->get_secure_file_priv(secure_file_priv));
|
||||
OZ (ObResolverUtils::check_secure_path(secure_file_priv, real_directory_path));
|
||||
|
Loading…
x
Reference in New Issue
Block a user