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 4e69e9b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/tap/tests/test_binlog_fast_forward-t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ int main(int argc, char** argv) {
__FILE__, __LINE__, mysql_error(mysqladmin));
return exit_status();
}

const std::vector<std::string> query_rules = { "INSERT OR IGNORE 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)",
"LOAD MYSQL QUERY RULES TO RUNTIME" };

for (const auto& query : query_rules) {
diag("Running on Admin: %s", query.c_str());
MYSQL_QUERY(mysqladmin, query.c_str());
}

// we now test various combination
setup_replication(11, false, false, repl_queries_set1);
setup_replication(12, true, false, repl_queries_set1);
Expand Down

0 comments on commit 4e69e9b

Please sign in to comment.