unsupport using 'CREATE USER' stmt with hostname in oracle mode

This commit is contained in:
jingtaoye35
2023-04-26 14:24:20 +00:00
committed by ob-robot
parent 9da7440717
commit 0f7e23e3f5

View File

@ -117,6 +117,11 @@ int ObCreateUserResolver::resolve(const ParseNode &parse_tree)
host_name.assign_ptr(user_pass->children_[3]->str_value_,
static_cast<int32_t>(user_pass->children_[3]->str_len_));
}
if (lib::is_oracle_mode() && 0 != host_name.compare(OB_DEFAULT_HOST_NAME)) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "create user with hostname");
LOG_WARN("create user shoud not use hostname in oracle mode", K(ret));
}
ObString password;
ObString need_enc_str = ObString::make_string("NO");
if (user_name.empty()) {