From bb8c6b373cafb750de2e4774a61df19a07427d07 Mon Sep 17 00:00:00 2001 From: Daniel Rupp Date: Wed, 5 Jan 2022 17:26:13 +0100 Subject: [PATCH] MariaDB handles online replication filters differently --- .../test_mysql_replication/tasks/issue-265.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/integration/targets/test_mysql_replication/tasks/issue-265.yml b/tests/integration/targets/test_mysql_replication/tasks/issue-265.yml index 8a1bd4e..24232f3 100644 --- a/tests/integration/targets/test_mysql_replication/tasks/issue-265.yml +++ b/tests/integration/targets/test_mysql_replication/tasks/issue-265.yml @@ -91,8 +91,13 @@ - result is changed - result.queries == ["STOP SLAVE"] or result.queries == ["STOP REPLICA"] - - name: Create replication filter + - name: Create replication filter MySQL shell: "echo \"CHANGE REPLICATION FILTER REPLICATE_IGNORE_DB = (mysql);\" | {{ mysql_command }} -P{{ mysql_replica1_port }}" + when: install_type == 'mysql' + + - name: Create replication filter MariaDB + shell: "echo \"SET GLOBAL replicate_ignore_db = 'mysql';\" | {{ mysql_command }} -P{{ mysql_replica1_port }}" + when: install_type == 'mariadb' - name: Start replica mysql_replication: @@ -151,5 +156,10 @@ - result is changed - result.queries == ["STOP SLAVE"] or result.queries == ["STOP REPLICA"] - - name: Create replication filter + - name: Remove replication filter MySQL shell: "echo \"CHANGE REPLICATION FILTER REPLICATE_IGNORE_DB = ();\" | {{ mysql_command }} -P{{ mysql_replica1_port }}" + when: install_type == 'mysql' + + - name: Remove replication filter MariaDB + shell: "echo \"SET GLOBAL replicate_ignore_db = '';\" | {{ mysql_command }} -P{{ mysql_replica1_port }}" + when: install_type == 'mariadb'