Fix external table bugs

This commit is contained in:
wjhh2008
2023-05-10 14:21:03 +00:00
committed by ob-robot
parent 6bb1a8b703
commit f3d62d52ed
11 changed files with 99 additions and 19 deletions

View File

@ -51,15 +51,18 @@ int ObCreateTableLikeResolver::resolve(const ParseNode &parse_tree)
//resolve temporary option
if (OB_SUCC(ret)) {
if (NULL != parse_tree.children_[0]) {
if (T_TEMPORARY != parse_tree.children_[0]->type_) {
if (T_TEMPORARY == parse_tree.children_[0]->type_) {
is_temporary_table = true;
} else if (T_EXTERNAL == parse_tree.children_[0]->type_) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "create external table like");
} else {
ret = OB_INVALID_ARGUMENT;
SQL_RESV_LOG(WARN, "invalid argument.",
K(ret), K(parse_tree.children_[0]->type_));
} else {
is_temporary_table = true;
}
}
if (is_temporary_table) {
if (OB_SUCC(ret) && is_temporary_table) {
char create_host_str[OB_MAX_HOST_NAME_LENGTH];
MYADDR.ip_port_to_string(create_host_str, OB_MAX_HOST_NAME_LENGTH);
if (OB_ISNULL(allocator_)) {