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

SUM_ROWS_SENT => wrong value

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.11.15
    • None
    • Server
    • None

    Description

      You can simply reproduce with the internal query :

      SELECT * FROM `sys` . `statements_with_temp_tables`;
      

      The number of SUM_ROWS_SENT is not accurate and mess up with my monitoring : 6 148 914 691 236 517 205

      MariaDB [pmacontrol]> select * from performance_schema.events_statements_summary_by_digest where sum_rows_sent > 500000000\G
      *************************** 1. row ***************************
                      SCHEMA_NAME: pmacontrol
                           DIGEST: fe37cd99539625fc7da88356f6bb891e
                      DIGEST_TEXT: SELECT * FROM `sys` . `statements_with_temp_tables` 
                       COUNT_STAR: 1
                   SUM_TIMER_WAIT: 1600861000
                   MIN_TIMER_WAIT: 1600861000
                   AVG_TIMER_WAIT: 1600861000
                   MAX_TIMER_WAIT: 1600861000
                    SUM_LOCK_TIME: 169000000
                       SUM_ERRORS: 0
                     SUM_WARNINGS: 0
                SUM_ROWS_AFFECTED: 0
                    SUM_ROWS_SENT: 6148914691236517205
                SUM_ROWS_EXAMINED: 168
      SUM_CREATED_TMP_DISK_TABLES: 0
           SUM_CREATED_TMP_TABLES: 0
             SUM_SELECT_FULL_JOIN: 0
       SUM_SELECT_FULL_RANGE_JOIN: 0
                 SUM_SELECT_RANGE: 0
           SUM_SELECT_RANGE_CHECK: 0
                  SUM_SELECT_SCAN: 1
            SUM_SORT_MERGE_PASSES: 0
                   SUM_SORT_RANGE: 0
                    SUM_SORT_ROWS: 33
                    SUM_SORT_SCAN: 1
                SUM_NO_INDEX_USED: 1
           SUM_NO_GOOD_INDEX_USED: 0
                       FIRST_SEEN: 2025-11-16 15:54:07
                        LAST_SEEN: 2025-11-16 15:54:07
      1 row in set (0,001 sec)
      

      After I opened the view to know exactly where we go the problem :
      you can simply reproduce with :

      SELECT `sys` . `format_time` ( `performance_schema` . `events_statements_summary_by_digest` . `SUM_TIMER_WAIT` ) AS `total_latency` FROM `performance_schema` . `events_statements_summary_by_digest`
      

      There is an overflow somewhere, I know it's old but could be really cool to fix it.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Aurelien_LEQUOY Aurélien LEQUOY
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.