From 971d0f1fc5f7a31d373a4b806f4e9b16789eb1fb Mon Sep 17 00:00:00 2001 From: The Geeky Asian Date: Fri, 7 Feb 2020 02:55:30 +0400 Subject: [PATCH 1/3] HHH-13848 - Fix for potential NullPointerException The callers of the convert() method in ResourceRegistryStandardImpl expect an exception which is then thrown. This me produce NullPointerException, which has been fixed in this commit. --- .../resource/jdbc/internal/ResourceRegistryStandardImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/ResourceRegistryStandardImpl.java b/hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/ResourceRegistryStandardImpl.java index f8dbe76362..4a2ee8f413 100644 --- a/hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/ResourceRegistryStandardImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/ResourceRegistryStandardImpl.java @@ -245,8 +245,7 @@ public final class ResourceRegistryStandardImpl implements ResourceRegistry { } private JDBCException convert(SQLException e, String s) { - // todo : implement - return null; + return new JDBCException(s, e); } @Override From 1ba359529222ac8e5dc4dbe5b5bd7a63e3bf9fe2 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Mon, 16 Aug 2021 17:12:01 +0200 Subject: [PATCH 2/3] HHH-14777 Enabled skip locked rendering for MariaDB 10.6+ --- .../java/org/hibernate/dialect/Database.java | 5 +++- .../hibernate/dialect/MariaDB106Dialect.java | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 hibernate-core/src/main/java/org/hibernate/dialect/MariaDB106Dialect.java diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Database.java b/hibernate-core/src/main/java/org/hibernate/dialect/Database.java index db752b6a55..309986ff24 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Database.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Database.java @@ -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 ) { diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/MariaDB106Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/MariaDB106Dialect.java new file mode 100644 index 0000000000..fc5c161e4c --- /dev/null +++ b/hibernate-core/src/main/java/org/hibernate/dialect/MariaDB106Dialect.java @@ -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 . + */ +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; + } +} From 6e6b6eb0ae72c438bb6d51a90f82a89d299f4ba4 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Thu, 19 Aug 2021 17:42:33 +0100 Subject: [PATCH 3/3] HHH-14788 Upgrade to Byteman 4.0.16 --- gradle/libraries.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libraries.gradle b/gradle/libraries.gradle index 8636f33e98..d3c755de9e 100644 --- a/gradle/libraries.gradle +++ b/gradle/libraries.gradle @@ -11,7 +11,7 @@ ext { junitVersion = '4.13.2' h2Version = '1.4.197' - bytemanVersion = '4.0.13' //Compatible with JDK16 + bytemanVersion = '4.0.16' //Compatible with JDK 17 jnpVersion = '5.0.6.CR1' hibernateCommonsVersion = '5.1.2.Final'