Skip to content

Commit

Permalink
Added query rule to route 'SELECT @rpl_semi_sync_slave=?' and 'SET @r…
Browse files Browse the repository at this point in the history
…pl_semi_sync_slave=1' queries to writer HG and disable multiplexing.
  • Loading branch information
rahim-kanji committed Jan 5, 2024
1 parent 6b76ceb commit f6d82f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/tap/tests/test_binlog_fast_forward-t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ int setup_replication(int server_id, bool frontend_ssl, bool backend_ssl, std::v
MYSQL * mysql = mysql_init(NULL);

std::vector<std::string> admin_queries = {};
admin_queries.push_back("INSERT INTO mysql_query_rules (rule_id,active,match_digest,destination_hostgroup,multiplex,apply) VALUES\
(-1,1,'^(SELECT @rpl_semi_sync_slave=\\?.*|SET @rpl_semi_sync_slave=\\?.*)$',0,0,1)");
admin_queries.push_back("LOAD MYSQL QUERY RULES TO RUNTIME");
admin_queries.push_back(std::string("SET mysql-have_ssl='") + std::string(frontend_ssl ? "true" : "false") + "'");
admin_queries.push_back("LOAD MYSQL VARIABLES TO RUNTIME");
admin_queries.push_back(std::string("UPDATE mysql_servers SET use_ssl=") + std::string(backend_ssl ? "1" : "0"));
Expand Down

0 comments on commit f6d82f4

Please sign in to comment.