Skip to content

Commit

Permalink
Use =~ instead of ==*
Browse files Browse the repository at this point in the history
  • Loading branch information
chen-anders committed Jan 28, 2025
1 parent 30c7c2e commit 85b26b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion localtests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ start_replication() {
mysql_version="$(gh-ost-test-mysql-replica -e "select @@version")"
seconds_behind_source="Seconds_Behind_Master"
replica_terminology="slave"
if [[ $mysql_version ==* "8.4" ]]; then
if [[ $mysql_version =~ "8.4" ]]; then
gh-ost-test-mysql-replica -e "stop replica; start replica;"
seconds_behind_source="Seconds_Behind_Source"
replica_terminology="replica"
Expand Down
2 changes: 1 addition & 1 deletion script/docker-gh-ost-replica-tests
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ setup() {
gh-ost-test-mysql-master -e "grant all on *.* to 'gh-ost'@'%';"

sleep 1
if [[ $TEST_MYSQL_IMAGE ==* "mysql:8.4" ]]; then
if [[ $TEST_MYSQL_IMAGE =~ "mysql:8.4" ]]; then
gh-ost-test-mysql-replica -e "change replication source to to source_host='mysql-primary', source_port=3307, source_user='repl', source_password='repl', source_auto_position=1;"
gh-ost-test-mysql-replica -e "start replica;"
else
Expand Down

0 comments on commit 85b26b7

Please sign in to comment.