Complementary fix to #507, http://bugs.skysql.com/show_bug.cgi?id=507.
Missing braces in get_route_target made the previous fix ineffective.
This commit is contained in:
@ -1403,13 +1403,13 @@ static route_target_t get_route_target (
|
|||||||
{
|
{
|
||||||
/** First set expected targets before evaluating hints */
|
/** First set expected targets before evaluating hints */
|
||||||
if (!QUERY_IS_TYPE(qtype, QUERY_TYPE_MASTER_READ) &&
|
if (!QUERY_IS_TYPE(qtype, QUERY_TYPE_MASTER_READ) &&
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) ||
|
(QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SHOW_TABLES) || /*< 'SHOW TABLES' */
|
QUERY_IS_TYPE(qtype, QUERY_TYPE_SHOW_TABLES) || /*< 'SHOW TABLES' */
|
||||||
/** Configured to allow reading variables from slaves */
|
/** Configured to allow reading variables from slaves */
|
||||||
(use_sql_variables_in == TYPE_ALL &&
|
(use_sql_variables_in == TYPE_ALL &&
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) ||
|
(QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ))))
|
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ)))))
|
||||||
{
|
{
|
||||||
target = TARGET_SLAVE;
|
target = TARGET_SLAVE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user