[to #49178989] fix mysqltest
This commit is contained in:
parent
a3c1c19606
commit
ced1abdc78
18
deps/easy/src/io/easy_negotiation.c
vendored
18
deps/easy/src/io/easy_negotiation.c
vendored
@ -76,9 +76,9 @@ static int easy_encode_uint16(char *buf, const uint64_t buf_len, int64_t *pos, u
|
||||
static int easy_decode_uint64(char *buf, const int64_t data_len, int64_t *pos, uint64_t *val)
|
||||
{
|
||||
int ret = (NULL != buf && data_len - *pos >= 8) ? EASY_OK : EASY_ERROR;
|
||||
|
||||
if (EASY_OK == ret) {
|
||||
*val = (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 56;
|
||||
|
||||
if (EASY_OK == ret) {
|
||||
*val = (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 56;
|
||||
*val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 48;
|
||||
*val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 40;
|
||||
*val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 32;
|
||||
@ -152,9 +152,9 @@ static int easy_decode_negotiation_msg(easy_negotiation_msg_t *ne_msg, char *rec
|
||||
easy_info_log("easy decode header magic failed!ret:%d.", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = easy_decode_uint16(recv_buf, recv_buf_len, &pos, &(ne_msg->msg_header.msg_body_len));
|
||||
if (ret != EASY_OK) {
|
||||
|
||||
ret = easy_decode_uint16(recv_buf, recv_buf_len, &pos, &(ne_msg->msg_header.msg_body_len));
|
||||
if (ret != EASY_OK) {
|
||||
easy_info_log("decode msg body len failed!ret:%d.", ret);
|
||||
return ret;
|
||||
}
|
||||
@ -288,9 +288,9 @@ int easy_send_negotiate_message(easy_connection_t *c)
|
||||
eio->magic,
|
||||
ioth->idx,
|
||||
&conn_has_error)) == EASY_OK) {
|
||||
c->is_negotiated = 1;
|
||||
}
|
||||
if (conn_has_error) {
|
||||
c->is_negotiated = 1;
|
||||
}
|
||||
if (conn_has_error) {
|
||||
c->conn_has_error = conn_has_error;
|
||||
}
|
||||
return ret;
|
||||
|
@ -8901,6 +8901,7 @@ int ObPLResolver::resolve_inner_call(
|
||||
if (OB_SUCC(ret)
|
||||
&& (expr_params.count() > 0 || obj_access_idents.at(i).has_brackets_)
|
||||
&& !access_idxs.at(idx_cnt).is_procedure()
|
||||
&& !access_idxs.at(idx_cnt).is_udf_type()
|
||||
&& !access_idxs.at(idx_cnt).is_system_procedure()
|
||||
&& !access_idxs.at(idx_cnt).is_type_method()
|
||||
&& (!access_idxs.at(idx_cnt).var_type_.is_composite_type() || 0 == expr_params.count())) {
|
||||
|
@ -553,7 +553,7 @@ public:
|
||||
int deserialize(const char* buf, const int64_t len, int64_t &pos);
|
||||
void print() const;
|
||||
|
||||
TO_STRING_KV(K_(type));
|
||||
TO_STRING_KV(K_(type), K_(id), K_(is_null));
|
||||
|
||||
protected:
|
||||
ObPLType type_;
|
||||
|
@ -48,9 +48,16 @@ int ObExprObjectConstruct::calc_result_typeN(ObExprResType &type,
|
||||
UNUSED (type_ctx);
|
||||
CK (param_num == elem_types_.count());
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < param_num; i++) {
|
||||
types[i].set_calc_accuracy(elem_types_.at(i).get_accuracy());
|
||||
types[i].set_calc_meta(elem_types_.at(i).get_obj_meta());
|
||||
types[i].set_calc_type(elem_types_.at(i).get_type());
|
||||
if ((ObExtendType == elem_types_.at(i).get_type()
|
||||
&& types[i].get_type() != ObExtendType && types[i].get_type() != ObNullType)
|
||||
||(ObExtendType == types[i].get_type() && elem_types_.at(i).get_type() != ObExtendType)) {
|
||||
ret = OB_ERR_CALL_WRONG_ARG;
|
||||
LOG_WARN("PLS-00306: wrong number or types of arguments in call", K(ret));
|
||||
} else {
|
||||
types[i].set_calc_accuracy(elem_types_.at(i).get_accuracy());
|
||||
types[i].set_calc_meta(elem_types_.at(i).get_obj_meta());
|
||||
types[i].set_calc_type(elem_types_.at(i).get_type());
|
||||
}
|
||||
}
|
||||
OX (type.set_type(ObExtendType));
|
||||
OX (type.set_udt_id(udt_id_));
|
||||
@ -67,7 +74,10 @@ int ObExprObjectConstruct::check_types(const ObObj *objs_stack,
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < param_num; i++) {
|
||||
if (!objs_stack[i].is_null()) {
|
||||
TYPE_CHECK(objs_stack[i], elem_types.at(i).get_type());
|
||||
if (objs_stack[i].is_pl_extend()) {
|
||||
if (objs_stack[i].is_pl_extend()
|
||||
&& objs_stack[i].get_meta().get_extend_type() != pl::PL_OPAQUE_TYPE
|
||||
&& objs_stack[i].get_meta().get_extend_type() != pl::PL_CURSOR_TYPE
|
||||
&& objs_stack[i].get_meta().get_extend_type() != pl::PL_REF_CURSOR_TYPE) {
|
||||
pl::ObPLComposite *composite = reinterpret_cast<pl::ObPLComposite*>(objs_stack[i].get_ext());
|
||||
CK (OB_NOT_NULL(composite));
|
||||
if (OB_SUCC(ret) && composite->get_id() != elem_types.at(i).get_udt_id()) {
|
||||
|
@ -944,6 +944,7 @@ int ObResolverUtils::check_match(const pl::ObPLResolveCtx &resolve_ctx,
|
||||
// 如果在相同的位置已经进行过匹配, 说明给定的参数在参数列表中出现了两次
|
||||
if (OB_SUCC(ret)
|
||||
&& (OB_INVALID_ID == position
|
||||
|| position >= match_info.match_info_.count()
|
||||
|| ObMaxType != match_info.match_info_.at(position).dest_type_)) {
|
||||
ret = OB_ERR_SP_WRONG_ARG_NUM;
|
||||
LOG_WARN("argument count not match",
|
||||
|
Loading…
x
Reference in New Issue
Block a user