Skip to content

Commit eeb6842

Browse files
committed
MDEV-13549 Fix and re-enable MTR test galera.galera_gra_log
Test galera checks that a `GRA_x_x.log` file is created whenever wsrep applier fails to apply some replication event. The file contains the corresponding binlog event that failed to apply. The test creates a new file by concatenating a pre-recorded file containing the binlog header (see `std-data/binlog-header.log`) and the `GRA_x_x.log` file. The test then checks that the resulting file, containing the binlog header and the event that failed to apply, is correctly read by `mysqlbinlog` program. The test fails in MariaDB because the GRA_x_x.log file created by MariaDB already contains the binlog header (see MDEV-7867). This patch fixes/simplifies test `galera.galera_gra_log` so that it doesn't concatenate `std-data/binlog-header.log` with the `GRA_x_x.log` file. File `std-data/binlog-header.log` is deleted altoghether, because not used by any other test.
1 parent 7ffa82b commit eeb6842

File tree

4 files changed

+5
-22
lines changed

4 files changed

+5
-22
lines changed

mysql-test/std_data/binlog-header.log

-120 Bytes
Binary file not shown.

mysql-test/suite/galera/disabled.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# Do not use any TAB characters for whitespace.
1010
#
1111
##############################################################################
12-
galera_gra_log : MDEV-13549 Galera test failures
1312
galera_flush : MDEV-13549 Galera test failures
1413
galera_account_management : MariaDB 10.0 does not support ALTER USER
1514
galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image

mysql-test/suite/galera/r/galera_gra_log.result

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,13 @@ COUNT(*) = 0
88
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
99
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
1010
DELIMITER /*!*/;
11-
# at 4
12-
<ISO TIMESTAMP> server id 2 end_log_pos 120 Start: binlog v 4, server v 5.6.24-debug-log created 150804 11:37:14 at startup
13-
# Warning: this binlog is either in use or was not closed properly.
1411
ROLLBACK/*!*/;
15-
BINLOG '
16-
unnAVQ8CAAAAdAAAAHgAAAABAAQANS42LjI0LWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA
17-
AAAAAAAAAAAAAAAAAAC6ecBVEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAKNu
18-
Jfk=
19-
'/*!*/;
20-
# at 120
21-
<ISO TIMESTAMP> server id 1 end_log_pos 91 Query thread_id=<QUERY_THREAD_ID> exec_time=0 error_code=0
12+
ROLLBACK/*!*/;
2213
use `test`/*!*/;
2314
SET TIMESTAMP=<TIMESTAMP>/*!*/;
2415
SET @@session.pseudo_thread_id=<PSEUDO_THREAD_ID>/*!*/;
2516
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
26-
SET @@session.sql_mode=1073741824/*!*/;
17+
SET @@session.sql_mode=1342177280/*!*/;
2718
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
2819
/*!\C latin1 *//*!*/;
2920
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;

mysql-test/suite/galera/t/galera_gra_log.test

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,10 @@ CREATE TABLE t1 (f1 INTEGER);
1919
--connection node_2
2020
SELECT COUNT(*) = 0 FROM t1;
2121

22-
# Compose a valid binlog from a header file and the GRA file
22+
# Make sure the GRA file produced is readable and contains the failure
2323

24-
--let $gra_binlog_file = $MYSQLTEST_VARDIR/tmp/gra.log
25-
--exec rm -rf $gra_binlog_file
26-
27-
--exec cp std_data/binlog-header.log $gra_binlog_file
28-
--exec cat $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log >> $gra_binlog_file
29-
30-
# Make sure the binlog thus produced is readable and contains the failure
31-
--replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /#[0-9]+ +[0-9]+:[0-9]+:[0-9]+/<ISO TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/ /thread_id=[0-9]+/thread_id=<QUERY_THREAD_ID>/
32-
--exec $MYSQL_BINLOG $gra_binlog_file
24+
--replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/
25+
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
3326

3427
SET SESSION wsrep_on=ON;
3528

0 commit comments

Comments
 (0)