Skip to content

Commit 82aeb57

Browse files
MoadElfatihibeikov
authored andcommitted
HHH-19225: remove support for mariadb version's older than 10.6
1 parent 43cc747 commit 82aeb57

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

ci/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ elif [ "$RDBMS" == "hsqldb" ] || [ "$RDBMS" == "hsqldb_2_6" ]; then
1010
goal="-Pdb=hsqldb"
1111
elif [ "$RDBMS" == "mysql" ] || [ "$RDBMS" == "mysql_8_0" ]; then
1212
goal="-Pdb=mysql_ci"
13-
elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_4" ]; then
13+
elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_6" ]; then
1414
goal="-Pdb=mariadb_ci"
1515
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_13" ]; then
1616
goal="-Pdb=pgsql_ci"

docker_db.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ mariadb_wait_until_start()
138138
fi
139139
}
140140

141-
mariadb_10_5() {
141+
mariadb_10_6() {
142142
$CONTAINER_CLI rm -f mariadb || true
143-
$CONTAINER_CLI run --name mariadb -e MARIADB_USER=hibernate_orm_test -e MARIADB_PASSWORD=hibernate_orm_test -e MARIADB_DATABASE=hibernate_orm_test -e MARIADB_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d ${DB_IMAGE_MARIADB_10_5:-docker.io/mariadb:10.5.25} --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake --lower_case_table_names=2
143+
$CONTAINER_CLI run --name mariadb -e MARIADB_USER=hibernate_orm_test -e MARIADB_PASSWORD=hibernate_orm_test -e MARIADB_DATABASE=hibernate_orm_test -e MARIADB_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d ${DB_IMAGE_MARIADB_10_6:-docker.io/mariadb:10.6.20} --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake --lower_case_table_names=2
144144
mariadb_wait_until_start
145145
}
146146

@@ -1077,7 +1077,7 @@ if [ -z ${1} ]; then
10771077
echo -e "\tmariadb_11_4"
10781078
echo -e "\tmariadb_11_1"
10791079
echo -e "\tmariadb_10_11"
1080-
echo -e "\tmariadb_10_5"
1080+
echo -e "\tmariadb_10_6"
10811081
echo -e "\tmssql"
10821082
echo -e "\tmssql_2022"
10831083
echo -e "\tmssql_2017"

hibernate-core/src/main/java/org/hibernate/dialect/MariaDBDialect.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@
6161
import static org.hibernate.type.SqlTypes.VARBINARY;
6262

6363
/**
64-
* A {@linkplain Dialect SQL dialect} for MariaDB 10.5 and above.
64+
* A {@linkplain Dialect SQL dialect} for MariaDB 10.6 and above.
6565
*
6666
* @author Vlad Mihalcea
6767
* @author Gavin King
6868
*/
6969
public class MariaDBDialect extends MySQLDialect {
70-
private static final DatabaseVersion MINIMUM_VERSION = DatabaseVersion.make( 10, 5 );
70+
private static final DatabaseVersion MINIMUM_VERSION = DatabaseVersion.make( 10, 6 );
7171
private static final DatabaseVersion MYSQL57 = DatabaseVersion.make( 5, 7 );
7272
private static final Set<String> GEOMETRY_TYPE_NAMES = Set.of(
7373
"POINT",
@@ -128,11 +128,8 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
128128
commonFunctionFactory.jsonArrayAgg_mariadb();
129129
commonFunctionFactory.jsonObjectAgg_mariadb();
130130
commonFunctionFactory.jsonArrayAppend_mariadb();
131-
132-
if ( getVersion().isSameOrAfter( 10, 6 ) ) {
133-
commonFunctionFactory.unnest_emulated();
134-
commonFunctionFactory.jsonTable_mysql();
135-
}
131+
commonFunctionFactory.unnest_emulated();
132+
commonFunctionFactory.jsonTable_mysql();
136133

137134
commonFunctionFactory.inverseDistributionOrderedSetAggregates_windowEmulation();
138135
functionContributions.getFunctionRegistry().patternDescriptorBuilder( "median", "median(?1) over ()" )
@@ -276,8 +273,7 @@ public SequenceInformationExtractor getSequenceInformationExtractor() {
276273

277274
@Override
278275
public boolean supportsSkipLocked() {
279-
//only supported on MySQL and as of 10.6
280-
return getVersion().isSameOrAfter( 10, 6 );
276+
return true;
281277
}
282278

283279
@Override
@@ -303,7 +299,7 @@ protected boolean supportsAliasLocks() {
303299
}
304300

305301
/**
306-
* @return {@code true} for 10.5 and above because Maria supports
302+
* @return {@code true} for 10.6 and above because Maria supports
307303
* {@code insert ... returning} even though MySQL does not
308304
*/
309305
@Override

nightly.Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ stage('Configure') {
2727
// Minimum supported versions
2828
new BuildEnvironment( dbName: 'hsqldb_2_6' ),
2929
new BuildEnvironment( dbName: 'mysql_8_0' ),
30-
new BuildEnvironment( dbName: 'mariadb_10_5' ),
30+
new BuildEnvironment( dbName: 'mariadb_10_6' ),
3131
new BuildEnvironment( dbName: 'postgresql_13' ),
3232
new BuildEnvironment( dbName: 'edb_13' ),
3333
new BuildEnvironment( dbName: 'db2_10_5', longRunning: true ),
@@ -111,8 +111,8 @@ stage('Build') {
111111
sh "./docker_db.sh mysql_8_0"
112112
state[buildEnv.tag]['containerName'] = "mysql"
113113
break;
114-
case "mariadb_10_5":
115-
sh "./docker_db.sh mariadb_10_5"
114+
case "mariadb_10_6":
115+
sh "./docker_db.sh mariadb_10_6"
116116
state[buildEnv.tag]['containerName'] = "mariadb"
117117
break;
118118
case "postgresql_13":

0 commit comments

Comments
 (0)