1select * from performance_schema.events_statements_summary_by_user_by_event_name
2where event_name like 'statement/%' limit 1;
3select * from performance_schema.events_statements_summary_by_user_by_event_name
4where event_name='FOO';
5insert into performance_schema.events_statements_summary_by_user_by_event_name
6set event_name='FOO', user='BAR',
7count_star=1, sum_timer_wait=2, min_timer_wait=3,
8avg_timer_wait=4, max_timer_wait=5;
9ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
10update performance_schema.events_statements_summary_by_user_by_event_name
11set count_star=12;
12ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
13update performance_schema.events_statements_summary_by_user_by_event_name
14set count_star=12 where event_name like "FOO";
15ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
16delete from performance_schema.events_statements_summary_by_user_by_event_name
17where count_star=1;
18ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
19delete from performance_schema.events_statements_summary_by_user_by_event_name;
20ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
21LOCK TABLES performance_schema.events_statements_summary_by_user_by_event_name READ;
22ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
23UNLOCK TABLES;
24LOCK TABLES performance_schema.events_statements_summary_by_user_by_event_name WRITE;
25ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
26UNLOCK TABLES;
27#
28# MDEV-25325 column_comment for performance_schema tables
29#
30select column_name, column_comment
31from information_schema.columns
32where table_schema='performance_schema' and table_name='events_statements_summary_by_user_by_event_name';
33column_name	column_comment
34USER	User. Used together with EVENT_NAME for grouping events.
35EVENT_NAME	Event name. Used together with USER for grouping events.
36COUNT_STAR	Number of summarized events
37SUM_TIMER_WAIT	Total wait time of the summarized events that are timed.
38MIN_TIMER_WAIT	Minimum wait time of the summarized events that are timed.
39AVG_TIMER_WAIT	Average wait time of the summarized events that are timed.
40MAX_TIMER_WAIT	Maximum wait time of the summarized events that are timed.
41SUM_LOCK_TIME	Sum of the LOCK_TIME column in the events_statements_current table.
42SUM_ERRORS	Sum of the ERRORS column in the events_statements_current table.
43SUM_WARNINGS	Sum of the WARNINGS column in the events_statements_current table.
44SUM_ROWS_AFFECTED	Sum of the ROWS_AFFECTED column in the events_statements_current table.
45SUM_ROWS_SENT	Sum of the ROWS_SENT column in the events_statements_current table.
46SUM_ROWS_EXAMINED	Sum of the ROWS_EXAMINED column in the events_statements_current table.
47SUM_CREATED_TMP_DISK_TABLES	Sum of the CREATED_TMP_DISK_TABLES column in the events_statements_current table.
48SUM_CREATED_TMP_TABLES	Sum of the CREATED_TMP_TABLES column in the events_statements_current table.
49SUM_SELECT_FULL_JOIN	Sum of the SELECT_FULL_JOIN column in the events_statements_current table.
50SUM_SELECT_FULL_RANGE_JOIN	Sum of the SELECT_FULL_RANGE_JOIN column in the events_statements_current table.
51SUM_SELECT_RANGE	Sum of the SELECT_RANGE column in the events_statements_current table.
52SUM_SELECT_RANGE_CHECK	Sum of the SELECT_RANGE_CHECK column in the events_statements_current table.
53SUM_SELECT_SCAN	Sum of the SELECT_SCAN column in the events_statements_current table.
54SUM_SORT_MERGE_PASSES	Sum of the SORT_MERGE_PASSES column in the events_statements_current table.
55SUM_SORT_RANGE	Sum of the SORT_RANGE column in the events_statements_current table.
56SUM_SORT_ROWS	Sum of the SORT_ROWS column in the events_statements_current table.
57SUM_SORT_SCAN	Sum of the SORT_SCAN column in the events_statements_current table.
58SUM_NO_INDEX_USED	Sum of the NO_INDEX_USED column in the events_statements_current table.
59SUM_NO_GOOD_INDEX_USED	Sum of the NO_GOOD_INDEX_USED column in the events_statements_current table.
60