Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6
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.
|