Reset persistent MySQL connections

When a persistent connection is taken from the pool, the state is reset
with a COM_CHANGE_USER on the next write. This allows reuse of persistent
connections without having to worry about the state of the MySQL session.
This commit is contained in:
Markus Makela
2016-10-28 11:57:52 +03:00
parent e8e2933b56
commit 5085b41d20
5 changed files with 102 additions and 20 deletions

View File

@ -276,6 +276,7 @@ typedef struct dcb
bool ssl_write_want_read; /*< Flag */
bool ssl_write_want_write; /*< Flag */
int dcb_port; /**< port of target server */
bool was_persistent; /**< Whether this DCB was in the persistent pool */
skygw_chk_t dcb_chk_tail;
} DCB;