You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 28, 2024. It is now read-only.
Merge pull request #91 from JesperWisborgKrogh/dev/remove_metrics_56
Changing to metrics_56.sql is only used for MySQl 5.6 and will have the name metrics for all versions. This can be done as 5.7.9+ will support performance_schema.global_status for all configurations. Updated diagnostics() to always use metrics except when performance_schema = OFF in 5.7 as metrics requires the Performance_Schema engine to be available in 5.7.
*performance_schema.global_status (information_schema.GLOBAL_STATUSin MySQL 5.6)
1313
1313
*information_schema.INNODB_METRICS
1314
-
* Performance Schema global memory usage information
1314
+
* Performance Schema global memory usage information (only in MySQL 5.7)
1315
1315
* Current time
1316
1316
1317
-
The difference between the metrics and the metrics_56 views are whether the global status is taken fromperformance_schema.global_status instead of
1318
-
from the Information Schema. Use the metrics view if the MySQL version is 5.6, 5.7.5and earlier, or5.7.6-5.7.8 with show_compatibility_56 = OFF. Otherwise use metrics_56.
1319
-
See also https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_show_compatibility_56
1320
-
1321
-
In MySQL 5.7.6and later the metrics_56 view will generate a warning that INFORMATION_SCHEMA.GLOBAL_STATUS is deprecated.
1317
+
In MySQL 5.7 it is required that performance_schema =ON, though there is no requirements to which
1318
+
instruments and consumers that are enabled. See also the description of the Enabled column below.
-- memory instrumentation available in 5.7.2 and later
111
-
UNION ALL (
112
-
SELECT 'memory_current_allocated' AS Variable_name, SUM(CURRENT_NUMBER_OF_BYTES_USED) AS Variable_value, 'Performance Schema' AS Type,
113
-
IF((SELECT COUNT(*) FROM performance_schema.setup_instruments WHERE NAME LIKE 'memory/%' AND ENABLED = 'YES') = 0, 'NO',
114
-
IF((SELECT COUNT(*) FROM performance_schema.setup_instruments WHERE NAME LIKE 'memory/%' AND ENABLED = 'YES') = (SELECT COUNT(*) FROM performance_schema.setup_instruments WHERE NAME LIKE 'memory/%'), 'YES',
115
-
'PARTIAL')) AS Enabled
116
-
FROM performance_schema.memory_summary_global_by_event_name
117
107
) UNION ALL (
118
-
SELECT 'memory_total_allocated' AS Variable_name, SUM(SUM_NUMBER_OF_BYTES_ALLOC) AS Variable_value, 'Performance Schema' AS Type,
119
-
IF((SELECT COUNT(*) FROM performance_schema.setup_instruments WHERE NAME LIKE 'memory/%' AND ENABLED = 'YES') = 0, 'NO',
120
-
IF((SELECT COUNT(*) FROM performance_schema.setup_instruments WHERE NAME LIKE 'memory/%' AND ENABLED = 'YES') = (SELECT COUNT(*) FROM performance_schema.setup_instruments WHERE NAME LIKE 'memory/%'), 'YES',
121
-
'PARTIAL')) AS Enabled
122
-
FROM performance_schema.memory_summary_global_by_event_name
123
-
) */
124
-
UNION ALL (
125
108
SELECT'NOW()'AS Variable_name, NOW(3) AS Variable_value, 'System Time'AS Type, 'YES'AS Enabled
0 commit comments