diff options
Diffstat (limited to 'mysql-test/suite/galera/t')
8 files changed, 69 insertions, 50 deletions
diff --git a/mysql-test/suite/galera/t/galera_gcache_recover.cnf b/mysql-test/suite/galera/t/galera_gcache_recover.cnf index c7b59b6a27e..34c757de77e 100644 --- a/mysql-test/suite/galera/t/galera_gcache_recover.cnf +++ b/mysql-test/suite/galera/t/galera_gcache_recover.cnf @@ -4,4 +4,4 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true' [mysqld.2] -wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes;pc.ignore_sb=true' +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes' diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test index 42f210170bc..f56d0e657bd 100644 --- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test +++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test @@ -21,7 +21,8 @@ INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'),(6, 'a'); # Disconnect node #2 --connection node_2 ---source suite/galera/include/galera_unload_provider.inc +SET SESSION wsrep_sync_wait=0; +--source suite/galera/include/galera_stop_replication.inc --connection node_1 UPDATE t1 SET f2 = 'b' WHERE f1 > 1; @@ -43,7 +44,6 @@ UPDATE t1 SET f2 = 'c' WHERE f1 > 2; # ... and restart provider to force IST --echo Loading wsrep_provider ... --disable_query_log ---eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig'; # Make sure IST will block ... --let $galera_sync_point = recv_IST_after_apply_trx --source include/galera_set_sync_point.inc diff --git a/mysql-test/suite/galera/t/galera_log_bin.inc b/mysql-test/suite/galera/t/galera_log_bin.inc new file mode 100644 index 00000000000..cc78367b510 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_log_bin.inc @@ -0,0 +1,46 @@ +--source include/galera_cluster.inc +--source include/force_restart.inc + +--connection node_1 +set global wsrep_on=OFF; +reset master; +set global wsrep_on=ON; +--connection node_2 +set global wsrep_on=OFF; +reset master; +set global wsrep_on=ON; + +# +# Test Galera with --log-bin --log-slave-updates . +# This way the actual MySQL binary log is used, +# rather than Galera's own implementation +# + +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +CREATE TABLE t2 (id INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1); +INSERT INTO t2 VALUES (1); + +--connection node_2 +SELECT COUNT(*) = 1 FROM t1; +SELECT COUNT(*) = 2 FROM t2; + +--connection node_1 +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +--let $MASTER_MYPORT=$NODE_MYPORT_1 +--source include/show_binlog_events.inc + +--connection node_2 +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +--let $MASTER_MYPORT=$NODE_MYPORT_2 +--source include/show_binlog_events.inc + +DROP TABLE t1; +DROP TABLE t2; + +--echo #cleanup +--connection node_1 +SET GLOBAL wsrep_on=OFF; +RESET MASTER; diff --git a/mysql-test/suite/galera/t/galera_log_bin.test b/mysql-test/suite/galera/t/galera_log_bin.test index cc78367b510..923bd623a8a 100644 --- a/mysql-test/suite/galera/t/galera_log_bin.test +++ b/mysql-test/suite/galera/t/galera_log_bin.test @@ -1,46 +1 @@ ---source include/galera_cluster.inc ---source include/force_restart.inc - ---connection node_1 -set global wsrep_on=OFF; -reset master; -set global wsrep_on=ON; ---connection node_2 -set global wsrep_on=OFF; -reset master; -set global wsrep_on=ON; - -# -# Test Galera with --log-bin --log-slave-updates . -# This way the actual MySQL binary log is used, -# rather than Galera's own implementation -# - -CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); - -CREATE TABLE t2 (id INT) ENGINE=InnoDB; -INSERT INTO t2 VALUES (1); -INSERT INTO t2 VALUES (1); - ---connection node_2 -SELECT COUNT(*) = 1 FROM t1; -SELECT COUNT(*) = 2 FROM t2; - ---connection node_1 -ALTER TABLE t1 ADD COLUMN f2 INTEGER; ---let $MASTER_MYPORT=$NODE_MYPORT_1 ---source include/show_binlog_events.inc - ---connection node_2 -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ---let $MASTER_MYPORT=$NODE_MYPORT_2 ---source include/show_binlog_events.inc - -DROP TABLE t1; -DROP TABLE t2; - ---echo #cleanup ---connection node_1 -SET GLOBAL wsrep_on=OFF; -RESET MASTER; +--source galera_log_bin.inc diff --git a/mysql-test/suite/galera/t/galera_log_bin_opt-master.opt b/mysql-test/suite/galera/t/galera_log_bin_opt-master.opt new file mode 100644 index 00000000000..03fcb5d040d --- /dev/null +++ b/mysql-test/suite/galera/t/galera_log_bin_opt-master.opt @@ -0,0 +1 @@ +--log-slave-updates --log-bin diff --git a/mysql-test/suite/galera/t/galera_log_bin_opt.cnf b/mysql-test/suite/galera/t/galera_log_bin_opt.cnf new file mode 100644 index 00000000000..a09efd2e011 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_log_bin_opt.cnf @@ -0,0 +1,15 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=mariabackup +wsrep_sst_auth="root:" + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[sst] +transferfmt=@ENV.MTR_GALERA_TFMT +streamfmt=xbstream diff --git a/mysql-test/suite/galera/t/galera_log_bin_opt.test b/mysql-test/suite/galera/t/galera_log_bin_opt.test new file mode 100644 index 00000000000..f3d0afbc8bc --- /dev/null +++ b/mysql-test/suite/galera/t/galera_log_bin_opt.test @@ -0,0 +1,2 @@ +--source include/have_mariabackup.inc +--source galera_log_bin.inc diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_lost_found.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_lost_found.test index d1c30656139..e8dcbd849d8 100644 --- a/mysql-test/suite/galera/t/galera_sst_mariabackup_lost_found.test +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_lost_found.test @@ -10,7 +10,7 @@ --connection node_2 #--connection node_2 -#--source suite/galera/include/galera_unload_provider.inc +#--source suite/galera/include/galera_stop_replication.inc --echo Shutting down server ... --source include/shutdown_mysqld.inc |