MXS-1889 Handle master used as slave
Up until 2.1.12, if it in the configuration file said 'router_options=slave', the master was used if there were no slaves at session creation time. That broke in 2.1.13 as a side-effect of MXS-1516 that checks at routing time whether the server initially selected as master still is the master. Now the required server status is stored separately for each session, so that if the master was chosen, even though we have 'router_options=slave', we can turn on the SERVER_MASTER bit. That allows us to handle the case correctly in connection_is_valid().
This commit is contained in:
@ -49,6 +49,7 @@ typedef struct router_client_session
|
||||
SERVER_REF *backend; /*< Backend used by the client session */
|
||||
DCB *backend_dcb; /*< DCB Connection to the backend */
|
||||
DCB *client_dcb; /**< Client DCB */
|
||||
unsigned int bitvalue; /*< Session specific required value of server->status */
|
||||
struct router_client_session *next;
|
||||
#if defined(SS_DEBUG)
|
||||
skygw_chk_t rses_chk_tail;
|
||||
|
||||
Reference in New Issue
Block a user