Change session id to 64bit

The server internal session id may be larger than 4 bytes (MariaDB uses 8)
but only 4 are sent in the handshake. The full value can be queried
from the server, but this query is not supported by MaxScale yet. In any
case, both the protocol and MXS_SESSION now have 64 bit counters. Only the
low 32 bits are sent in the handshake, similar to server.
This commit is contained in:
Esa Korhonen
2017-05-09 16:09:10 +03:00
parent 9c12e78cce
commit aebe839990
8 changed files with 31 additions and 29 deletions

View File

@ -363,7 +363,7 @@ int32_t SchemaRouterSession::routeQuery(GWBUF* pPacket)
if (m_config->debug)
{
sprintf(errbuf + strlen(errbuf),
" ([%" PRIu32 "]: DB change failed)",
" ([%" PRIu64 "]: DB change failed)",
m_client->session->ses_id);
}
@ -991,7 +991,7 @@ bool SchemaRouterSession::handle_default_db()
sprintf(errmsg, "Unknown database '%s'", m_connect_db.c_str());
if (m_config->debug)
{
sprintf(errmsg + strlen(errmsg), " ([%" PRIu32 "]: DB not found on connect)",
sprintf(errmsg + strlen(errmsg), " ([%" PRIu64 "]: DB not found on connect)",
m_client->session->ses_id);
}
write_error_to_client(m_client,