Extended session command support to cover COM_CHANGE_USER, and COM_INIT_DB.
This implementation doesn't guarantee execution order between session commands and queries if other backend server lags behind in session command execution. In poll.c : moved processing of EPOLLERR and EPOLLHUP after processing of EPOLLIN and EPOLLOUT. This ensures that COM_QUIT messages are read and routed forward before signals arrive (from local client/backend).
This commit is contained in:
@ -181,7 +181,7 @@ int gw_read_backend_handshake(MySQLProtocol *conn) {
|
||||
conn->state = MYSQL_AUTH_SENT;
|
||||
|
||||
// consume all the data here
|
||||
head = gwbuf_consume(head, gwbuf_length(head));
|
||||
head = gwbuf_consume(head, GWBUF_LENGTH(head));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -337,7 +337,7 @@ int gw_receive_backend_auth(
|
||||
/*<
|
||||
* Remove data from buffer.
|
||||
*/
|
||||
head = gwbuf_consume(head, gwbuf_length(head));
|
||||
head = gwbuf_consume(head, GWBUF_LENGTH(head));
|
||||
}
|
||||
else if (n == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user