mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-36993: Format log for srv_mon_reset_all
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/no_valgrind_without_big.inc
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Cannot reset all values for monitor counter");
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_monitor_reset_all=all;
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_monitor_reset_all=default;
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/have_sequence.inc
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Cannot reset all values for monitor counter");
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_monitor_reset_all=all;
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_monitor_reset_all=default;
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
# sys_vars.innodb_monitor_enable_basic
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Cannot reset all values for monitor counter");
|
||||
--enable_query_log
|
||||
|
||||
select name, if(enabled,'enabled','disabled') status
|
||||
from information_schema.innodb_metrics;
|
||||
|
||||
|
||||
@@ -826,13 +826,9 @@ void
|
||||
srv_mon_reset(
|
||||
/*==========*/
|
||||
monitor_id_t monitor); /*!< in: monitor id*/
|
||||
/*************************************************************//**
|
||||
This function resets all values of a monitor counter */
|
||||
UNIV_INLINE
|
||||
void
|
||||
srv_mon_reset_all(
|
||||
/*==============*/
|
||||
monitor_id_t monitor); /*!< in: monitor id*/
|
||||
|
||||
/** This function resets all values of a monitor counter */
|
||||
void srv_mon_reset_all(monitor_id_t monitor) noexcept;
|
||||
/*************************************************************//**
|
||||
Turn on monitor counters that are marked as default ON. */
|
||||
void
|
||||
|
||||
@@ -92,22 +92,3 @@ srv_mon_calc_min_since_start(
|
||||
|
||||
return(MONITOR_MIN_VALUE_START(monitor));
|
||||
}
|
||||
|
||||
/*************************************************************//**
|
||||
This function resets all values of a monitor counter */
|
||||
UNIV_INLINE
|
||||
void
|
||||
srv_mon_reset_all(
|
||||
/*==============*/
|
||||
monitor_id_t monitor) /*!< in: monitor id */
|
||||
{
|
||||
/* Do not reset all counter values if monitor is still on. */
|
||||
if (MONITOR_IS_ON(monitor)) {
|
||||
fprintf(stderr, "InnoDB: Cannot reset all values for"
|
||||
" monitor counter %s while it is on. Please"
|
||||
" turn it off and retry.\n",
|
||||
srv_mon_get_name(monitor));
|
||||
} else {
|
||||
MONITOR_RESET_ALL(monitor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ Created 12/9/2009 Jimmy Yang
|
||||
#include "srv0srv.h"
|
||||
#include "trx0rseg.h"
|
||||
#include "trx0sys.h"
|
||||
#include "log.h"
|
||||
|
||||
/* Macro to standardize the counter names for counters in the
|
||||
"monitor_buf_page" module as they have very structured defines */
|
||||
@@ -1271,6 +1272,18 @@ srv_mon_set_module_control(
|
||||
}
|
||||
}
|
||||
|
||||
/** Reset all values.
|
||||
@param monitor monitor identifier */
|
||||
void srv_mon_reset_all(monitor_id_t monitor) noexcept
|
||||
{
|
||||
if (MONITOR_IS_ON(monitor))
|
||||
sql_print_warning("InnoDB: Cannot reset all values for monitor counter '%s' "
|
||||
"while it is on. Please turn it off and retry.",
|
||||
srv_mon_get_name(monitor));
|
||||
else
|
||||
MONITOR_RESET_ALL(monitor);
|
||||
}
|
||||
|
||||
/****************************************************************//**
|
||||
Get transaction system's rollback segment size in pages
|
||||
@return size in pages */
|
||||
|
||||
Reference in New Issue
Block a user