Read write split router can reply the master packet to client in session change.

Mysql backend handles auth and session func.


The MYSQL_SESSION_CHANGE may be not in sync with authentication
This commit is contained in:
Massimiliano Pinto
2013-07-15 18:56:14 +02:00
parent 0d3e798b73
commit e0d9d45f3b
11 changed files with 129 additions and 28 deletions

View File

@ -506,6 +506,8 @@ gw_mysql_protocol_state2string (int state) {
return "MySQL received command has been routed to backend(s)";
case MYSQL_WAITING_RESULT:
return "MySQL Waiting for result set";
case MYSQL_SESSION_CHANGE:
return "MySQL change session";
default:
return "MySQL (unknown protocol state)";
}
@ -772,8 +774,6 @@ int gw_send_change_user_to_backend(char *dbname, char *user, uint8_t *passwd, My
rv = write(dcb->fd, GWBUF_DATA(buffer), bytes);
gwbuf_consume(buffer, bytes);
conn->state = MYSQL_IDLE;
if (rv < 0)
return rv;
else