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

Query that runs for 2ms was not terminated when using MAX_EXECUTION_TIME(1)

Details

    Description

      Likely a minor issue.
      Ensure a slower build, like UBASAN is used.
      Technically this is not possible, i.e. a max of 1ms is given but the query took 2ms.

      bb-11.8-MDEV-35504-opt-hints-v2 CS 11.8.0 8e5b7fa59f9f7d11cae869bdf06411a7c4334ba2 (Optimized, UBASAN, Clang)

      11.8.0-opt>SELECT /*+ MAX_EXECUTION_TIME(1)*/* FROM information_schema.routines;
      +--------------------+-----------------+----------------+--------------------+--------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------------+-----------------+------------------+-----------------+----------+---------------+---------------------+---------------------+----------+-----------------+-----------------------+----------------------+----------------------+-----------------------+
      | SPECIFIC_NAME      | ROUTINE_CATALOG | ROUTINE_SCHEMA | ROUTINE_NAME       | ROUTINE_TYPE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME | DTD_IDENTIFIER | ROUTINE_BODY | ROUTINE_DEFINITION                                                                                                                                                                         | EXTERNAL_NAME | EXTERNAL_LANGUAGE | PARAMETER_STYLE | IS_DETERMINISTIC | SQL_DATA_ACCESS | SQL_PATH | SECURITY_TYPE | CREATED             | LAST_ALTERED        | SQL_MODE | ROUTINE_COMMENT | DEFINER               | CHARACTER_SET_CLIENT | COLLATION_CONNECTION | DATABASE_COLLATION    |
      +--------------------+-----------------+----------------+--------------------+--------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------------+-----------------+------------------+-----------------+----------+---------------+---------------------+---------------------+----------+-----------------+-----------------------+----------------------+----------------------+-----------------------+
      | AddGeometryColumn  | def             | mysql          | AddGeometryColumn  | PROCEDURE    |           |                     NULL |                   NULL |              NULL |          NULL |               NULL | NULL               | NULL           | NULL           | SQL          | begin
        set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end | NULL          | NULL              | SQL             | NO               | CONTAINS SQL    | NULL     | INVOKER       | 2025-01-17 15:21:23 | 2025-01-17 15:21:23 |          |                 | mariadb.sys@localhost | utf8mb3              | utf8mb3_general_ci   | utf8mb4_uca1400_ai_ci |
      | DropGeometryColumn | def             | mysql          | DropGeometryColumn | PROCEDURE    |           |                     NULL |                   NULL |              NULL |          NULL |               NULL | NULL               | NULL           | NULL           | SQL          | begin
        set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end                                   | NULL          | NULL              | SQL             | NO               | CONTAINS SQL    | NULL     | INVOKER       | 2025-01-17 15:21:23 | 2025-01-17 15:21:23 |          |                 | mariadb.sys@localhost | utf8mb3              | utf8mb3_general_ci   | utf8mb4_uca1400_ai_ci |
      +--------------------+-----------------+----------------+--------------------+--------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------------+-----------------+------------------+-----------------+----------+---------------+---------------------+---------------------+----------+-----------------+-----------------------+----------------------+----------------------+-----------------------+
      2 rows in set (0.002 sec)
      

      The issue is sporadic in such a way that the query sometimes is terminated, other times it is not. The same can be seen with a fast build, i.e. sometimes terminated sometimes succeeds, but the query execution time is always 0.001 second there, so it is harder to identify as a bug there unlike in SAN builds.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              oleg.smirnov Oleg Smirnov
              Roel Roel Van de Paar
              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.