Get service capabilities from a better source

The DCB pointer in the MySQLProtocol struct doesn't appear to be updated
in all cases which causes it to be an unreliable source. As the session
itself is always available and it always has the service pointer properly
set, it should be used instead.

Also removed the dead protocol compression code and replaced the
parameters with the service capability bits.
This commit is contained in:
Markus Mäkelä
2018-03-15 23:02:49 +02:00
parent 20c5ca1619
commit 10a9d70851
3 changed files with 13 additions and 19 deletions

View File

@ -104,7 +104,7 @@ void LocalClient::process(uint32_t events)
{
if (gw_decode_mysql_server_handshake(&m_protocol, GWBUF_DATA(buf) + MYSQL_HEADER_LEN) == 0)
{
GWBUF* response = gw_generate_auth_response(&m_client, &m_protocol, false, false);
GWBUF* response = gw_generate_auth_response(&m_client, &m_protocol, false, false, 0);
m_queue.push_front(response);
m_state = VC_RESPONSE_SENT;
}