Debian Codegraph @

mysql-test/suite/galera/t/galera#500.test

raw
1 #
2 # The purpose of this test is to verify that if an exception is
3 # thrown from gcomm background thread, the provider terminates properly
4 # and wsrep_ready becomes 0.
5 #
6 # Not to be run with ASAN. Provider leaks memory when gcomm
7 # thread is aborted forcifully and ASAN crashes during leak report
8 # after provider is unloaded.
9 #
10
11 --source include/not_asan.inc
12 --source include/have_innodb.inc
13 --source include/galera_cluster.inc
14 --source include/galera_have_debug_sync.inc
15
16 # Save original auto_increment_offset values.
17 --let $node_1=node_1
18 --let $node_2=node_2
19 --source include/auto_increment_offset_save.inc
20
21 # Force node_2 gcomm background thread to terminate via exception.
22 --connection node_2
23 --let $wsrep_cluster_address = `SELECT @@wsrep_cluster_address`
24 # Setting gmcast.isolate=2 will force gcomm background thread to
25 # throw exception.
26 SET SESSION wsrep_sync_wait = 0;
27 SET GLOBAL wsrep_provider_options="gmcast.isolate=2";
28
29 # Wait until wsrep_ready becomes 0.
30 --let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME ='wsrep_ready'
31 --source include/wait_condition.inc
32
33 # Wait until node_1 ends up in non-prim and rebootstrap the cluster.
34 --connection node_1
35 SET SESSION wsrep_sync_wait = 0;
36 --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME ='wsrep_cluster_size'
37 --source include/wait_condition.inc
38 SHOW STATUS LIKE 'wsrep_cluster_status';
39 SET SESSION wsrep_sync_wait = default;
40 SET GLOBAL wsrep_provider_options="pc.bootstrap=1";
41
42 # Restart node_2
43 --connection node_2
44 SET SESSION wsrep_on=0;
45 --source include/restart_mysqld.inc
46
47 --connection node_2
48 CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast\\.isolate=2\\.");
49
50 --source include/auto_increment_offset_restore.inc