Skip to content

Commit 639bd1c

Browse files
mkaruzajanlindstrom
authored andcommitted
galera#505 mtr test
MTR test for galera#505
1 parent 1d414d9 commit 639bd1c

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
2+
SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
3+
Variable_name Value
4+
wsrep_provider_options pc.weight = 3
5+
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
# Convert "... pc.weight = N; ..." to "N; ..."
8+
--let $s1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('pc.weight =', @@wsrep_provider_options) + LENGTH('pc.weight = '))`
9+
# Convert "N; ..." to "N"
10+
--let $pc_weight_value = `SELECT SUBSTR('$s1', 1, LOCATE(';', '$s1') - 1)`
11+
12+
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
13+
14+
-- replace_regex /.*(pc\.weight = [0-9]+);.*/\1/
15+
SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
16+
17+
--eval SET GLOBAL wsrep_provider_options = 'pc.weight=$pc_weight_value'

0 commit comments

Comments
 (0)