Added configurable multistatement behavior

Whether all queries should be routed to the master after a multistatement
query is executed can now be controlled with the `strict_multi_stmt` option.

When the option is disabled queries executed after a multistatement query will
be routed normally.
This commit is contained in:
Markus Makela
2016-03-01 10:45:08 +02:00
parent ac007fa8f5
commit bf1a789376
4 changed files with 33 additions and 2 deletions

View File

@ -252,6 +252,8 @@ typedef struct rwsplit_config_st
int rw_max_sescmd_history_size;
bool rw_disable_sescmd_hist;
bool rw_master_reads; /*< Use master for reads */
bool rw_strict_multi_stmt; /*< Force non-multistatement queries to be routed
* to the master after a multistatement query. */
} rwsplit_config_t;
#if defined(PREP_STMT_CACHING)