HHH-17537 Update MySQL CI testing to 8.2.0

This commit is contained in:
Christian Beikov 2023-12-08 14:23:11 +01:00
parent b1f82ad7a8
commit 9a3f9da2d4
1 changed files with 27 additions and 2 deletions

View File

@ -16,7 +16,7 @@ else
fi
mysql() {
mysql_8_1
mysql_8_2
}
mysql_8_0() {
@ -67,6 +67,30 @@ mysql_8_1() {
fi
}
mysql_8_2() {
$CONTAINER_CLI rm -f mysql || true
$CONTAINER_CLI run --name mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d docker.io/mysql:8.2.0 --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_as_cs --skip-character-set-client-handshake --log-bin-trust-function-creators=1
# Give the container some time to start
OUTPUT=
n=0
until [ "$n" -ge 5 ]
do
# Need to access STDERR. Thanks for the snippet https://stackoverflow.com/a/56577569/412446
{ OUTPUT="$( { $CONTAINER_CLI logs mysql; } 2>&1 1>&3 3>&- )"; } 3>&1;
if [[ $OUTPUT == *"ready for connections"* ]]; then
break;
fi
n=$((n+1))
echo "Waiting for MySQL to start..."
sleep 3
done
if [ "$n" -ge 5 ]; then
echo "MySQL failed to start and configure after 15 seconds"
else
echo "MySQL successfully started"
fi
}
mariadb() {
mariadb_11_1
}
@ -863,7 +887,7 @@ tidb_5_1() {
echo "Waiting for TiDB to start..."
sleep 3
done
$CONTAINER_CLI run --link tidb:tidb -it --rm docker.io/mysql:8.0.31 mysql -htidb -P4000 -uroot -e "create database hibernate_orm_test; create user 'hibernate_orm_test' identified by 'hibernate_orm_test'; grant all on hibernate_orm_test.* to 'hibernate_orm_test';"
$CONTAINER_CLI run --link tidb:tidb -it --rm docker.io/mysql:8.2.0 mysql -htidb -P4000 -uroot -e "create database hibernate_orm_test; create user 'hibernate_orm_test' identified by 'hibernate_orm_test'; grant all on hibernate_orm_test.* to 'hibernate_orm_test';"
if [ "$n" -ge 5 ]; then
echo "TiDB failed to start and configure after 15 seconds"
else
@ -894,6 +918,7 @@ if [ -z ${1} ]; then
echo -e "\tmssql_2022"
echo -e "\tmssql_2017"
echo -e "\tmysql"
echo -e "\tmysql_8_2"
echo -e "\tmysql_8_1"
echo -e "\tmysql_8_0"
echo -e "\toracle"