[FEAT MERGE]4_1_sql_feature

Co-authored-by: leslieyuchen <leslieyuchen@gmail.com>
Co-authored-by: Charles0429 <xiezhenjiang@gmail.com>
Co-authored-by: raywill <hustos@gmail.com>
This commit is contained in:
obdev
2023-01-28 16:01:26 +08:00
committed by ob-robot
parent 3080f2b66f
commit 2d19a9d8f5
846 changed files with 161957 additions and 116661 deletions

View File

@ -17,6 +17,8 @@
#include "rpc/ob_request.h"
#include "rpc/obmysql/ob_mysql_util.h"
#include "rpc/obmysql/ob_mysql_packet.h"
#include "rpc/obmysql/ob_packet_record.h"
#include "rpc/obmysql/obsm_struct.h"
using namespace oceanbase::common;
@ -70,6 +72,9 @@ static int build_compressed_packet(ObEasyBuffer &src_buf,
if (OB_ISNULL(context.send_buf_)) {
ret = OB_INVALID_ARGUMENT;
SERVER_LOG(WARN, "send_buf_ is null", K(context), K(ret));
} else if (OB_ISNULL(context.conn_)) {
ret = OB_INVALID_ARGUMENT;
SERVER_LOG(WARN, "conn_ is null", K(context), K(ret));
} else {
ObEasyBuffer dst_buf(*context.send_buf_);
const int64_t comp_buf_size = dst_buf.write_avail_size() - OB_MYSQL_COMPRESSED_HEADER_SIZE;
@ -111,6 +116,10 @@ static int build_compressed_packet(ObEasyBuffer &src_buf,
static_cast<int32_t>(len_before_compress), pos))) {
SERVER_LOG(WARN, "failed to store_int3", K(ret));
} else {
if (context.conn_->pkt_rec_wrapper_.enable_proto_dia()) {
context.conn_->pkt_rec_wrapper_.end_seal_comp_pkt(
static_cast<uint32_t>(dst_data_size), context.seq_);
}
SERVER_LOG(DEBUG, "succ to build compressed pkt", "comp_len", dst_data_size,
"comp_seq", context.seq_, K(len_before_compress), K(next_compress_size),
K(src_buf), K(dst_buf), K(context));