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

MAX_STATEMENT_TIME timeout does not results in exception

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 4.0.0
    • None
    • JDBC compatibility
    • None
    • MariaDb 12.3.3 combined with JDBC Driver MariaDb 4.0.0

    Description

      We used to have a SQLException when max_statement_time is reached if ever

      Stack trace looks like this :

      Caused by: java.sql.SQLTimeoutException: (conn=189188) Query was interrupted: execution time limit 120.0 sec exceeded
      at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:275)
      at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:402)
      at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:196)

      Now with version 4.0.0 of the driver this condition is no longer honored. Seems like the exception is never thrown

      2026-10-27 20:00:20.859; INFO ; batch-**********[host]; com.***************; Will execute insert; batch-*********-thread-1
      2026-10-27 20:05:18.137; ERROR; batch-**********[host]; com.**********.Batch; Catching; main
      java.util.concurrent.TimeoutException
      at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1981)

      So I get a java completable future exception after 5 minutes but no SQLException

      The SQL Statement is an INSERT SELECT statement that should insert thousand of rows but failed to execute in the given 2 minutes timeout setup on login with MAX_STATEMENT_TIME

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            gigueret Thierry Giguere
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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