HHH-14777 Enabled skip locked rendering for MariaDB 10.6+

This commit is contained in:
Christian Beikov 2021-08-16 17:12:01 +02:00
parent 971d0f1fc5
commit 1ba3595292
2 changed files with 28 additions and 1 deletions

View File

@ -280,7 +280,10 @@ public enum Database {
final int minorVersion = info.getDatabaseMinorVersion();
if ( majorVersion == 10 ) {
if ( minorVersion >= 3 ) {
if ( minorVersion >= 6 ) {
return new MariaDB106Dialect();
}
else if ( minorVersion >= 3 ) {
return new MariaDB103Dialect();
}
else if ( minorVersion == 2 ) {

View File

@ -0,0 +1,24 @@
/*
* 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.dialect;
/**
* An SQL dialect for MariaDB 10.6 and later, provides skip locked support.
*
* @author Christian Beikov
*/
public class MariaDB106Dialect extends MariaDB103Dialect {
public MariaDB106Dialect() {
super();
}
@Override
public boolean supportsSkipLocked() {
return true;
}
}