Bug #101353 Wrong syntax for updating setup_instrument table
Submitted: 28 Oct 2020 10:26 Modified: 2 Nov 2020 11:56
Reporter: Aftab Khan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S2 (Serious)
Version:5.6, 5.7, 8.0 OS:Any
Assigned to: CPU Architecture:Any

[28 Oct 2020 10:26] Aftab Khan
Description:
Instructions to update instrument/consumer tables are wrong:

UPDATE performance_schema.setup_instruments
SET ENABLED = 'YES', TIMED = 'YES'
WHERE NAME = 'stage/%';

UPDATE performance_schema.setup_instruments
SET ENABLED = 'NO', TIMED = 'NO'
WHERE NAME = 'stage/%';

How to repeat:
This will update zero rows e.g.

 UPDATE performance_schema.setup_instruments
    -> SET ENABLED = 'YES', TIMED = 'YES'
    -> WHERE NAME = 'stage/%';
Query OK, 0 rows affected (0.02 sec)
Rows matched: 0  Changed: 0  Warnings: 0

Suggested fix:
UPDATE performance_schema.setup_instruments
SET ENABLED = 'YES', TIMED = 'YES'
WHERE NAME LIKE 'stage/%';

UPDATE performance_schema.setup_instruments
SET ENABLED = 'NO', TIMED = 'NO'
WHERE NAME LIKE 'stage/%';
[28 Oct 2020 10:27] Aftab Khan
https://dev.mysql.com/doc/refman/5.6/en/performance-schema-stage-tables.html
[28 Oct 2020 11:30] MySQL Verification Team
Hello Aftab,

Thank you for the report and feedback.

regards,
Umesh
[2 Nov 2020 11:56] Paul DuBois
Posted by developer:
 
Thanks for spotting this.