Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/galera/t/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 1 kB image not shown  

Quelle  galera_gra_log.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[80] ABAP[72] Masm[54]} [Methode: maximale Elemente, drei Dimensionen]

#
# Test that GRA_* files are generated on applier failure and are readable.
#

--source include/galera_cluster.inc
--source include/have_innodb.inc

# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc

--connection node_2
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
let $restore_wsrep_ignore_apply_errors = `SELECT @@GLOBAL.wsrep_ignore_apply_errors`;
SET GLOBAL wsrep_ignore_apply_errors=0;

# Create applier failure
SET SESSION wsrep_on=OFF;
CREATE TABLE t1 (f1 INTEGER);

--connection node_1
CREATE TABLE t1 (f1 INTEGER);

# node 2 should detect an error and leave the cluster
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

# Make sure the GRA file produced is readable and contains the failure

--replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log

# restart and reconnect node_2
--source include/kill_galera.inc
--source include/wait_until_disconnected.inc
--source include/start_mysqld.inc

--eval SET GLOBAL wsrep_ignore_apply_errors = $restore_wsrep_ignore_apply_errors
DROP TABLE t1;

CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on ");

# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc

[Dauer der Verarbeitung: 0.16 Sekunden, vorverarbeitet 2026-10-10]