You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
YZWL/IDEA/sys/ps_setup_disable_background...

31 lines
776 B

create
definer = `mysql.sys`@localhost procedure sys.ps_setup_disable_background_threads() comment '
Description
-----------
Disable all background thread instrumentation within Performance Schema.
Parameters
-----------
None.
Example
-----------
mysql> CALL sys.ps_setup_disable_background_threads();
+--------------------------------+
| summary |
+--------------------------------+
| Disabled 18 background threads |
+--------------------------------+
1 row in set (0.00 sec)
' sql security invoker modifies sql data
BEGIN
UPDATE performance_schema.threads
SET instrumented = 'NO'
WHERE type = 'BACKGROUND';
SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' background thread', IF(@rows != 1, 's', '')) AS summary;
END;