MXS-1275: Add client protocol data to MXS_SESSION
The current sql mode will be tracked in that variable. Since one thread will handle multiple sessions, we need to track the sql mode of a session, so that the sql mode of the query classifier can be set whenever we handle a request of a particular session. As the sql-mode will be managed by the client protocol, the data can be private to it as well.
This commit is contained in:
@ -27,7 +27,7 @@ MXS_BEGIN_DECLS
|
||||
|
||||
#define SESSION_INIT {.ses_chk_top = CHK_NUM_SESSION, \
|
||||
.stats = SESSION_STATS_INIT, .head = MXS_DOWNSTREAM_INIT, .tail = MXS_UPSTREAM_INIT, \
|
||||
.state = SESSION_STATE_ALLOC, .ses_chk_tail = CHK_NUM_SESSION}
|
||||
.state = SESSION_STATE_ALLOC, .client_protocol_data = 0, .ses_chk_tail = CHK_NUM_SESSION}
|
||||
|
||||
#define SESSION_PROTOCOL(x, type) DCB_PROTOCOL((x)->client_dcb, type)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user