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

@ -64,7 +64,8 @@ typedef enum {
SESSION_STATE_LISTENER, /*< for listener session */
SESSION_STATE_LISTENER_STOPPED, /*< for listener session */
SESSION_STATE_TO_BE_FREED, /*< ready to be freed as soon as there are no references */
SESSION_STATE_FREE /*< for all sessions */
SESSION_STATE_FREE, /*< for all sessions */
SESSION_STATE_DUMMY /*< dummy session for consistency */
} session_state_t;
/**
@ -162,6 +163,7 @@ typedef struct session {
SESSION *get_all_sessions();
SESSION *session_alloc(struct service *, struct dcb *);
SESSION *session_alloc_dummy(struct dcb *);
bool session_free(SESSION *);
int session_isvalid(SESSION *);
int session_reply(void *inst, void *session, GWBUF *data);