revert deprecate eof
This commit is contained in:
@ -1231,8 +1231,6 @@ create_capabilities(MySQLProtocol *conn, bool with_ssl, bool db_specified, bool
|
|||||||
}
|
}
|
||||||
/** add session track */
|
/** add session track */
|
||||||
final_capabilities |= (uint32_t)GW_MYSQL_CAPABILITIES_SESSION_TRACK;
|
final_capabilities |= (uint32_t)GW_MYSQL_CAPABILITIES_SESSION_TRACK;
|
||||||
/** support deprecate eof */
|
|
||||||
final_capabilities |= (uint32_t)GW_MYSQL_CAPABILITIES_DEPRECATE_EOF;
|
|
||||||
|
|
||||||
/* Compression is not currently supported */
|
/* Compression is not currently supported */
|
||||||
ss_dassert(!compress);
|
ss_dassert(!compress);
|
||||||
@ -1860,6 +1858,14 @@ void mxs_mysql_get_session_track_info(GWBUF *buff, MySQLProtocol *proto)
|
|||||||
size_t packet_len = gw_mysql_get_byte3(header_and_command);
|
size_t packet_len = gw_mysql_get_byte3(header_and_command);
|
||||||
uint8_t cmd = header_and_command[MYSQL_COM_OFFSET];
|
uint8_t cmd = header_and_command[MYSQL_COM_OFFSET];
|
||||||
|
|
||||||
|
if (packet_len > MYSQL_OK_PACKET_MIN_LEN &&
|
||||||
|
cmd == MYSQL_REPLY_OK &&
|
||||||
|
(proto->num_eof_packets % 2) == 0)
|
||||||
|
{
|
||||||
|
buff->gwbuf_type |= GWBUF_TYPE_REPLY_OK;
|
||||||
|
mxs_mysql_parse_ok_packet(buff, offset, packet_len);
|
||||||
|
}
|
||||||
|
|
||||||
if ((proto->current_command == MXS_COM_QUERY ||
|
if ((proto->current_command == MXS_COM_QUERY ||
|
||||||
proto->current_command == MXS_COM_STMT_FETCH ||
|
proto->current_command == MXS_COM_STMT_FETCH ||
|
||||||
proto->current_command == MXS_COM_STMT_EXECUTE) &&
|
proto->current_command == MXS_COM_STMT_EXECUTE) &&
|
||||||
@ -1867,20 +1873,7 @@ void mxs_mysql_get_session_track_info(GWBUF *buff, MySQLProtocol *proto)
|
|||||||
{
|
{
|
||||||
proto->num_eof_packets++;
|
proto->num_eof_packets++;
|
||||||
}
|
}
|
||||||
|
offset += (packet_len + MYSQL_HEADER_LEN);
|
||||||
if (packet_len > MYSQL_OK_PACKET_MIN_LEN &&
|
|
||||||
(proto->num_eof_packets % 2) == 0)
|
|
||||||
{
|
|
||||||
/* ok packet or deprecated eof */
|
|
||||||
if (cmd == MYSQL_REPLY_OK ||
|
|
||||||
(cmd == MYSQL_REPLY_EOF &&
|
|
||||||
proto->server_capabilities & GW_MYSQL_CAPABILITIES_DEPRECATE_EOF))
|
|
||||||
{
|
|
||||||
buff->gwbuf_type |= GWBUF_TYPE_REPLY_OK;
|
|
||||||
mxs_mysql_parse_ok_packet(buff, offset, packet_len);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
offset += (packet_len + + MYSQL_HEADER_LEN);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user