Removed useless session initialize
This commit is contained in:
@ -523,8 +523,6 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
|
|||||||
if (dcb)
|
if (dcb)
|
||||||
protocol = DCB_PROTOCOL(dcb, MySQLProtocol);
|
protocol = DCB_PROTOCOL(dcb, MySQLProtocol);
|
||||||
|
|
||||||
session = DCB_SESSION(dcb);
|
|
||||||
|
|
||||||
client_data = (MYSQL_session *)calloc(1, sizeof(MYSQL_session));
|
client_data = (MYSQL_session *)calloc(1, sizeof(MYSQL_session));
|
||||||
dcb->data = client_data;
|
dcb->data = client_data;
|
||||||
|
|
||||||
@ -853,9 +851,11 @@ int gw_read_client_event(DCB* dcb) {
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
session = dcb->session;
|
session = dcb->session;
|
||||||
router = session->service->router;
|
if (session) {
|
||||||
router_instance = session->service->router_instance;
|
router = session->service->router;
|
||||||
rsession = session->router_session;
|
router_instance = session->service->router_instance;
|
||||||
|
rsession = session->router_session;
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////
|
||||||
// read and handle errors & close, or return if busy
|
// read and handle errors & close, or return if busy
|
||||||
@ -1126,8 +1126,6 @@ int gw_MySQLAccept(DCB *listener) {
|
|||||||
client->fd = c_sock;
|
client->fd = c_sock;
|
||||||
client->remote = strdup(inet_ntoa(local.sin_addr));
|
client->remote = strdup(inet_ntoa(local.sin_addr));
|
||||||
|
|
||||||
client->session = session;
|
|
||||||
|
|
||||||
protocol = (MySQLProtocol *) calloc(1, sizeof(MySQLProtocol));
|
protocol = (MySQLProtocol *) calloc(1, sizeof(MySQLProtocol));
|
||||||
client->protocol = (void *)protocol;
|
client->protocol = (void *)protocol;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user