Skip to content

Commit

Permalink
MDEV-28204: The tr utility does not work as expected on rsync SST
Browse files Browse the repository at this point in the history
This commit contains a fix to use modern syntax for selecting
character classes in the tr utility options.

Also one of the tests for SST via rsync (galera_sst_rysnc2) is made
more reliable (to avoid rare failures during automatic testing).
  • Loading branch information
sysprg committed Apr 4, 2022
1 parent 0ffaf19 commit daed558
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/t/galera_sst_rsync2.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ wsrep_sst_method=rsync

[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
log_bin=@ENV.MYSQLTEST_VARDIR/server1_binlog
log_bin=@ENV.MYSQLTEST_VARDIR/mysqld.1/server1_binlog
log_bin_index=@ENV.MYSQLTEST_VARDIR/tmp/server1_binlog_index.index

[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
log_bin=@ENV.MYSQLTEST_VARDIR/server2_binlog
log_bin=@ENV.MYSQLTEST_VARDIR/mysqld.2/server2_binlog
log_bin_index=@ENV.MYSQLTEST_VARDIR/tmp/server2_binlog_index.index
2 changes: 2 additions & 0 deletions mysql-test/suite/galera/t/galera_sst_rsync2.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_clean_slave.inc

--let $wsrep_recover_additional=--log-bin=$MYSQLTEST_VARDIR/mysqld.2/server2_binlog --log-bin-index=$MYSQLTEST_VARDIR/tmp/server2_binlog_index.index

--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
--source include/auto_increment_offset_restore.inc
2 changes: 1 addition & 1 deletion scripts/wsrep_sst_mariabackup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ read_cnf()

encrypt=$(parse_cnf "$encgroups" 'encrypt' 0)
tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | \
tr [:lower:] [:upper:])
tr '[[:lower:]]' '[[:upper:]]')

case "$tmode" in
'VERIFY_IDENTITY'|'VERIFY_CA'|'REQUIRED'|'DISABLED')
Expand Down
2 changes: 1 addition & 1 deletion scripts/wsrep_sst_rsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ SSTCERT="$tpem"
SSTCA="$tcert"
SSTCAP="$tcap"

SSLMODE=$(parse_cnf "$encgroups" 'ssl-mode' | tr [:lower:] [:upper:])
SSLMODE=$(parse_cnf "$encgroups" 'ssl-mode' | tr '[[:lower:]]' '[[:upper:]]')

if [ -z "$SSLMODE" ]; then
# Implicit verification if CA is set and the SSL mode
Expand Down

0 comments on commit daed558

Please sign in to comment.