diff options
author | Andrei Elkin <andrei.elkin@mariadb.com> | 2020-03-15 14:14:35 +0200 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@mariadb.com> | 2020-03-15 14:14:35 +0200 |
commit | 345e21d2ebbec49242e8b0c20c42cd86731edcef (patch) | |
tree | cf9251c21a8724b81e774509020a2309c1903745 | |
parent | 8e5ae4e4df635fb4bf0655a8172a225eb2612414 (diff) | |
download | mariadb-git-345e21d2ebbec49242e8b0c20c42cd86731edcef.tar.gz |
MDEV-742 test correction.
Fixed XA-ROLLBACK not to write into binlog when XA-prepare run
in sql_log_bin-OFF environment. (Two tests affected).
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_xa.result | 14 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result | 14 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_xa.inc | 21 |
3 files changed, 22 insertions, 27 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_xa.result b/mysql-test/suite/rpl/r/rpl_xa.result index f418d3ec7db..a90e6e0b996 100644 --- a/mysql-test/suite/rpl/r/rpl_xa.result +++ b/mysql-test/suite/rpl/r/rpl_xa.result @@ -201,23 +201,21 @@ connection master; xa recover; formatID gtrid_length bqual_length data 1 11 0 skip_binlog -connection master; -call mtr.add_suppression("Slave: XAER_NOTA: Unknown XID"); +set @@session.sql_log_bin = OFF; xa rollback 'skip_binlog'; +set @@session.sql_log_bin = ON; +include/save_master_gtid.inc *** Zero must be in the list: connection master; xa recover; formatID gtrid_length bqual_length data -*** At the end of --binlog-ignore-db section gtid list has 2 more: +*** At the end of skip_log_binb section gtid list has 0 more: flush logs; show binlog events in 'master-bin.000007' limit 1,1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000007 # Gtid_list 1 # [0-1-27] -include/save_master_gtid.inc +master-bin.000007 # Gtid_list 1 # [0-1-25] connection slave; -include/wait_for_slave_sql_error.inc [errno=1397] -set @@global.sql_slave_skip_counter= 1; -include/start_slave.inc +include/sync_with_master_gtid.inc connection master; drop database test_ign; drop table t1, t2, t3, tm; diff --git a/mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result b/mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result index 642bbad14c0..ffd0426ab0d 100644 --- a/mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result +++ b/mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result @@ -210,23 +210,21 @@ connection master; xa recover; formatID gtrid_length bqual_length data 1 11 0 skip_binlog -connection master; -call mtr.add_suppression("Slave: XAER_NOTA: Unknown XID"); +set @@session.sql_log_bin = OFF; xa rollback 'skip_binlog'; +set @@session.sql_log_bin = ON; +include/save_master_gtid.inc *** Zero must be in the list: connection master; xa recover; formatID gtrid_length bqual_length data -*** At the end of --binlog-ignore-db section gtid list has 2 more: +*** At the end of skip_log_binb section gtid list has 0 more: flush logs; show binlog events in 'master-bin.000007' limit 1,1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000007 # Gtid_list 1 # [0-1-27] -include/save_master_gtid.inc +master-bin.000007 # Gtid_list 1 # [0-1-25] connection slave; -include/wait_for_slave_sql_error.inc [errno=1397] -set @@global.sql_slave_skip_counter= 1; -include/start_slave.inc +include/sync_with_master_gtid.inc connection master; drop database test_ign; drop table t1, t2, t3, tm; diff --git a/mysql-test/suite/rpl/t/rpl_xa.inc b/mysql-test/suite/rpl/t/rpl_xa.inc index 9586c012ec4..38344da5e66 100644 --- a/mysql-test/suite/rpl/t/rpl_xa.inc +++ b/mysql-test/suite/rpl/t/rpl_xa.inc @@ -308,8 +308,8 @@ flush logs; --source include/show_gtid_list.inc -# B. Session binlog disable does not log even empty XA-prepare but XA-complete will be -# logged despite of that. +# B. Session binlog disable does not log even empty XA-prepare +# Therefore XA-complete should be also run in sql_log_bin-OFF environment. --let $db=test --let $xid=skip_binlog @@ -328,28 +328,27 @@ set @@session.sql_log_bin = OFF; --connection master xa recover; ---connection master -call mtr.add_suppression("Slave: XAER_NOTA: Unknown XID"); +# now commit it carefully to avoid binlogging as the prepare part did +set @@session.sql_log_bin = OFF; --eval xa rollback '$xid' +set @@session.sql_log_bin = ON; +--source include/save_master_gtid.inc --echo *** Zero must be in the list: --connection master xa recover; ---echo *** At the end of --binlog-ignore-db section gtid list has 2 more: +--echo *** At the end of skip_log_binb section gtid list has 0 more: flush logs; --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) --source include/show_gtid_list.inc ---source include/save_master_gtid.inc # -# Expected error on slave and manual correction +# sync slave successfully to prove its consistency # --connection slave -let $slave_sql_errno= 1397; # ER_XAER_NOTA -source include/wait_for_slave_sql_error.inc; -set @@global.sql_slave_skip_counter= 1; ---source include/start_slave.inc +source include/sync_with_master_gtid.inc; + connection master; --eval drop database test_ign |