Bug #71956 Manual does not explain how to work with P_S.setup_actors table
Submitted: 6 Mar 2014 11:22 Modified: 7 Mar 2014 17:02
Reporter: Valeriy Kravchuk Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: Paul Dubois CPU Architecture:Any
Tags: missing manual, performance_schema, setup_actors

[6 Mar 2014 11:22] Valeriy Kravchuk
Description:
Unfortunately manual (http://dev.mysql.com/doc/refman/5.6/en/setup-actors-table.html) does NOT explain how to work properly with setup_actors table. 

Normally if you want to change something related to setup in P_S you have to apply UPDATE to some columns. This does not work with setup_actors - one can only INSERT new rows and DELETE existing ones. Try to find anything about that in the manual.

How to repeat:
mysql> select * from performance_schema.setup_actors;
+------+------+------+
| HOST | USER | ROLE |
+------+------+------+
| %    | %    | %    |
| %    | root | %    |
+------+------+------+
2 rows in set (0.00 sec)

mysql> update performance_schema.setup_actors set user='root' where user='%';
ERROR 1683 (HY000): Invalid performance_schema usage.
mysql> insert into performance_schema.setup_actors values('%','user1','%');
Query OK, 1 row affected (0.04 sec)

mysql> delete from performance_schema.setup_actors where user='user1';
Query OK, 1 row affected (0.00 sec)

mysql> select * from performance_schema.setup_actors;
+------+------+------+
| HOST | USER | ROLE |
+------+------+------+
| %    | %    | %    |
| %    | root | %    |
+------+------+------+
2 rows in set (0.00 sec)

Suggested fix:
Explain proper usage in the manual. Surely one can just try and find out, or check some nice presentation like:

http://www.slideshare.net/SvetaSmirnova/performance-schema-for-mysql-troubleshooting

but basic things like this should be explicitly explained in the manual.

Optionally, make error message more useful in case of UPDATE.
[6 Mar 2014 12:28] Umesh Shastry
Hello Valeriy,

Thank you for the bug report.

Thanks,
Umesh
[7 Mar 2014 17:02] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

The page in question has a link to this section:
http://dev.mysql.com/doc/refman/5.6/en/performance-schema-pre-filtering.html
which explains various types of event filtering. One subsection describes setup_actors
use. I'll link to that more specific subsection instead:
http://dev.mysql.com/doc/refman/5.6/en/performance-schema-pre-filtering.html#performance-s...