Bug #77927 sys.ps_setup_reset_to_default fails due to ENABLE/HISTORY column in setup_actors
Submitted: 4 Aug 2015 4:00 Modified: 5 Oct 2015 18:52
Reporter: Jesper wisborg Krogh Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: SYS Schema Severity:S2 (Serious)
Version:5.7.8 OS:Any
Assigned to: CPU Architecture:Any

[4 Aug 2015 4:00] Jesper wisborg Krogh
Description:
http://dev.mysql.com/worklog/task/?id=7800 and http://dev.mysql.com/worklog/task/?id=7795 added the ENABLED and HISTORY columns respectively to the setup_actors table. This means the sys.ps_setup_reset_to_default procedure no longer works.

How to repeat:
mysql> CALL sys.ps_setup_reset_to_default(TRUE);
+--------------------------------------------------------------------------------------------------------------------------+
| status                                                                                                                   |
+--------------------------------------------------------------------------------------------------------------------------+
| Resetting: setup_actors
DELETE FROM performance_schema.setup_actors WHERE NOT (HOST = '%' AND USER = '%' AND ROLE = '%') |
+--------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

+---------------------------------------------------------------------------------------------------+
| status                                                                                            |
+---------------------------------------------------------------------------------------------------+
| Resetting: setup_actors
INSERT IGNORE INTO performance_schema.setup_actors VALUES ('%', '%', '%') |
+---------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

ERROR 1136 (21S01): Column count doesn't match value count at row 1

Suggested fix:
Either explicitly insert 'YES' for the HISTORY column or explicitly list the columns being inserted to (both the HISTORY and ENABLED columns have default values)
[5 Oct 2015 18:52] Paul DuBois
Noted in 5.7.9, 5.8.0 changelogs.

The ENABLED and HISTORY columns that were added to the Performance
Schema setup_actors table in earlier MySQL 5.7 releases caused the
sys schema ps_setup_reset_to_default() stored procedure not to work.