MXS-497: Multi-statement queries are always routed to the master

This will prevent the routing of queries that modify data to the slaves.

In the future a more intricate solution can done where all the statements
are parsed and the destination is resolved based on the actual contents.
This commit is contained in:
Markus Makela
2016-02-18 00:17:46 +02:00
parent b88d66357e
commit ac007fa8f5
3 changed files with 38 additions and 20 deletions

View File

@ -298,6 +298,7 @@ struct router_client_session {
uint64_t rses_load_data_sent; /*< How much data has been sent */
DCB* client_dcb;
int pos_generator;
backend_ref_t *forced_node; /*< Current server where all queries should be sent */
#if defined(PREP_STMT_CACHING)
HASHTABLE* rses_prep_stmt[2];
#endif