mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
Binary file not shown.
@ -9,7 +9,6 @@
|
|||||||
# Do not use any TAB characters for whitespace.
|
# Do not use any TAB characters for whitespace.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
galera_gra_log : MDEV-13549 Galera test failures
|
|
||||||
galera_flush : MDEV-13549 Galera test failures
|
galera_flush : MDEV-13549 Galera test failures
|
||||||
galera_account_management : MariaDB 10.0 does not support ALTER USER
|
galera_account_management : MariaDB 10.0 does not support ALTER USER
|
||||||
galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image
|
galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image
|
||||||
|
@ -8,22 +8,13 @@ COUNT(*) = 0
|
|||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||||
DELIMITER /*!*/;
|
DELIMITER /*!*/;
|
||||||
# at 4
|
|
||||||
<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
|
|
||||||
# Warning: this binlog is either in use or was not closed properly.
|
|
||||||
ROLLBACK/*!*/;
|
ROLLBACK/*!*/;
|
||||||
BINLOG '
|
ROLLBACK/*!*/;
|
||||||
unnAVQ8CAAAAdAAAAHgAAAABAAQANS42LjI0LWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAC6ecBVEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAKNu
|
|
||||||
Jfk=
|
|
||||||
'/*!*/;
|
|
||||||
# at 120
|
|
||||||
<ISO TIMESTAMP> server id 1 end_log_pos 91 Query thread_id=<QUERY_THREAD_ID> exec_time=0 error_code=0
|
|
||||||
use `test`/*!*/;
|
use `test`/*!*/;
|
||||||
SET TIMESTAMP=<TIMESTAMP>/*!*/;
|
SET TIMESTAMP=<TIMESTAMP>/*!*/;
|
||||||
SET @@session.pseudo_thread_id=<PSEUDO_THREAD_ID>/*!*/;
|
SET @@session.pseudo_thread_id=<PSEUDO_THREAD_ID>/*!*/;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||||
SET @@session.sql_mode=1073741824/*!*/;
|
SET @@session.sql_mode=1342177280/*!*/;
|
||||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||||
/*!\C latin1 *//*!*/;
|
/*!\C latin1 *//*!*/;
|
||||||
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
|
||||||
|
@ -19,17 +19,10 @@ CREATE TABLE t1 (f1 INTEGER);
|
|||||||
--connection node_2
|
--connection node_2
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
|
|
||||||
# Compose a valid binlog from a header file and the GRA file
|
# Make sure the GRA file produced is readable and contains the failure
|
||||||
|
|
||||||
--let $gra_binlog_file = $MYSQLTEST_VARDIR/tmp/gra.log
|
--replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/
|
||||||
--exec rm -rf $gra_binlog_file
|
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
|
||||||
|
|
||||||
--exec cp std_data/binlog-header.log $gra_binlog_file
|
|
||||||
--exec cat $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log >> $gra_binlog_file
|
|
||||||
|
|
||||||
# Make sure the binlog thus produced is readable and contains the failure
|
|
||||||
--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>/
|
|
||||||
--exec $MYSQL_BINLOG $gra_binlog_file
|
|
||||||
|
|
||||||
SET SESSION wsrep_on=ON;
|
SET SESSION wsrep_on=ON;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user