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

update userstat feature from percona server

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.1.1
    • Component/s: OTHER
    • Labels:
      None

      Description

      update userstat feature from percona server: get the latest version

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            monty Michael Widenius added a comment - - edited

            That feature it's differently implemented in MariaDB and Percona server.
            The MariaDB code originally came from Percona but was enhanced, optimized and fixed before added to MariaDB.
            This means that this task is not to take the Percona code, but to compare the implementations and decide what of the new code Percona has added that makes sense for MariaDB.

            Show
            monty Michael Widenius added a comment - - edited That feature it's differently implemented in MariaDB and Percona server. The MariaDB code originally came from Percona but was enhanced, optimized and fixed before added to MariaDB. This means that this task is not to take the Percona code, but to compare the implementations and decide what of the new code Percona has added that makes sense for MariaDB.
            Hide
            serg Sergei Golubchik added a comment - - edited

            merged TOTAL_SSL_CONNECTIONS columns in CLIENT_STATISTICS and USER_STATISTICS.

            THREAD_STATISTICS table is not merged, because the implementation is somewhat
            dubious:

            • it was supposed to show statistics per connection
            • so it should be one row per connection
            • but it doesn't show who made the connection (user name) or when (timestamp)
            • instead it aggregates per thread id
            • and has columns like
              THREAD_ID Thread ID
              TOTAL_CONNECTIONS The number of connections created from this thread
              CONCURRENT_CONNECTIONS The number of concurrent connections from this thread.
              CONNECTED_TIME The cumulative number of seconds elapsed while there were connections from this thread.
            • but in fact, thread id is never reused in MariaDB, so de facto there is no aggregation, total_connections is always 1, concurrent_connections is always 0, the word "cumulative" is somewhat misleading.
            • So — it suggests aggregation, contains columns that are meaningful for aggregation, but it doesn't aggregate. Was supposed to provide data per connection, but doesn't have essential columns per connection.
            • the last, unlike other userstat tables, this one is hardly ever used.
            Show
            serg Sergei Golubchik added a comment - - edited merged TOTAL_SSL_CONNECTIONS columns in CLIENT_STATISTICS and USER_STATISTICS. THREAD_STATISTICS table is not merged, because the implementation is somewhat dubious: it was supposed to show statistics per connection so it should be one row per connection but it doesn't show who made the connection (user name) or when (timestamp) instead it aggregates per thread id and has columns like THREAD_ID Thread ID TOTAL_CONNECTIONS The number of connections created from this thread CONCURRENT_CONNECTIONS The number of concurrent connections from this thread. CONNECTED_TIME The cumulative number of seconds elapsed while there were connections from this thread. but in fact, thread id is never reused in MariaDB, so de facto there is no aggregation, total_connections is always 1, concurrent_connections is always 0, the word "cumulative" is somewhat misleading. So — it suggests aggregation, contains columns that are meaningful for aggregation, but it doesn't aggregate. Was supposed to provide data per connection, but doesn't have essential columns per connection. the last, unlike other userstat tables, this one is hardly ever used.
            Hide
            serg Sergei Golubchik added a comment -

            with collateral changes: generic support for SHOW and FLUSH for I_S tables

            Show
            serg Sergei Golubchik added a comment - with collateral changes: generic support for SHOW and FLUSH for I_S tables

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                serg Sergei Golubchik
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 6 hours
                  1d 6h