← Back to team overview

maria-developers team mailing list archive

rpl test with gtid as default

 

what do you think ?

/Jonas
commit bd313508d004f0342a174e3b9c85db922bad3dac
Author: Jonas Oreland <jonaso@xxxxxxxxxx>
Date:   Fri Mar 6 14:26:18 2015 +0100

    run rpl tests with gtid by default
    
    this patch modifies rpl_init so that gtids are enabled by default
    unless --let $rpl_init_no_gtid=1 is set before include rpl_init.inc
    note: include/master-slave.inc uses rpl_init under the hood.
    
    some tests started failing with gtids. for these i set rpl_init_no_gtid
    and did not analyzed why they failed.

diff --git a/mysql-test/include/rpl_change_topology.inc b/mysql-test/include/rpl_change_topology.inc
index 7992629..59499be 100644
--- a/mysql-test/include/rpl_change_topology.inc
+++ b/mysql-test/include/rpl_change_topology.inc
@@ -225,8 +225,16 @@ if (!$rpl_skip_change_master)
       {
         --let $_rpl_master_log_pos=
       }
-      eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1;
+      if (!$rpl_topology_use_gtid)
+      {
+        eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1;
+      }
+      if ($rpl_topology_use_gtid)
+      {
+        eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_USE_GTID=CURRENT_POS, MASTER_CONNECT_RETRY = 1;
+      }
     }
+
     if ($_rpl_master == '')
     {
         # This un-configures the server so that it's not a slave.
diff --git a/mysql-test/include/rpl_init.inc b/mysql-test/include/rpl_init.inc
index 4ee4ccc..4ad508d 100644
--- a/mysql-test/include/rpl_init.inc
+++ b/mysql-test/include/rpl_init.inc
@@ -201,8 +201,12 @@ if ($rpl_check_server_ids)
 # $rpl_master_list must be set so that include/rpl_change_topology.inc
 # knows which servers are initialized and not.
 --let $rpl_master_list= `SELECT REPEAT('x', $rpl_server_count * LENGTH($rpl_server_count))`
---source include/rpl_change_topology.inc
 
+if (!$rpl_init_no_gtid)
+{
+    --let $rpl_topology_use_gtid=1
+}
+--source include/rpl_change_topology.inc
 
 if (!$rpl_skip_start_slave)
 {
diff --git a/mysql-test/suite/rpl/t/create_or_replace_mix.test b/mysql-test/suite/rpl/t/create_or_replace_mix.test
index 0cabef1..c4e1679 100644
--- a/mysql-test/suite/rpl/t/create_or_replace_mix.test
+++ b/mysql-test/suite/rpl/t/create_or_replace_mix.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # Testing create or replace table in mixed mode.
 
 --source include/have_binlog_format_mixed.inc
diff --git a/mysql-test/suite/rpl/t/create_or_replace_row.test b/mysql-test/suite/rpl/t/create_or_replace_row.test
index 88dd8fd..2fdf30f 100644
--- a/mysql-test/suite/rpl/t/create_or_replace_row.test
+++ b/mysql-test/suite/rpl/t/create_or_replace_row.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # Testing create or replace table in mixed mode.
 
 --source include/have_binlog_format_row.inc
diff --git a/mysql-test/suite/rpl/t/create_or_replace_statement.test b/mysql-test/suite/rpl/t/create_or_replace_statement.test
index 2709e41..91fca43 100644
--- a/mysql-test/suite/rpl/t/create_or_replace_statement.test
+++ b/mysql-test/suite/rpl/t/create_or_replace_statement.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # Testing create or replace table in mixed mode.
 
 --source include/have_binlog_format_statement.inc
diff --git a/mysql-test/suite/rpl/t/rpl_000010.test b/mysql-test/suite/rpl/t/rpl_000010.test
index de6337d..ace76e6 100644
--- a/mysql-test/suite/rpl/t/rpl_000010.test
+++ b/mysql-test/suite/rpl/t/rpl_000010.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # This tests the offset off by 22 mystery bug
 # Must run slave with --disconnect-slave-event-count=1 --master-connect-retry=1
 
diff --git a/mysql-test/suite/rpl/t/rpl_checksum.test b/mysql-test/suite/rpl/t/rpl_checksum.test
index ff7d280..04f0da0 100644
--- a/mysql-test/suite/rpl/t/rpl_checksum.test
+++ b/mysql-test/suite/rpl/t/rpl_checksum.test
@@ -1,6 +1,7 @@
 # WL2540 replication events checksum
 # Testing configuration parameters
 
+--let $rpl_init_no_gtid=1
 --source include/master-slave.inc
 --source include/have_debug.inc
 --source include/have_binlog_format_mixed.inc
diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
index aea43a1..618fe0f 100644
--- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
+++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # ==== Purpose ====
 #
 # Setup: circular replication on four hosts, i.e., topology
diff --git a/mysql-test/suite/rpl/t/rpl_corruption.test b/mysql-test/suite/rpl/t/rpl_corruption.test
index da87b13..c580c7f 100644
--- a/mysql-test/suite/rpl/t/rpl_corruption.test
+++ b/mysql-test/suite/rpl/t/rpl_corruption.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 ############################################################
 # Purpose: WL#5064 Testing with corrupted events.
 # The test emulates the corruption at the vary stages
diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test
index d77632d..202c29a 100644
--- a/mysql-test/suite/rpl/t/rpl_drop_temp.test
+++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test
@@ -3,6 +3,7 @@
 # Change Date: 2006-02-07
 # Change: Added ENGINE=MyISAM
 ##############################################
+--let $rpl_init_no_gtid=1
 source include/have_binlog_format_mixed_or_statement.inc;
 source include/master-slave.inc;
 
diff --git a/mysql-test/suite/rpl/t/rpl_filter_tables_dynamic.test b/mysql-test/suite/rpl/t/rpl_filter_tables_dynamic.test
index 97ecc16..512ff9c 100644
--- a/mysql-test/suite/rpl/t/rpl_filter_tables_dynamic.test
+++ b/mysql-test/suite/rpl/t/rpl_filter_tables_dynamic.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # Test evaluation of replication table filter rules
 #
 # ==== Purpose ====
diff --git a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
index 4c54a05..f3edf1d 100644
--- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
+++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # Test evaluation of replication table filter rules
 #
 # ==== Purpose ====
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test
index 31492b7..985a34b 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/have_innodb.inc
 --source include/have_debug.inc
 --source include/master-slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
index b57714a..664041a 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --let $rpl_topology=1->2
 --source include/rpl_init.inc
 --source include/have_innodb.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_until.test b/mysql-test/suite/rpl/t/rpl_gtid_until.test
index 4dde7da..bf58b1f 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_until.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_until.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/have_innodb.inc
 --let $rpl_topology=1->2
 --source include/rpl_init.inc
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
index 7cdf67d..7c2b111 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # Testing master to slave heartbeat protocol, test cases that need debug build.
 
 --source include/master-slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_incident.test b/mysql-test/suite/rpl/t/rpl_incident.test
index c591a82..3bf1f2b 100644
--- a/mysql-test/suite/rpl/t/rpl_incident.test
+++ b/mysql-test/suite/rpl/t/rpl_incident.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/master-slave.inc
 --source include/have_debug.inc
 
diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
index 4e87d6d..6b03ea6 100644
--- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 source include/have_binlog_format_statement.inc;
 source include/have_debug.inc;
 source include/master-slave.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
index 981cecb..0a9bc90 100644
--- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
+++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 source include/master-slave.inc;
 
 #
diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test
index 0e6608f..cc3125c 100644
--- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test
+++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/master-slave.inc
 --source include/have_debug.inc
 --source include/have_debug_sync.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test
index 3850a84..ca4eeb7 100644
--- a/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test
+++ b/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/have_innodb.inc
 --source include/master-slave.inc
 --source include/not_embedded.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel2.test b/mysql-test/suite/rpl/t/rpl_parallel2.test
index 51c9e39..c0cc16d 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel2.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel2.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/have_binlog_format_statement.inc
 --let $rpl_topology=1->2
 --source include/rpl_init.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test
index 9c84896..d74be25 100644
--- a/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test
+++ b/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/have_innodb.inc
 --source include/master-slave.inc
 --source include/not_embedded.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_corruption.test b/mysql-test/suite/rpl/t/rpl_row_corruption.test
index e05273a..1b23583 100644
--- a/mysql-test/suite/rpl/t/rpl_row_corruption.test
+++ b/mysql-test/suite/rpl/t/rpl_row_corruption.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 #
 --source include/master-slave.inc
 --source include/have_debug.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test b/mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test
index af4efed..34c03d0 100644
--- a/mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test
+++ b/mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 -- source include/have_log_bin.inc
 -- source include/have_binlog_format_row.inc
 
diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test
index 030ec7d..097c137 100644
--- a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test
+++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 
 -- source include/have_binlog_format_row.inc
 -- source include/master-slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test
index 35eddfc..939689a 100644
--- a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test
+++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 
 -- source include/have_binlog_format_row.inc
 -- source include/have_innodb.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
index b8f3c81..6a96ce4 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 source include/have_semisync.inc;
 source include/not_embedded.inc;
 source include/have_innodb.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_server_id2.test b/mysql-test/suite/rpl/t/rpl_server_id2.test
index 6a8493c..73e033c 100644
--- a/mysql-test/suite/rpl/t/rpl_server_id2.test
+++ b/mysql-test/suite/rpl/t/rpl_server_id2.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # This test checks that a slave DOES execute queries originating
 # from itself, if running with --replicate-same-server-id.
 
diff --git a/mysql-test/suite/rpl/t/rpl_skip_replication.test b/mysql-test/suite/rpl/t/rpl_skip_replication.test
index f815554..cbbd83d 100644
--- a/mysql-test/suite/rpl/t/rpl_skip_replication.test
+++ b/mysql-test/suite/rpl/t/rpl_skip_replication.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/master-slave.inc
 --source include/have_innodb.inc
 
diff --git a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test
index 426c3c8..f755b42 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 #############################################################
 # Author: Serge Kozlov <skozlov@xxxxxxxxx>
 # Date:   03/21/2008
diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test
index f2129bd..8b89176 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_skip.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 # Every statement in this test is either executing under ROW or
 # STATEMENT format, which requires the slave thread to be able to apply
 # both statement and row events. Hence, we only need to execute this
diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test
index faf037a..d0ab776 100644
--- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test
+++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 #
 # BUG#23300: Slow query log on slave does not log slow replicated statements
 #
diff --git a/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test
index 3522133..334cd95 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/have_innodb.inc
 --source include/master-slave.inc
 --source include/not_embedded.inc
diff --git a/mysql-test/suite/rpl/t/rpl_stm_loaddata_concurrent.test b/mysql-test/suite/rpl/t/rpl_stm_loaddata_concurrent.test
index 32de2a9..49aff20 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_loaddata_concurrent.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_loaddata_concurrent.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 -- source include/have_log_bin.inc
 -- source include/have_binlog_format_statement.inc
 RESET MASTER;
diff --git a/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test b/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test
index 31880d1..0686e9f 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 ###################################################################################
 # Please, check extra/rpl_tests/rpl_stop_middle_group.test.
 ###################################################################################
diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stop_slave.test
index 340738f..67d0a42 100644
--- a/mysql-test/suite/rpl/t/rpl_stop_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 source include/have_innodb.inc;
 source include/have_debug.inc;
 source include/have_debug_sync.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_typeconv.test b/mysql-test/suite/rpl/t/rpl_typeconv.test
index 59d75dd..72aeb5f 100644
--- a/mysql-test/suite/rpl/t/rpl_typeconv.test
+++ b/mysql-test/suite/rpl/t/rpl_typeconv.test
@@ -1,3 +1,4 @@
+--let $rpl_init_no_gtid=1
 --source include/have_binlog_format_row.inc
 --source include/master-slave.inc
 

Follow ups