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

User Statistics does not correctly reflect concurrent_connections

    XMLWordPrintable

    Details

      Description

      User Statistics does not correctly reflect concurrent_connections:

      SQL> SET GLOBAL userstat=1;
      SQL> SELECT @@userstat, @@performance_schema;
      +------------+----------------------+
      | @@userstat | @@performance_schema |
      +------------+----------------------+
      |          1 |                    1 |
      +------------+----------------------+
       
      SQL> SHOW PROCESSLIST;
      +----+-------------+-----------+------+---------+------+--------------------------+------------------+----------+
      | Id | User        | Host      | db   | Command | Time | State                    | Info             | Progress |
      +----+-------------+-----------+------+---------+------+--------------------------+------------------+----------+
      | 10 | root        | localhost | NULL | Query   |    0 | Init                     | SHOW PROCESSLIST |    0.000 |
      | 16 | app         | localhost | test | Sleep   |   38 |                          | NULL             |    0.000 |
      | 17 | app         | localhost | test | Sleep   |   36 |                          | NULL             |    0.000 |
      | 18 | root        | localhost | NULL | Sleep   |   34 |                          | NULL             |    0.000 |
      | 19 | root        | localhost | NULL | Sleep   |   31 |                          | NULL             |    0.000 |
      +----+-------------+-----------+------+---------+------+--------------------------+------------------+----------+
       
      SQL> SELECT user, total_connections, concurrent_connections FROM information_schema.USER_STATISTICS;
      +-------------+-------------------+------------------------+
      | user        | total_connections | concurrent_connections |
      +-------------+-------------------+------------------------+
      | app         |                 2 |                      0 |
      | root        |                 3 |                      0 |
      +-------------+-------------------+------------------------+
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            oli Oli Sennhauser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: