Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.2.0
-
None
Description
Setting the use_sql_variables_in=master parameter in the readwritesplit should make it so that all read queries which access a variable should be routed to the master. The queries are not routed to the master but are routed to a slave.
Steps to reproduce:
add use_sql_variables_in=master to a service which uses readwritesplit and execute the following queries.
set @myvar = @@hostname;
|
select @myvar; -- This should not return NULL
|
The following does work which shows that the select part of the query is the cause.
set @myvar = @@hostname;
|
begin;
|
select @myvar; -- @@hostname is returned
|