You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// now it is time to check mysql_query_rules_fast_routing
1635
-
// it is only check if "apply" is not true
1636
-
constchar * u = sess->client_myds->myconn->userinfo->username;
1637
-
constchar * s = sess->client_myds->myconn->userinfo->schemaname;
1638
-
1639
-
int dst_hg = -1;
1640
-
1641
-
if (_thr_SQP_rules_fast_routing != nullptr) {
1642
-
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 7, "Searching thread-local 'rules_fast_routing' hashmap with: user='%s', schema='%s', and flagIN='%d'\n", u, s, flagIN);
1643
-
dst_hg = search_rules_fast_routing_dest_hg(&_thr_SQP_rules_fast_routing, u, s, flagIN, false);
1644
-
} elseif (rules_fast_routing != nullptr) {
1645
-
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 7, "Searching global 'rules_fast_routing' hashmap with: user='%s', schema='%s', and flagIN='%d'\n", u, s, flagIN);
1646
-
// NOTE: A pointer to the member 'this->rules_fast_routing' is required, since the value of the
1647
-
// member could have changed before the function acquires the internal lock. See function doc.
1648
-
dst_hg = search_rules_fast_routing_dest_hg(&this->rules_fast_routing, u, s, flagIN, true);
1649
-
}
1634
+
// Skip fast routing for mirror sessions - they already have their destination
1635
+
if (sess->mirror == false) {
1636
+
// now it is time to check mysql_query_rules_fast_routing
1637
+
// it is only check if "apply" is not true
1638
+
constchar * u = sess->client_myds->myconn->userinfo->username;
1639
+
constchar * s = sess->client_myds->myconn->userinfo->schemaname;
1640
+
1641
+
int dst_hg = -1;
1642
+
1643
+
if (_thr_SQP_rules_fast_routing != nullptr) {
1644
+
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 7, "Searching thread-local 'rules_fast_routing' hashmap with: user='%s', schema='%s', and flagIN='%d'\n", u, s, flagIN);
1645
+
dst_hg = search_rules_fast_routing_dest_hg(&_thr_SQP_rules_fast_routing, u, s, flagIN, false);
1646
+
} elseif (rules_fast_routing != nullptr) {
1647
+
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 7, "Searching global 'rules_fast_routing' hashmap with: user='%s', schema='%s', and flagIN='%d'\n", u, s, flagIN);
1648
+
// NOTE: A pointer to the member 'this->rules_fast_routing' is required, since the value of the
1649
+
// member could have changed before the function acquires the internal lock. See function doc.
1650
+
dst_hg = search_rules_fast_routing_dest_hg(&this->rules_fast_routing, u, s, flagIN, true);
0 commit comments