diff --git a/deps/easy/src/io/easy_negotiation.c b/deps/easy/src/io/easy_negotiation.c index b98c39fd9..4efa4b85f 100644 --- a/deps/easy/src/io/easy_negotiation.c +++ b/deps/easy/src/io/easy_negotiation.c @@ -79,9 +79,9 @@ static int easy_decode_uint64(char *buf, const int64_t data_len, int64_t *pos, u 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; + *val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 48; + *val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 40; + *val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 32; *val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 24; *val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 16; *val |= (((uint64_t)((*(buf + (*pos)++))) & 0xff)) << 8; @@ -149,9 +149,9 @@ static int easy_decode_negotiation_msg(easy_negotiation_msg_t *ne_msg, char *rec ret = easy_decode_uint64(recv_buf, recv_buf_len, &pos, &(ne_msg->msg_header.header_magic)); if (ret != EASY_OK) { - easy_info_log("easy decode header magic failed!ret:%d.", ret); - return ret; - } + 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) { @@ -291,9 +291,9 @@ int easy_send_negotiate_message(easy_connection_t *c) c->is_negotiated = 1; } if (conn_has_error) { - c->conn_has_error = conn_has_error; - } - return ret; + c->conn_has_error = conn_has_error; + } + return ret; } void easy_consume_negotiation_msg(int fd, easy_io_t *eio) diff --git a/src/sql/ob_spi.cpp b/src/sql/ob_spi.cpp index 8b37377a8..b57e5f641 100644 --- a/src/sql/ob_spi.cpp +++ b/src/sql/ob_spi.cpp @@ -5194,11 +5194,15 @@ int ObSPIService::inner_open(ObPLExecCtx *ctx, ret = OB_ERR_UNEXPECTED; LOG_WARN("Argument in pl context is NULL", K(session), K(ret)); } else { + bool old_client_return_rowid = session->is_client_return_rowid(); bool is_inner_session = session->is_inner(); ObSQLSessionInfo::SessionType old_session_type = session->get_session_type(); ObInnerSQLConnection *spi_conn = NULL; !is_inner_session ? session->set_inner_session() : (void)NULL; session->set_session_type(ObSQLSessionInfo::USER_SESSION); + if (NULL != ctx->pl_ctx_) { + session->set_client_return_rowid(false); + } if (OB_SUCC(ret)) { WITH_CONTEXT(spi_result.get_memory_ctx()) { if (NULL != sql.ptr()) { @@ -5220,6 +5224,7 @@ int ObSPIService::inner_open(ObPLExecCtx *ctx, !is_inner_session ? session->set_user_session() : (void)NULL; session->set_session_type(old_session_type); + session->set_client_return_rowid(old_client_return_rowid); } } return ret; diff --git a/src/sql/session/ob_basic_session_info.h b/src/sql/session/ob_basic_session_info.h index dcaba83db..feb49ee61 100644 --- a/src/sql/session/ob_basic_session_info.h +++ b/src/sql/session/ob_basic_session_info.h @@ -1053,6 +1053,11 @@ public: return capability_.cap_flags_.OB_CLIENT_RETURN_HIDDEN_ROWID; } + inline void set_client_return_rowid(bool flag) + { + capability_.cap_flags_.OB_CLIENT_RETURN_HIDDEN_ROWID = (flag ? 1 : 0); + } + inline bool is_client_use_lob_locator() const { return capability_.cap_flags_.OB_CLIENT_USE_LOB_LOCATOR;