Handle client input case where no router session exists by sending error message to client.

This commit is contained in:
counterpoint
2015-09-18 08:59:06 +01:00
parent 31c6666278
commit c69658889c

View File

@ -758,9 +758,9 @@ int gw_read_client_event(
router = session->service->router;
router_instance = session->service->router_instance;
rsession = session->router_session;
ss_dassert(rsession != NULL);
if (router_instance != NULL && rsession != NULL) {
if (router_instance != NULL && rsession != NULL)
{
/** Ask what type of input the router expects */
cap = router->getCapabilities(router_instance, rsession);
@ -820,6 +820,16 @@ int gw_read_client_event(
goto return_rc;
}
}
else
{
/** Send ERR 1045 to client */
mysql_send_auth_error(
dcb,
2,
0,
"failed to create new session");
return 0;
}
}
if (stmt_input) {