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

    XMLWordPrintable

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

          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.