From 6ed3f0eee47bbdfd4b97a3d01a66e98a4b50dff8 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Tue, 25 Aug 2015 16:35:25 +0300 Subject: [PATCH] Updated documentation. --- Documentation/About/Limitations.md | 6 +++--- Documentation/Routers/ReadWriteSplit.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/About/Limitations.md b/Documentation/About/Limitations.md index 4183bcb61..4677640a9 100644 --- a/Documentation/About/Limitations.md +++ b/Documentation/About/Limitations.md @@ -75,12 +75,12 @@ There is a possibility for misbehavior; if `USE mytable` was executed in one of The above-mentioned behavior can be partially controller with the `use_sql_variables_in` configuration parameter. ``` -use_sql_variables_in=[master|all] (master) +use_sql_variables_in=[master|all] (default: all) ``` -Server-side session variables are called as SQL variables. If "master" or no value is set, SQL variables are read and written in master only. Autocommit values and prepared statements are routed to all nodes always. +Server-side session variables are called as SQL variables. If "master" is set, SQL variables are read and written in master only. Autocommit values and prepared statements are routed to all nodes always. -**NOTE**: If variable is written as a part of write query, it is treated like write query and not routed to all servers. For example, `INSERT INTO test.t1 VALUES (@myvar:= 7)` will be routed to the master and an error in the error log will be written. +**NOTE**: If variable is written as a part of write query, it is treated like write query and not routed to all servers. For example, `INSERT INTO test.t1 VALUES (@myvar:= 7)` will not be routed and an error in the error log will be written. Add the `use_sql_variables_in=master` to the service definition to allow these queries. #### Examples of session command limitations diff --git a/Documentation/Routers/ReadWriteSplit.md b/Documentation/Routers/ReadWriteSplit.md index 7fb6d5cf0..f75a5873b 100644 --- a/Documentation/Routers/ReadWriteSplit.md +++ b/Documentation/Routers/ReadWriteSplit.md @@ -65,7 +65,7 @@ where ** is one of the following: **`use_sql_variables_in`** specifies where should queries, which read session variable, be routed. The syntax for `use_sql_variable_in` is: - use_sql_variables_in=[master|all] + use_sql_variables_in=[master|all] (default: all) When value all is used, queries reading session variables can be routed to any available slave (depending on selection criteria). Note, that queries modifying session variables are routed to all backend servers by default, excluding write queries with embedded session variable modifications, such as: