Skip to content

Commit

Permalink
[DAT-18992] 2025 :: Q1 :: Interop :: MySQL 8.4 on-prem support (#961)
Browse files Browse the repository at this point in the history
* DAT-18992 adding MySQL 8.4
  • Loading branch information
Tamelianovych authored Jan 10, 2025
1 parent a53e907 commit 59eca43
Show file tree
Hide file tree
Showing 13 changed files with 171 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/advanced.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
databases:
description: Databases to start up. Comma separated list of "name"
required: true
default: "[\"mysql-5.6\",\"mysql-5.7\",\"mysql-8\",\"postgres-12\",\"postgres-13\",\"postgres-14\",\"postgres-15\",\"postgres-16\",\"postgres-17\",\"mariadb-10.2\",\"mariadb-10.3\",\"mariadb-10.4\",\"mariadb-10.5\",\"mariadb-10.6\",
default: "[\"mysql-5.6\",\"mysql-5.7\",\"mysql-8\",\"mysql-8.4\",\"postgres-12\",\"postgres-13\",\"postgres-14\",\"postgres-15\",\"postgres-16\",\"postgres-17\",\"mariadb-10.2\",\"mariadb-10.3\",\"mariadb-10.4\",\"mariadb-10.5\",\"mariadb-10.6\",
\"mariadb-10.7\",\"mssql-2017\",\"mssql-2019\",\"mssql-2022\",\"crdb-23.1\",\"crdb-23.2\",\"crdb-24.1\",\"percona-xtradb-cluster-5.7\",\"percona-xtradb-cluster-8.0\",
\"edb-edb-12\",\"edb-edb-13\",\"edb-edb-14\",\"edb-edb-15\",\"edb-edb-16\",\"db2-luw\",\"H2Database-2.2\",\"sqlite\",\"derby\",
\"firebird-3\",\"firebird-4\",\"hsqldb-2.4\",\"hsqldb-2.5\",\"diff\"]"
Expand All @@ -49,7 +49,7 @@ jobs:
useLiquibaseSnapshot: ${{ steps.configure-build.outputs.useLiquibaseSnapshot }}
liquibaseBranch: ${{ steps.configure-build.outputs.liquibaseBranch }}
liquibaseRepo: ${{ steps.configure-build.outputs.liquibaseRepo }}
databases: ${{ github.event.inputs.databases || '["mysql-5.6","mysql-5.7","mysql-8",
databases: ${{ github.event.inputs.databases || '["mysql-5.6","mysql-5.7","mysql-8","mysql-8.4",
"postgres-12","postgres-13","postgres-14","postgres-15","postgres-16","postgres-17","mariadb-10.2","mariadb-10.3","mariadb-10.4","mariadb-10.5","mariadb-10.6",
"mariadb-10.7","mssql-2017","mssql-2019","mssql-2022","crdb-23.1","crdb-23.2","crdb-24.1","percona-xtradb-cluster-5.7","percona-xtradb-cluster-8.0",
"edb-edb-12","edb-edb-13","edb-edb-14","edb-edb-15","edb-edb-16","db2-luw","H2Database-2.2","sqlite","derby","firebird-3","firebird-4",
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ on:
"mysql-5.6",
"mysql-5.7",
"mysql-8",
"mysql-8.4",
"percona-xtradb-cluster-5.7",
"percona-xtradb-cluster-8.0",
"percona-xtradb-cluster-8.4",
Expand Down Expand Up @@ -118,7 +119,7 @@ jobs:
liquibaseBranch: ${{ steps.configure-build.outputs.liquibaseBranch }}
liquibaseRepo: ${{ steps.configure-build.outputs.liquibaseRepo }}
liquibaseSha: ${{ steps.configure-build.outputs.liquibaseSha }}
databases: ${{ github.event.inputs.databases || '["mysql-5.6","mysql-5.7","mysql-8","percona-xtradb-cluster-5.7","percona-xtradb-cluster-8.0","percona-xtradb-cluster-8.4",
databases: ${{ github.event.inputs.databases || '["mysql-5.6","mysql-5.7","mysql-8","mysql-8.4","percona-xtradb-cluster-5.7","percona-xtradb-cluster-8.0","percona-xtradb-cluster-8.4",
"postgres-12","postgres-13","postgres-14","postgres-15","postgres-16","postgres-17","mariadb-10.2","mariadb-10.3","mariadb-10.4","mariadb-10.5","mariadb-10.6",
"mariadb-10.7","mssql-2017","mssql-2019","mssql-2022","H2Database-2.2","crdb-23.1","crdb-23.2","crdb-24.1",
"edb-postgres-12","edb-postgres-13","edb-postgres-14","edb-postgres-15","edb-postgres-16",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet author="as" id="1">
<sql>SET GLOBAL log_bin_trust_function_creators = 1;</sql>
<rollback/>
</changeSet>
<changeSet author="as" id="2">
<pro:createFunction
encoding="UTF-8"
replaceIfExists="true"
functionName="test_function">CREATE FUNCTION test_function()
RETURNS VARCHAR(20)
BEGIN
RETURN 'Hello';
END
</pro:createFunction>
<rollback>
<pro:dropFunction functionName="test_function"/>
</rollback>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">

<changeSet author="as" id="1">
<sql>SET GLOBAL log_bin_trust_function_creators = 1;</sql>
<rollback/>
</changeSet>
<changeSet author="as" id="2">
<pro:createPackage encoding="UTF-8"
packageName="Test package">CREATE FUNCTION test_function()
RETURNS VARCHAR(20)
BEGIN
RETURN 'Hello';
END</pro:createPackage>
<rollback>
<pro:dropFunction functionName="test_function"/>
</rollback>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">

<changeSet author="as" id="1">
<sql>SET GLOBAL log_bin_trust_function_creators = 1;</sql>
<rollback/>
</changeSet>
<changeSet author="as" id="2">
<pro:createPackageBody encoding="UTF-8"
packageBodyName="Test package">CREATE FUNCTION test_function()
RETURNS VARCHAR(20)
BEGIN
RETURN 'Hello';
END</pro:createPackageBody>
<rollback>
<pro:dropFunction functionName="test_function"/>
</rollback>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet author="as" id="1">
<sql>SET GLOBAL log_bin_trust_function_creators = 1;</sql>
<rollback/>
</changeSet>
<changeSet author="as" id="2">
<pro:createFunction
encoding="UTF-8"
replaceIfExists="true"
functionName="test_function">CREATE FUNCTION test_function()
RETURNS VARCHAR(20)
BEGIN
RETURN 'Hello';
END
</pro:createFunction>
<rollback/>
</changeSet>
<changeSet author="as" id="3">
<pro:dropFunction functionName="test_function"/>
<rollback/>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"snapshot": {
"objects": {
"com.datical.liquibase.ext.storedlogic.function.Function": [
{
"function": {
"body": "CREATE FUNCTION `test_function`() RETURNS varchar(20) CHARSET utf8mb4\nBEGIN\n RETURN 'Hello';\n END",
"name": "test_function"
}
}]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"snapshot": {
"objects": {
"com.datical.liquibase.ext.storedlogic.function.Function": [
{
"function": {
"body": "CREATE FUNCTION `test_function`() RETURNS varchar(20) CHARSET utf8mb4\nBEGIN\n RETURN 'Hello';\n END",
"name": "test_function"
}
}]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"snapshot": {
"objects": {
"com.datical.liquibase.ext.storedlogic.function.Function": [
{
"function": {
"body": "CREATE FUNCTION `test_function`() RETURNS varchar(20) CHARSET utf8mb4\nBEGIN\n RETURN 'Hello';\n END",
"name": "test_function"
}
}]
}
}
}
3 changes: 3 additions & 0 deletions src/test/resources/automation-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ case $db in
"mysql-8" )
test_command mvn -ntp -Dtest=$tc -DdbName=mysql -DdbVersion=8 test
;;
"mysql-8.4" )
test_command mvn -ntp -Dtest=$tc -DdbName=mysql -DdbVersion=8.4 test
;;
"percona-xtradb-cluster-5.7" )
test_command mvn -ntp -Dtest=$tc -DdbName=percona-xtradb-cluster -DdbVersion=5.7 test
;;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/docker/create-infra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ case $db in
;;

"diff")
docker compose up -d postgres-17 postgres-16 postgres-15 postgres-14 postgres-13 postgres-12 mysql-5.7 mysql-8 mariadb-10.2 mariadb-10.3 mariadb-10.4 mariadb-10.5 mariadb-10.6 mariadb-10.7 mssql-2017 mssql-2019 mssql-2022
docker compose up -d postgres-17 postgres-16 postgres-15 postgres-14 postgres-13 postgres-12 mysql-5.7 mysql-8 mysql-8.4 mariadb-10.2 mariadb-10.3 mariadb-10.4 mariadb-10.5 mariadb-10.6 mariadb-10.7 mssql-2017 mssql-2019 mssql-2022
sleep 40
docker ps -a
;;
Expand Down
15 changes: 15 additions & 0 deletions src/test/resources/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ services:
volumes:
- "./mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql"

mysql-8.4:
platform: linux/x86_64
image: mysql:8.4
ports:
- "33065:3306"
restart: always
environment:
MYSQL_ROOT_PASSWORD: LbRootPass1
MYSQL_DATABASE: lbcat
MYSQL_USER: lbuser
MYSQL_PASSWORD: LiquibasePass1
volumes:
- "./mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql"


percona-xtradb-cluster-5.7:
image: percona/percona-xtradb-cluster:5.7
ports:
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/harness-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ databasesUnderTest:
username: lbuser
password: LiquibasePass1

- name: mysql
prefix: docker
version: 8.4
url: jdbc:mysql://localhost:33065/lbcat
username: lbuser
password: LiquibasePass1

- name: percona-xtradb-cluster
version: 5.7
url: jdbc:mysql://localhost:33070/lbcat
Expand Down

0 comments on commit 59eca43

Please sign in to comment.