Log connection ID when reading server handshake
By logging the connection ID for each created connection, failures can be traced back from the backend server all the way up to the client application.
This commit is contained in:
parent
ec890b33cd
commit
9722c0887a
@ -1080,6 +1080,14 @@ int gw_decode_mysql_server_handshake(MySQLProtocol* conn, uint8_t* payload)
|
||||
|
||||
// get ThreadID: 4 bytes
|
||||
uint32_t tid = gw_mysql_get_byte4(payload);
|
||||
|
||||
// LocalClient also uses this code and it doesn't populate the server pointer
|
||||
// TODO: fix it
|
||||
if (conn->owner_dcb && conn->owner_dcb->server)
|
||||
{
|
||||
MXS_INFO("Connected to '%s' with thread id %u", conn->owner_dcb->server->name, tid);
|
||||
}
|
||||
|
||||
/* TODO: Correct value of thread id could be queried later from backend if
|
||||
* there is any worry it might be larger than 32bit allows. */
|
||||
conn->thread_id = tid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user