提交 209802bc 编写于 作者: 羽飞's avatar 羽飞 提交者: wangzelin.wzl

log both user error code and internal error code while sending error packet

上级 d915c6dd
......@@ -1232,8 +1232,11 @@ int ObMPBase::send_error_packet(
OMPKError epacket;
// TODO Negotiate a err for rerouting sql
epacket.set_errcode(static_cast<uint16_t>(ob_errpkt_errno(err, lib::is_oracle_mode())));
ret = epacket.set_sqlstate(ob_sqlstate(err));
const int user_error_code = ob_errpkt_errno(err, lib::is_oracle_mode());
const char *sql_state = ob_sqlstate(err);
LOG_INFO("send error package.", K(user_error_code), K(err), K(sql_state), K(message));
epacket.set_errcode(static_cast<uint16_t>(user_error_code));
ret = epacket.set_sqlstate(sql_state);
if (OB_SUCC(ret) && OB_SUCC(epacket.set_message(message))) {
comp_context_.update_last_pkt_pos(ez_buf_->last);
if (OB_FAIL(response_packet(epacket))) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册