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

SET STATEMENT query_response_time_exec_time_debug has no effect

    XMLWordPrintable

    Details

      Description

      MariaDB [test]> install soname 'query_response_time.so';
      Query OK, 0 rows affected (0.03 sec)
       
      MariaDB [test]> set global query_response_time_stats=1;
       
      MariaDB [test]> set statement query_response_time_exec_time_debug = 5000000 for select 1;
      +---+
      | 1 |
      +---+
      | 1 |
      +---+
      1 row in set (0.00 sec)

      MariaDB [test]> select * from information_schema.query_response_time;
      +----------------+-------+----------------+
      | TIME           | COUNT | TOTAL          |
      +----------------+-------+----------------+
      |       0.000001 |     0 |       0.000000 |
      |       0.000010 |     0 |       0.000000 |
      |       0.000100 |     0 |       0.000000 |
      |       0.001000 |     2 |       0.000381 |
      |       0.010000 |     0 |       0.000000 |
      |       0.100000 |     0 |       0.000000 |
      |       1.000000 |     0 |       0.000000 |
      |      10.000000 |     0 |       0.000000 |
      |     100.000000 |     0 |       0.000000 |
      |    1000.000000 |     0 |       0.000000 |
      |   10000.000000 |     0 |       0.000000 |
      |  100000.000000 |     0 |       0.000000 |
      | 1000000.000000 |     0 |       0.000000 |
      | TOO LONG       |     0 | TOO LONG       |
      +----------------+-------+----------------+
      14 rows in set (0.00 sec)

      Compare with:

      MariaDB [test]> set query_response_time_exec_time_debug = 5000000;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> select 1;
      +---+
      | 1 |
      +---+
      | 1 |
      +---+
      1 row in set (0.00 sec)
       
      MariaDB [test]> set query_response_time_exec_time_debug = 0;
      Query OK, 0 rows affected (0.00 sec)

      MariaDB [test]> select * from information_schema.query_response_time;
      +----------------+-------+----------------+
      | TIME           | COUNT | TOTAL          |
      +----------------+-------+----------------+
      |       0.000001 |     1 |       0.000000 |
      |       0.000010 |     0 |       0.000000 |
      |       0.000100 |     0 |       0.000000 |
      |       0.001000 |     2 |       0.000290 |
      |       0.010000 |     0 |       0.000000 |
      |       0.100000 |     0 |       0.000000 |
      |       1.000000 |     0 |       0.000000 |
      |      10.000000 |     1 |       5.000000 |
      |     100.000000 |     0 |       0.000000 |
      |    1000.000000 |     0 |       0.000000 |
      |   10000.000000 |     0 |       0.000000 |
      |  100000.000000 |     0 |       0.000000 |
      | 1000000.000000 |     0 |       0.000000 |
      | TOO LONG       |     0 | TOO LONG       |
      +----------------+-------+----------------+
      14 rows in set (0.00 sec)

      I don't know whether it's reproducible with Percona server or not, couldn't get query_response_time work there at all.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: