Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10529

SELECT SLEEP(n) with MAX_STATEMENT_TIME produces no error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Not a Bug
    • None
    • N/A
    • OTHER
    • None

    Description

      This is a minor problem, but I think it's natural to use the following query to test the behavior of max_statement_time:

      MariaDB [(none)]> SET STATEMENT max_statement_time = 1 FOR SELECT SLEEP(10);
      +-----------+
      | SLEEP(10) |
      +-----------+
      |         1 |
      +-----------+
      1 row in set (1.01 sec)
      

      The natural conclusion is that MAX_STATEMENT_TIME forces MariaDB to send the results it read until now, without any error. But this is not true:

      MariaDB [test]> SET STATEMENT max_statement_time = 1 FOR SELECT * FROM t WHERE SLEEP(10);
      ERROR 1969 (70100): Query execution was interrupted (max_statement_time exceeded)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            f_razzoli Federico Razzoli
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.