List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:February 10 2012 3:40pm
Subject:bzr push into mysql-trunk-wl3584 branch (andrei.elkin:3618 to 3619) WL#3584
View as plain text  
 3619 Andrei Elkin	2012-02-10
      wl#3584 GTID
      
      A failover demo test is added.
     @ mysql-test/suite/rpl/r/rpl_gtid_failover.result
        a new result file is added.
     @ mysql-test/suite/rpl/t/rpl_gtid_failover.cnf
        a conf file for gtid failover test is added.
     @ mysql-test/suite/rpl/t/rpl_gtid_failover.test
        A failover demo test is added; currently checks two scenarios.

    added:
      mysql-test/suite/rpl/r/rpl_gtid_failover.result
      mysql-test/suite/rpl/t/rpl_gtid_failover.cnf
      mysql-test/suite/rpl/t/rpl_gtid_failover.test
 3618 Sven Sandberg	2012-02-10
      WL#3584 test fixes
      Make rpl_gtid_parallel more portable:
       - avoid long command line
       - don't redirect to /dev/null

    modified:
      mysql-test/suite/rpl/t/rpl_gtid_parallel.test
=== added file 'mysql-test/suite/rpl/r/rpl_gtid_failover.result'
--- a/mysql-test/suite/rpl/r/rpl_gtid_failover.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_gtid_failover.result	2012-02-10 15:39:29 +0000
@@ -0,0 +1,27 @@
+include/rpl_init.inc [topology=1->2->3]
+Warnings:
+Note	1756	Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note	1757	Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
+Warnings:
+Note	1756	Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note	1757	Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
+
+create table t1 (a int not null auto_increment, b int not null, primary key(a)) engine=innodb;
+include/rpl_sync.inc
+include/stop_slave.inc
+change master to master_port=SERVER_MYPORT_1;;
+include/start_slave.inc
+insert into t1 values (NULL, 1);
+include/diff_tables.inc [server_1:test.t1, server_2:test.t1, server_3:test.t1]
+include/stop_slave.inc
+insert into t1 values (NULL, 2);
+include/stop_slave.inc
+change master to master_port=SERVER_MYPORT_2;
+include/start_slave.inc
+include/diff_tables.inc [server_1:test.t1, server_2:test.t1, server_3:test.t1]
+change master to master_port=SERVER_MYPORT_1;
+include/start_slave.inc
+*** Clean up ***
+DROP TABLE t1;
+include/rpl_sync.inc
+include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/t/rpl_gtid_failover.cnf'
--- a/mysql-test/suite/rpl/t/rpl_gtid_failover.cnf	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_gtid_failover.cnf	2012-02-10 15:39:29 +0000
@@ -0,0 +1,24 @@
+!include ../my.cnf
+
+[mysqld.1]
+gtid-mode=on
+disable-gtid-unsafe-statements
+log-slave-updates
+innodb
+
+[mysqld.2]
+gtid-mode=on
+disable-gtid-unsafe-statements
+log-slave-updates
+innodb
+
+[mysqld.3]
+gtid-mode=on
+disable-gtid-unsafe-statements
+log-slave-updates
+innodb
+
+[ENV]
+SERVER_MYPORT_3=		@mysqld.3.port
+SERVER_MYSOCK_3=		@mysqld.3.socket
+

=== added file 'mysql-test/suite/rpl/t/rpl_gtid_failover.test'
--- a/mysql-test/suite/rpl/t/rpl_gtid_failover.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_gtid_failover.test	2012-02-10 15:39:29 +0000
@@ -0,0 +1,80 @@
+# WL#3584 GTID.
+#
+# Testing failover scenarios.
+
+--source include/have_innodb.inc
+--source include/have_binlog_format_mixed.inc
+#
+# Set up 3 server replication chain: M1 -> S2 -> S3.
+# Remove S2 and show M1 -> S3 works.
+#
+
+--let $rpl_topology= 1->2->3
+--source include/rpl_init.inc
+--echo
+
+--connection server_1
+create table t1 (a int not null auto_increment, b int not null, primary key(a)) engine=innodb;
+--source include/rpl_sync.inc
+
+--connection server_3
+--source include/stop_slave.inc
+
+#--let $rpl_topology= 1->2, 1->3
+#--source include/rpl_change_topology.inc
+--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
+--eval change master to master_port=$SERVER_MYPORT_1;
+--source include/start_slave.inc
+
+--connection server_1
+insert into t1 values (NULL, 1);
+--sync_slave_with_master server_2
+
+--connection server_1
+--sync_slave_with_master server_3
+
+--let $diff_tables= server_1:test.t1, server_2:test.t1, server_3:test.t1
+--source include/diff_tables.inc
+
+#
+# remove master, and set up S2 -> S3 link
+# S3 proves to fail over S2 the new master.
+# --let $rpl_topology= 2->3
+#
+--connection server_3
+--source include/stop_slave.inc
+
+--connection server_1
+insert into t1 values (NULL, 2); # won't be seen by S3 until it connects to S2
+
+--sync_slave_with_master server_2
+--source include/stop_slave.inc
+
+--connection server_3
+--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
+--eval change master to master_port=$SERVER_MYPORT_2
+--source include/start_slave.inc
+
+--connection server_2
+--sync_slave_with_master server_3
+
+--let $diff_tables= server_1:test.t1, server_2:test.t1, server_3:test.t1
+--source include/diff_tables.inc
+
+# Restore M1 -> S2 -> S3
+
+--connection server_2
+--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
+--eval change master to master_port=$SERVER_MYPORT_1
+--source include/start_slave.inc
+
+#
+# Clean up
+#
+--echo *** Clean up ***
+
+--connection server_1
+DROP TABLE t1;
+
+--source include/rpl_sync.inc
+--source include/rpl_end.inc

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl3584 branch (andrei.elkin:3618 to 3619) WL#3584Andrei Elkin13 Feb