Additional spinlock in random_jkiss. Initial attempt at implementing dummy sessions to provide total consistency - used in mysql_client in relation to authentication - a single static dummy session is used and linked from the client dcb when authentication is not yet complete.

This commit is contained in:
counterpoint
2015-08-28 15:30:06 +01:00
parent 0d62f52812
commit 9c5f622481
7 changed files with 71 additions and 9 deletions

View File

@ -912,7 +912,7 @@ int gw_read_client_event(
if (session != NULL)
{
CHK_SESSION(session);
ss_dassert(session->state != SESSION_STATE_ALLOC);
ss_dassert(session->state != SESSION_STATE_ALLOC && session->state != SESSION_STATE_DUMMY);
protocol->protocol_auth_state = MYSQL_IDLE;
/**
@ -1012,7 +1012,7 @@ int gw_read_client_event(
if (session != NULL)
{
CHK_SESSION(session);
ss_dassert(session->state != SESSION_STATE_ALLOC);
ss_dassert(session->state != SESSION_STATE_ALLOC && session->state != SESSION_STATE_DUMMY);
protocol->protocol_auth_state = MYSQL_IDLE;
/**
@ -1643,6 +1643,7 @@ int gw_MySQLAccept(DCB *listener)
}
client_dcb->service = listener->session->service;
client_dcb->session = session_alloc_dummy(client_dcb);
client_dcb->fd = c_sock;
// get client address