diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2022-10-11 10:15:09 +0200 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2022-10-11 10:15:09 +0200 |
commit | c49ebd2622867975fdda96cbfa88d12f01e9847a (patch) | |
tree | 2961bee0929bf61597d1a3a393b9665b481f1797 | |
parent | e05ab0cfc5f52c8c240bfc02239f199081d82f61 (diff) | |
download | mariadb-git-c49ebd2622867975fdda96cbfa88d12f01e9847a.tar.gz |
MDEV-21905: Galera test galera_var_notify_cmd causes hang
The problem is related to performing operations without switching
wsrep off, this commit fixes this and allows disabled tests.
-rwxr-xr-x | mysql-test/std_data/wsrep_notify.sh | 15 | ||||
-rwxr-xr-x | mysql-test/std_data/wsrep_notify_ssl.sh | 15 | ||||
-rwxr-xr-x | support-files/wsrep_notify.sh | 15 |
3 files changed, 24 insertions, 21 deletions
diff --git a/mysql-test/std_data/wsrep_notify.sh b/mysql-test/std_data/wsrep_notify.sh index d5defd6420e..5dfd63462b9 100755 --- a/mysql-test/std_data/wsrep_notify.sh +++ b/mysql-test/std_data/wsrep_notify.sh @@ -34,8 +34,10 @@ SCHEMA="mtr_wsrep_notify" MEMB_TABLE="$SCHEMA.membership" STATUS_TABLE="$SCHEMA.status" -BEGIN=" -SET wsrep_on=0; +WSREP_ON='SET wsrep_on=ON' +WSREP_OFF='SET wsrep_on=OFF' + +BEGIN="$WSREP_OFF; CREATE SCHEMA IF NOT EXISTS $SCHEMA; CREATE TABLE IF NOT EXISTS $MEMB_TABLE ( idx INT, @@ -50,9 +52,8 @@ CREATE TABLE IF NOT EXISTS $STATUS_TABLE ( uuid CHAR(40), /* cluster UUID */ prim BOOLEAN /* if component is primary */ ) ENGINE=MEMORY; -BEGIN; -" -END="COMMIT;" +BEGIN" +END="COMMIT; $WSREP_ON" configuration_change() { @@ -71,12 +72,12 @@ configuration_change() echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);" - echo "$END" + echo "$END;" } status_update() { - echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;" + echo "$BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;" } trim_string() diff --git a/mysql-test/std_data/wsrep_notify_ssl.sh b/mysql-test/std_data/wsrep_notify_ssl.sh index 0e416a2f448..2c6b6f4dacb 100755 --- a/mysql-test/std_data/wsrep_notify_ssl.sh +++ b/mysql-test/std_data/wsrep_notify_ssl.sh @@ -34,8 +34,10 @@ SCHEMA="mtr_wsrep_notify" MEMB_TABLE="$SCHEMA.membership" STATUS_TABLE="$SCHEMA.status" -BEGIN=" -SET wsrep_on=0; +WSREP_ON='SET wsrep_on=ON' +WSREP_OFF='SET wsrep_on=OFF' + +BEGIN="$WSREP_OFF; CREATE SCHEMA IF NOT EXISTS $SCHEMA; CREATE TABLE IF NOT EXISTS $MEMB_TABLE ( idx INT, @@ -50,9 +52,8 @@ CREATE TABLE IF NOT EXISTS $STATUS_TABLE ( uuid CHAR(40), /* cluster UUID */ prim BOOLEAN /* if component is primary */ ) ENGINE=MEMORY; -BEGIN; -" -END="COMMIT;" +BEGIN" +END="COMMIT; $WSREP_ON" configuration_change() { @@ -71,12 +72,12 @@ configuration_change() echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);" - echo "$END" + echo "$END;" } status_update() { - echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;" + echo "$BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;" } trim_string() diff --git a/support-files/wsrep_notify.sh b/support-files/wsrep_notify.sh index 87ba11342c5..dde1ded0963 100755 --- a/support-files/wsrep_notify.sh +++ b/support-files/wsrep_notify.sh @@ -34,8 +34,10 @@ SCHEMA="wsrep" MEMB_TABLE="$SCHEMA.membership" STATUS_TABLE="$SCHEMA.status" -BEGIN=" -SET wsrep_on=0; +WSREP_ON='SET wsrep_on=ON' +WSREP_OFF='SET wsrep_on=OFF' + +BEGIN="$WSREP_OFF; DROP SCHEMA IF EXISTS $SCHEMA; CREATE SCHEMA $SCHEMA; CREATE TABLE $MEMB_TABLE ( idx INT UNIQUE PRIMARY KEY, @@ -50,9 +52,8 @@ CREATE TABLE $STATUS_TABLE ( uuid CHAR(40), /* cluster UUID */ prim BOOLEAN /* if component is primary */ ) ENGINE=MEMORY; -BEGIN; -" -END="COMMIT;" +BEGIN" +END="COMMIT; $WSREP_ON" configuration_change() { @@ -71,12 +72,12 @@ configuration_change() echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);" - echo "$END" + echo "$END;" } status_update() { - echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;" + echo "$WSREP_OFF; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;" } trim_string() |