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

userstats - wrong user statistics

    XMLWordPrintable

Details

    Description

      At least bytes_received can be wrong. In function update_global_user_stats_with_user:

      user_stats->bytes_received+= (thd->org_status_var.bytes_received-
                                      thd->start_bytes_received);

      thd->start_bytes_received is set in do_command(), but it is not called if thd_prepare_connection() fails.

      cpu_time looks strange also...

      select USER, CONNECTED_TIME, BUSY_TIME, CPU_TIME, BYTES_RECEIVED from information_schema.user_statistics where user = 'cacti';
      +-------+----------------+--------------------+-------------------+---------------------+
      | USER  | CONNECTED_TIME | BUSY_TIME          | CPU_TIME          | BYTES_RECEIVED      |
      +-------+----------------+--------------------+-------------------+---------------------+
      | cacti |             46 | 0.3571019999999954 | 692552.4628808994 | 9223372036854775807 |
      +-------+----------------+--------------------+-------------------+---------------------+

      Attachments

        Activity

          People

            serg Sergei Golubchik
            pomyk Patryk Pomykalski
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.