Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1074

Unable to execute OPTIMIZE TABLE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 3.1.2, 3.1.4
    • N/A
    • 2.7 compatibility
    • 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

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            rtuk Rick Tuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.