summaryrefslogtreecommitdiff
path: root/mysql-test/std_data
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-10-12 11:29:32 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-10-12 11:29:32 +0300
commit977c385df36dcb751720dc838521b7cb5a328cb9 (patch)
tree039c8cf3e0f41bc0a1ab81eef17a4700111fbe59 /mysql-test/std_data
parentfa0cada95baeb9fad5a2d6dad687bb13c93da9b6 (diff)
parent2aab7f2d0a6555f7ebb6dcde243639354ca5da53 (diff)
downloadmariadb-git-977c385df36dcb751720dc838521b7cb5a328cb9.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/std_data')
-rwxr-xr-xmysql-test/std_data/wsrep_notify.sh19
-rwxr-xr-xmysql-test/std_data/wsrep_notify_ssl.sh29
2 files changed, 27 insertions, 21 deletions
diff --git a/mysql-test/std_data/wsrep_notify.sh b/mysql-test/std_data/wsrep_notify.sh
index 5050ff9bc3e..80333b2eab8 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,7 +72,7 @@ configuration_change()
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
- echo "$END"
+ echo "$END;"
}
status_update()
@@ -186,13 +187,13 @@ then
fi
fi
-case $STATUS in
- "joined" | "donor" | "synced")
+case "$STATUS" in
+ 'joined' | 'donor' | 'synced')
"$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
"-h'$HOST'" "-P$PORT"$SSL_PARAM
;;
*)
- # The node might be shutting down
+ # The node might be shutting down or not initialized
;;
esac
diff --git a/mysql-test/std_data/wsrep_notify_ssl.sh b/mysql-test/std_data/wsrep_notify_ssl.sh
index 0e416a2f448..6c96db1a4e5 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()
@@ -186,10 +187,14 @@ then
fi
fi
-# Undefined means node is shutting down
-if [ "$STATUS" != 'Undefined' ]; then
- "$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
- "-h'$HOST'" "-P$PORT"$SSL_PARAM
-fi
+case "$STATUS" in
+ 'joined' | 'donor' | 'synced')
+ "$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
+ "-h'$HOST'" "-P$PORT"$SSL_PARAM
+ ;;
+ *)
+ # The node might be shutting down or not initialized
+ ;;
+esac
exit 0