Debian Codegraph @

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

raw
1 # galera#505 - Change of pc.weight wsrep param will be correctly stored in wsrep_provider_options variable
2
3 --source include/galera_cluster.inc
4
5 --connection node_1
6
7 SET SESSION wsrep_sync_wait=0;
8 --let $galera_version=25.3.24
9 source ../../wsrep/include/check_galera_version.inc;
10
11 SET SESSION wsrep_sync_wait=DEFAULT;
12
13 # Convert "... pc.weight = N; ..." to "N; ..."
14 --let $s1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('pc.weight =', @@wsrep_provider_options) + LENGTH('pc.weight = '))`
15 # Convert "N; ..." to "N"
16 --let $pc_weight_value = `SELECT SUBSTR('$s1', 1, LOCATE(';', '$s1') - 1)`
17
18 SET GLOBAL wsrep_provider_options = 'pc.weight=3';
19
20 -- replace_regex /.*(pc\.weight = [0-9]+);.*/\1/
21 SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
22
23 --eval SET GLOBAL wsrep_provider_options = 'pc.weight=$pc_weight_value'