Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
3.1.2, 3.1.4
-
None
-
org.hibernate.orm.hibernate-core 6.1.7.Final
org.hibernate.orm.hibernate-hikaricp 6.1.7.Final
com.zaxxer.HikariCP version 5.0.1
org.mariadb.jdbc.mariadb-java-client 3.1.2 / 3.1.4
Description
When trying to execute an OPTIMIZE TABLE query:
entityManager.createNativeQuery("OPTIMIZE TABLE `nonce`;").executeUpdate();
an exception is thrown:
jakarta.persistence.PersistenceException: Converting `org.hibernate.exception.GenericJDBCException` to JPA `PersistenceException` : JDBC exception executing SQL [OPTIMIZE TABLE `nonce`;]
Caused by: java.sql.SQLException: (conn=929) the given SQL statement produces an unexpected ResultSet object
WARN o.h.e.jdbc.spi.SqlExceptionHelper - SQL Error: -1, SQLState: HY000
ERROR o.h.e.jdbc.spi.SqlExceptionHelper - (conn=929) the given SQL statement produces an unexpected ResultSet object
This query used to work perfectly on the 2.x.x version of the connector
I have tested with connector version 3.1.2 and 3.1.4