Fix to MXS-431: https://mariadb.atlassian.net/browse/MXS-431
Replaced the use of the shared MySQLSession structure with an internal variable that tracks the currently active database.
This commit is contained in:
@ -323,6 +323,7 @@ struct router_client_session {
|
||||
struct router_client_session* next; /*< List of router sessions */
|
||||
shard_map_t* shardmap; /*< Database hash containing names of the databases mapped to the servers that contain them */
|
||||
char connect_db[MYSQL_DATABASE_MAXLEN+1]; /*< Database the user was trying to connect to */
|
||||
char current_db[MYSQL_DATABASE_MAXLEN + 1]; /*< Current active database */
|
||||
init_mask_t init; /*< Initialization state bitmask */
|
||||
GWBUF* queue; /*< Query that was received before the session was ready */
|
||||
DCB* dcb_route; /*< Internal DCB used to trigger re-routing of buffers */
|
||||
|
||||
@ -12,8 +12,6 @@
|
||||
|
||||
bool extract_database(GWBUF* buf, char* str);
|
||||
void create_error_reply(char* fail_str,DCB* dcb);
|
||||
bool change_current_db(MYSQL_session* mysql_session,
|
||||
HASHTABLE* dbhash,
|
||||
GWBUF* buf);
|
||||
bool change_current_db(char* dest, HASHTABLE* dbhash, GWBUF* buf);
|
||||
|
||||
#endif
|
||||
|
||||
@ -204,6 +204,7 @@ struct router_client_session {
|
||||
SESSION* session;
|
||||
GWBUF* queue;
|
||||
char connect_db[MYSQL_DATABASE_MAXLEN+1]; /*< Database the user was trying to connect to */
|
||||
char current_db[MYSQL_DATABASE_MAXLEN + 1]; /*< Current active database */
|
||||
shard_init_mask_t init; /*< Initialization state bitmask */
|
||||
#if defined(SS_DEBUG)
|
||||
skygw_chk_t rses_chk_tail;
|
||||
|
||||
Reference in New Issue
Block a user