HHH-17097 - Remove support for MariaDB versions older than 10.4
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
1a1604be2f
commit
ec639cd1f7
|
@ -71,9 +71,9 @@ mariadb() {
|
||||||
mariadb_11_1
|
mariadb_11_1
|
||||||
}
|
}
|
||||||
|
|
||||||
mariadb_10_3() {
|
mariadb_10_4() {
|
||||||
$CONTAINER_CLI rm -f mariadb || true
|
$CONTAINER_CLI rm -f mariadb || true
|
||||||
$CONTAINER_CLI run --name mariadb -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d docker.io/mariadb:10.3.39 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake
|
$CONTAINER_CLI run --name mariadb -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d docker.io/mariadb:10.4.31 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake
|
||||||
OUTPUT=
|
OUTPUT=
|
||||||
n=0
|
n=0
|
||||||
until [ "$n" -ge 5 ]
|
until [ "$n" -ge 5 ]
|
||||||
|
@ -953,7 +953,7 @@ if [ -z ${1} ]; then
|
||||||
echo -e "\tmariadb"
|
echo -e "\tmariadb"
|
||||||
echo -e "\tmariadb_11_1"
|
echo -e "\tmariadb_11_1"
|
||||||
echo -e "\tmariadb_10_9"
|
echo -e "\tmariadb_10_9"
|
||||||
echo -e "\tmariadb_10_3"
|
echo -e "\tmariadb_10_4"
|
||||||
echo -e "\tmssql"
|
echo -e "\tmssql"
|
||||||
echo -e "\tmssql_2022"
|
echo -e "\tmssql_2022"
|
||||||
echo -e "\tmssql_2017"
|
echo -e "\tmssql_2017"
|
||||||
|
|
|
@ -56,6 +56,8 @@ public class CommunityDialectSelector implements DialectSelector {
|
||||||
return MariaDB10Dialect.class;
|
return MariaDB10Dialect.class;
|
||||||
case "MariaDB102":
|
case "MariaDB102":
|
||||||
return MariaDB102Dialect.class;
|
return MariaDB102Dialect.class;
|
||||||
|
case "MariaDB103":
|
||||||
|
return MariaDB103Dialect.class;
|
||||||
case "MimerSQL":
|
case "MimerSQL":
|
||||||
return MimerSQLDialect.class;
|
return MimerSQLDialect.class;
|
||||||
case "MySQL5":
|
case "MySQL5":
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
package org.hibernate.dialect;
|
package org.hibernate.community.dialect;
|
||||||
|
|
||||||
import org.hibernate.LockOptions;
|
import org.hibernate.LockOptions;
|
||||||
|
import org.hibernate.dialect.DatabaseVersion;
|
||||||
|
import org.hibernate.dialect.MariaDBDialect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An SQL dialect for MariaDB 10.3 and later, provides sequence support, lock-timeouts, etc.
|
* An SQL dialect for MariaDB 10.3 and later, provides sequence support, lock-timeouts, etc.
|
|
@ -38,6 +38,7 @@ public class CommunityDialectSelectorTest {
|
||||||
testDialectNamingResolution( MariaDB53Dialect.class );
|
testDialectNamingResolution( MariaDB53Dialect.class );
|
||||||
testDialectNamingResolution( MariaDB10Dialect.class );
|
testDialectNamingResolution( MariaDB10Dialect.class );
|
||||||
testDialectNamingResolution( MariaDB102Dialect.class );
|
testDialectNamingResolution( MariaDB102Dialect.class );
|
||||||
|
testDialectNamingResolution( MariaDB103Dialect.class );
|
||||||
|
|
||||||
testDialectNamingResolution( MySQL5Dialect.class );
|
testDialectNamingResolution( MySQL5Dialect.class );
|
||||||
testDialectNamingResolution( MySQL55Dialect.class );
|
testDialectNamingResolution( MySQL55Dialect.class );
|
||||||
|
|
|
@ -23,7 +23,6 @@ import org.hibernate.dialect.HANACloudColumnStoreDialect;
|
||||||
import org.hibernate.dialect.HANAColumnStoreDialect;
|
import org.hibernate.dialect.HANAColumnStoreDialect;
|
||||||
import org.hibernate.dialect.HANARowStoreDialect;
|
import org.hibernate.dialect.HANARowStoreDialect;
|
||||||
import org.hibernate.dialect.HSQLDialect;
|
import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.MariaDB103Dialect;
|
|
||||||
import org.hibernate.dialect.MariaDBDialect;
|
import org.hibernate.dialect.MariaDBDialect;
|
||||||
import org.hibernate.dialect.MySQL8Dialect;
|
import org.hibernate.dialect.MySQL8Dialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
|
@ -85,9 +84,8 @@ public class DefaultDialectSelector implements DialectSelector {
|
||||||
case "MariaDB53":
|
case "MariaDB53":
|
||||||
case "MariaDB10":
|
case "MariaDB10":
|
||||||
case "MariaDB102":
|
case "MariaDB102":
|
||||||
return findCommunityDialect( name );
|
|
||||||
case "MariaDB103":
|
case "MariaDB103":
|
||||||
return MariaDB103Dialect.class;
|
return findCommunityDialect( name );
|
||||||
case "MySQL":
|
case "MySQL":
|
||||||
return MySQLDialect.class;
|
return MySQLDialect.class;
|
||||||
case "MySQL5":
|
case "MySQL5":
|
||||||
|
|
|
@ -14,10 +14,10 @@ package org.hibernate.dialect;
|
||||||
* @deprecated use {@code MariaDBDialect(1060)}
|
* @deprecated use {@code MariaDBDialect(1060)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class MariaDB106Dialect extends MariaDB103Dialect {
|
public class MariaDB106Dialect extends MariaDBDialect {
|
||||||
|
|
||||||
public MariaDB106Dialect() {
|
public MariaDB106Dialect() {
|
||||||
super();
|
super( DatabaseVersion.make( 10, 6 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -48,7 +48,7 @@ import static org.hibernate.type.SqlTypes.VARBINARY;
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
*/
|
*/
|
||||||
public class MariaDBDialect extends MySQLDialect {
|
public class MariaDBDialect extends MySQLDialect {
|
||||||
private static final DatabaseVersion MINIMUM_VERSION = DatabaseVersion.make( 10, 3 );
|
private static final DatabaseVersion MINIMUM_VERSION = DatabaseVersion.make( 10, 4 );
|
||||||
private static final DatabaseVersion MYSQL57 = DatabaseVersion.make( 5, 7 );
|
private static final DatabaseVersion MYSQL57 = DatabaseVersion.make( 5, 7 );
|
||||||
|
|
||||||
public MariaDBDialect() {
|
public MariaDBDialect() {
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class MariaDBSqlAstTranslator<T extends JdbcOperation> extends AbstractSq
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean supportsSimpleQueryGrouping() {
|
protected boolean supportsSimpleQueryGrouping() {
|
||||||
return getDialect().getVersion().isSameOrAfter( 10, 4 );
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -220,11 +220,6 @@ public class MariaDBSqlAstTranslator<T extends JdbcOperation> extends AbstractSq
|
||||||
return " from dual";
|
return " from dual";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getFromDualForSelectOnly() {
|
|
||||||
return getDialect().getVersion().isBefore( 10, 4 ) ? getFromDual() : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MariaDBDialect getDialect() {
|
public MariaDBDialect getDialect() {
|
||||||
return this.dialect;
|
return this.dialect;
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
/*
|
|
||||||
* Hibernate, Relational Persistence for Idiomatic Java
|
|
||||||
*
|
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.hibernate.spatial.dialect.mariadb;
|
|
||||||
|
|
||||||
import org.hibernate.dialect.MariaDB103Dialect;
|
|
||||||
import org.hibernate.spatial.SpatialDialect;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Spatial Dialects are no longer needed. Use the standard MariaDB dialects
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class MariaDB103SpatialDialect extends MariaDB103Dialect implements SpatialDialect {
|
|
||||||
|
|
||||||
}
|
|
|
@ -29,7 +29,7 @@ stage('Configure') {
|
||||||
// Minimum supported versions
|
// Minimum supported versions
|
||||||
new BuildEnvironment( dbName: 'hsqldb_2_6' ),
|
new BuildEnvironment( dbName: 'hsqldb_2_6' ),
|
||||||
new BuildEnvironment( dbName: 'mysql_8_0' ),
|
new BuildEnvironment( dbName: 'mysql_8_0' ),
|
||||||
new BuildEnvironment( dbName: 'mariadb_10_3' ),
|
new BuildEnvironment( dbName: 'mariadb_10_4' ),
|
||||||
new BuildEnvironment( dbName: 'postgresql_12' ),
|
new BuildEnvironment( dbName: 'postgresql_12' ),
|
||||||
new BuildEnvironment( dbName: 'edb_12' ),
|
new BuildEnvironment( dbName: 'edb_12' ),
|
||||||
new BuildEnvironment( dbName: 'oracle_11_2' ),
|
new BuildEnvironment( dbName: 'oracle_11_2' ),
|
||||||
|
@ -117,11 +117,11 @@ stage('Build') {
|
||||||
sh "./docker_db.sh mysql_8_0"
|
sh "./docker_db.sh mysql_8_0"
|
||||||
state[buildEnv.tag]['containerName'] = "mysql"
|
state[buildEnv.tag]['containerName'] = "mysql"
|
||||||
break;
|
break;
|
||||||
case "mariadb_10_3":
|
case "mariadb_10_4":
|
||||||
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
|
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
|
||||||
docker.image('mariadb:10.3.39').pull()
|
docker.image('mariadb:10.4.31').pull()
|
||||||
}
|
}
|
||||||
sh "./docker_db.sh mariadb_10_3"
|
sh "./docker_db.sh mariadb_10_4"
|
||||||
state[buildEnv.tag]['containerName'] = "mariadb"
|
state[buildEnv.tag]['containerName'] = "mariadb"
|
||||||
break;
|
break;
|
||||||
case "postgresql_12":
|
case "postgresql_12":
|
||||||
|
|
Loading…
Reference in New Issue