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

FLUSH QUERY_RESPONSE_TIME_WRITE also flushes READ, and vice versa

    XMLWordPrintable

Details

    Description

      All of

      FLUSH QUERY_RESPONSE_TIME
      FLUSH QUERY_RESPONSE_TIME_READ
      FLUSH QUERY_RESPONSE_TIME_WRITE
      FLUSH QUERY_RESPONSE_TIME_READ_WRITE
      

      appear to do the same, flush everything, both read and write statistics.
      It is reasonable for FLUSH QUERY_RESPONSE_TIME_READ_WRITE and FLUSH QUERY_RESPONSE_TIME, but it seems very counter-intuitive that FLUSH QUERY_RESPONSE_TIME_WRITE would also flush read statistics, and vice versa.

      install soname 'query_response_time';
       
      create table t1 (a int);
       
      set query_response_time_session_stats=on;
      insert into t1 values (1);
      insert into t1 values (2);
      select * from t1;
      select sum(count) from information_schema.query_response_time_read;
      select sum(count) from information_schema.query_response_time_write;
      flush query_response_time_write;
      select sum(count) from information_schema.query_response_time_read;
      select sum(count) from information_schema.query_response_time_write;
       
      # Cleanup
      drop table t1;
      uninstall soname 'query_response_time';
      

      bb-11.5-MDEV-33501-query-response-time 2b35d7c1bcb069428e7fe86a3ce39110df8df4e8

      select sum(count) from information_schema.query_response_time_read;
      sum(count)
      2
      select sum(count) from information_schema.query_response_time_write;
      sum(count)
      2
      flush query_response_time_write;
      select sum(count) from information_schema.query_response_time_read;
      sum(count)
      0
      select sum(count) from information_schema.query_response_time_write;
      sum(count)
      0
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.