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

Engine info in slow log in 10.6 uses MY_TIMER_ROUTINE_CYCLES which is is present from 10.11

Details

    Description

      (Found this when investigating which versions/binaries were affected by MDEV-34125. The problem of that MDEV was not observable on last versions of 10.6 before the fix: 10.6.17 or 10.6.18)

      In 10.6, sql_analyze_stmt.h has:

      static inline double timer_tracker_frequency()
      {
      #if (MY_TIMER_ROUTINE_CYCLES)
        return static_cast<double>(sys_timer_info.cycles.frequency);
      #else
        return static_cast<double>(sys_timer_info.microseconds.frequency);
      #endif
      }
      

      The only uses of MY_TIMER_ROUTINE_CYCLES are:

      ./storage/innobase/include/mariadb_stats.h:77:#if (MY_TIMER_ROUTINE_CYCLES)
      ./sql/sql_analyze_stmt.h:44:#if (MY_TIMER_ROUTINE_CYCLES)
      ./sql/sql_analyze_stmt.h:68:#if (MY_TIMER_ROUTINE_CYCLES)
      

      They all were added by this commit:

      commit 99bd22605938c42d876194f2ec75b32e658f00f5
      Author: Monty <monty@mariadb.org>
      Date:   Fri Jul 7 08:38:55 2023 +0300
       
          MDEV-31558 Add InnoDB engine information to the slow query log
          
      

      MY_TIMER_CYCLES was introduced only in 10.11 by this patch:

      commit 55cf4194f91262234eda1fabd380484894b1a5a7 (HEAD)
      Author: Daniel Black <daniel@mariadb.org>
      Date:   Thu Feb 9 16:55:54 2023 +1100
       
          MDEV-30411: Fix my_timer_init() to match the code in as my_timer_cycles()
          
          make the compile-time logic in my_timer_cycles() also #define
          MY_TIMER_ROUTINE_CYCLES to indicate which implementation it is using.
          Then, make my_timer_init() use MY_TIMER_ROUTINE_CYCLES.
      

      Attachments

        Activity

          psergei Sergei Petrunia created issue -
          psergei Sergei Petrunia made changes -
          Field Original Value New Value
          Description (Found this when investigating which versions/binaries were affected by MDEV-34125. The problem of that MDEV was not observable on last versions of 10.6 before the fix: 10.6.17 or 10.6.18) (Found this when investigating which versions/binaries were affected by MDEV-34125. The problem of that MDEV was not observable on last versions of 10.6 before the fix: 10.6.17 or 10.6.18)

          In 10.6, {{sql_analyze_stmt.h}} has:
          {code:cpp}
          static inline double timer_tracker_frequency()
          {
          #if (MY_TIMER_ROUTINE_CYCLES)
            return static_cast<double>(sys_timer_info.cycles.frequency);
          #else
            return static_cast<double>(sys_timer_info.microseconds.frequency);
          #endif
          }
          {code}

          The only uses of MY_TIMER_ROUTINE_CYCLES are:
          {code}
          ./storage/innobase/include/mariadb_stats.h:77:#if (MY_TIMER_ROUTINE_CYCLES)
          ./sql/sql_analyze_stmt.h:44:#if (MY_TIMER_ROUTINE_CYCLES)
          ./sql/sql_analyze_stmt.h:68:#if (MY_TIMER_ROUTINE_CYCLES)
          {code}

          They all were added by this commit:
          {code}
          commit 99bd22605938c42d876194f2ec75b32e658f00f5
          Author: Monty <monty@mariadb.org>
          Date: Fri Jul 7 08:38:55 2023 +0300

              MDEV-31558 Add InnoDB engine information to the slow query log
              
          {code}
          psergei Sergei Petrunia made changes -
          Description (Found this when investigating which versions/binaries were affected by MDEV-34125. The problem of that MDEV was not observable on last versions of 10.6 before the fix: 10.6.17 or 10.6.18)

          In 10.6, {{sql_analyze_stmt.h}} has:
          {code:cpp}
          static inline double timer_tracker_frequency()
          {
          #if (MY_TIMER_ROUTINE_CYCLES)
            return static_cast<double>(sys_timer_info.cycles.frequency);
          #else
            return static_cast<double>(sys_timer_info.microseconds.frequency);
          #endif
          }
          {code}

          The only uses of MY_TIMER_ROUTINE_CYCLES are:
          {code}
          ./storage/innobase/include/mariadb_stats.h:77:#if (MY_TIMER_ROUTINE_CYCLES)
          ./sql/sql_analyze_stmt.h:44:#if (MY_TIMER_ROUTINE_CYCLES)
          ./sql/sql_analyze_stmt.h:68:#if (MY_TIMER_ROUTINE_CYCLES)
          {code}

          They all were added by this commit:
          {code}
          commit 99bd22605938c42d876194f2ec75b32e658f00f5
          Author: Monty <monty@mariadb.org>
          Date: Fri Jul 7 08:38:55 2023 +0300

              MDEV-31558 Add InnoDB engine information to the slow query log
              
          {code}
          (Found this when investigating which versions/binaries were affected by MDEV-34125. The problem of that MDEV was not observable on last versions of 10.6 before the fix: 10.6.17 or 10.6.18)

          In 10.6, {{sql_analyze_stmt.h}} has:
          {code:cpp}
          static inline double timer_tracker_frequency()
          {
          #if (MY_TIMER_ROUTINE_CYCLES)
            return static_cast<double>(sys_timer_info.cycles.frequency);
          #else
            return static_cast<double>(sys_timer_info.microseconds.frequency);
          #endif
          }
          {code}

          The only uses of MY_TIMER_ROUTINE_CYCLES are:
          {code}
          ./storage/innobase/include/mariadb_stats.h:77:#if (MY_TIMER_ROUTINE_CYCLES)
          ./sql/sql_analyze_stmt.h:44:#if (MY_TIMER_ROUTINE_CYCLES)
          ./sql/sql_analyze_stmt.h:68:#if (MY_TIMER_ROUTINE_CYCLES)
          {code}

          They all were added by this commit:
          {code}
          commit 99bd22605938c42d876194f2ec75b32e658f00f5
          Author: Monty <monty@mariadb.org>
          Date: Fri Jul 7 08:38:55 2023 +0300

              MDEV-31558 Add InnoDB engine information to the slow query log
              
          {code}

          MY_TIMER_CYCLES was introduced only in 10.11 by this patch:

          {code}
          commit 55cf4194f91262234eda1fabd380484894b1a5a7 (HEAD)
          Author: Daniel Black <daniel@mariadb.org>
          Date: Thu Feb 9 16:55:54 2023 +1100

              MDEV-30411: Fix my_timer_init() to match the code in as my_timer_cycles()
              
              make the compile-time logic in my_timer_cycles() also #define
              MY_TIMER_ROUTINE_CYCLES to indicate which implementation it is using.
              Then, make my_timer_init() use MY_TIMER_ROUTINE_CYCLES.
          {code}
          psergei Sergei Petrunia made changes -
          Affects Version/s 10.6 [ 24028 ]
          psergei Sergei Petrunia made changes -
          Component/s Optimizer [ 10200 ]
          psergei Sergei Petrunia made changes -
          Labels analyze-stmt
          psergei Sergei Petrunia made changes -
          Fix Version/s 10.6 [ 24028 ]
          psergei Sergei Petrunia made changes -
          Assignee Michael Widenius [ monty ]
          psergei Sergei Petrunia made changes -
          Summary Mess with MY_TIMER_ROUTINE_CYCLES Engine info in slow log in 10.6 uses MY_TIMER_ROUTINE_CYCLES which is is present from 10.11

          People

            monty Michael Widenius
            psergei Sergei Petrunia
            Votes:
            1 Vote for this issue
            Watchers:
            3 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.