fix dblink type bugs
This commit is contained in:
@ -145,6 +145,15 @@ int ObCreateDbLinkResolver::resolve(const ParseNode &parse_tree)
|
||||
LOG_WARN("invalid parse tree", K(ret));
|
||||
} else if (FALSE_IT(password.assign_ptr(pwd_node->str_value_, static_cast<int32_t>(pwd_node->str_len_)))) {
|
||||
// do nothing
|
||||
} else if (password.empty()) {
|
||||
if (lib::is_oracle_mode()) {
|
||||
ret = OB_ERR_MISSING_OR_INVALID_PASSWORD;
|
||||
LOG_USER_ERROR(OB_ERR_MISSING_OR_INVALID_PASSWORD);
|
||||
} else {
|
||||
ret = OB_NOT_SUPPORTED;
|
||||
LOG_USER_ERROR(OB_NOT_SUPPORTED, "create dblink with empty password");
|
||||
}
|
||||
LOG_WARN("create dblink with empty password", K(ret));
|
||||
} else if (OB_FAIL(create_dblink_stmt->set_password(password))) {
|
||||
LOG_WARN("set password failed", K(ret));
|
||||
}
|
||||
|
||||
@ -236,8 +236,10 @@ int ObRawExprPrinter::print(ObConstRawExpr *expr)
|
||||
LOG_WARN("fail to print 1 =", K(ret));
|
||||
} else if (OB_NOT_NULL(param_store_) && 0 <= idx && idx < param_store_->count()) {
|
||||
OZ (param_store_->at(idx).print_sql_literal(buf_, buf_len_, *pos_, print_params_));
|
||||
} else if (OB_FAIL(ObLinkStmtParam::write(buf_, buf_len_, *pos_, expr->get_value().get_unknown()))) {
|
||||
LOG_WARN("fail to write param to buf", K(ret));
|
||||
} else if (OB_FAIL(ObLinkStmtParam::write(buf_, buf_len_, *pos_,
|
||||
expr->get_value().get_unknown(),
|
||||
expr->get_data_type()))) {
|
||||
LOG_WARN("fail to write param to buf", K(expr->get_value().get_unknown()), K(expr->get_expr_obj_meta()), K(ret));
|
||||
}
|
||||
} else if (OB_NOT_NULL(param_store_) && T_QUESTIONMARK == expr->get_expr_type()) {
|
||||
int64_t idx = expr->get_value().get_unknown();
|
||||
|
||||
Reference in New Issue
Block a user