Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions views/p_s/metrics_56.sql
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
-- +-----------------------------------------------+-------------------------...+--------------------------------------+---------+
-- 565 rows in set, 1 warning (0.02 sec)

EXECUTE IMMEDIATE CONCAT("
CREATE OR REPLACE
ALGORITHM = TEMPTABLE
DEFINER = 'root'@'localhost'
Expand All @@ -91,7 +92,9 @@ SELECT LOWER(VARIABLE_NAME) AS Variable_name, VARIABLE_VALUE AS Variable_value,
) UNION ALL (
SELECT NAME AS Variable_name, COUNT AS Variable_value,
CONCAT('InnoDB Metrics - ', SUBSYSTEM) AS Type,
IF(STATUS = 'enabled', 'YES', 'NO') AS Enabled
IF(",
IF(version() REGEXP '10\.[1-4].*',"STATUS = 'enabled'", "ENABLED"),
", 'YES', 'NO') AS Enabled
FROM information_schema.INNODB_METRICS
-- Deduplication - some variables exists both in GLOBAL_STATUS and INNODB_METRICS
-- Keep the one from GLOBAL_STATUS as it is always enabled and it's more likely to be used for existing tools.
Expand All @@ -109,4 +112,4 @@ SELECT 'NOW()' AS Variable_name, NOW(3) AS Variable_value, 'System Time' AS Type
) UNION ALL (
SELECT 'UNIX_TIMESTAMP()' AS Variable_name, ROUND(UNIX_TIMESTAMP(NOW(3)), 3) AS Variable_value, 'System Time' AS Type, 'YES' AS Enabled
)
ORDER BY Type, Variable_name;
ORDER BY Type, Variable_name");