fix mysqltest

This commit is contained in:
wangt1xiuyi 2023-04-23 08:16:08 +00:00 committed by ob-robot
parent b8aa87adca
commit d39196ec23
2 changed files with 11 additions and 9 deletions

View File

@ -31,9 +31,9 @@ static int easy_magic_in_support_list(uint64_t magic)
int i = 0;
for (i = 0; i < g_support_eio_maigc_num; i++) {
if (magic == g_support_eio_maigc[i]) {
return 1;
}
}
return 1;
}
}
return ret;
}
@ -197,9 +197,9 @@ int net_send_negotiate_message(uint8_t negotiation_enable, int fd, uint64_t magi
ne_msg.msg_body.io_thread_index = index;
easy_addr_t addr = easy_inet_getpeername(fd);
char addr_str[32];
easy_inet_addr_to_str(&addr, addr_str, 32);
if (negotiation_enable) {
char addr_str[32];
easy_inet_addr_to_str(&addr, addr_str, 32);
if (negotiation_enable) {
if (magic) {
int send_bytes = 0;
const int MAX_SEND_LEN = 20;
@ -243,9 +243,9 @@ void net_consume_negotiation_msg(int fd, uint64_t magic)
int64_t decode_len = 0;
easy_negotiation_msg_t ne_msg;
char recv_buf[recv_buf_len];
memset(&ne_msg, 0, sizeof(ne_msg));
memset(recv_buf, 0, sizeof(recv_buf_len));
memset(&ne_msg, 0, sizeof(ne_msg));
memset(recv_buf, 0, sizeof(recv_buf_len));
while ((rcv_bytes = recv(fd, (char *) recv_buf, sizeof(recv_buf), MSG_PEEK)) < 0 && EINTR == errno);

View File

@ -201,6 +201,8 @@ public:
ObOptColumnStat *stat) :
ObStatColItem(param, stat)
{}
// always need to deduce table avg row length
virtual bool is_needed() const override { return true; }
const char *get_fmt() const
{
return lib::is_oracle_mode() ? " AVG(SYS_OP_OPNSIZE(\"%.*s\"))"