Description:
The doc says:
Modifications to the setup_consumers table affect monitoring immediately.
But disabling events_stages_current consumer does not affect the collect information from performance_schema.events_stages_current table.
How to repeat:
mysql(Session-1)> update performance_schema.setup_consumers set enabled = 'YES' where name = 'events_stages_current';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql(Session-1)> select * from performance_schema.setup_consumers;
+----------------------------------+---------+
| NAME | ENABLED |
+----------------------------------+---------+
| events_stages_current | YES |
| events_stages_history | NO |
| events_stages_history_long | NO |
| events_statements_cpu | NO |
| events_statements_current | YES |
| events_statements_history | YES |
| events_statements_history_long | NO |
| events_transactions_current | YES |
| events_transactions_history | YES |
| events_transactions_history_long | NO |
| events_waits_current | NO |
| events_waits_history | NO |
| events_waits_history_long | NO |
| global_instrumentation | YES |
| thread_instrumentation | YES |
| statements_digest | YES |
+----------------------------------+---------+
16 rows in set (0.00 sec)
mysql(Session-2)> create index ix_t1 on test.t10 (tcol01,tcol02,tcol28);
mysql(Session-1)> select * FROM performance_schema.events_stages_current;
+-----------+----------+--------------+------------------------------------------------------+----------------+-----------------+-----------------+---------------+----------------+----------------+------------------+--------------------+
| THREAD_ID | EVENT_ID | END_EVENT_ID | EVENT_NAME | SOURCE | TIMER_START | TIMER_END | TIMER_WAIT | WORK_COMPLETED | WORK_ESTIMATED | NESTING_EVENT_ID | NESTING_EVENT_TYPE |
+-----------+----------+--------------+------------------------------------------------------+----------------+-----------------+-----------------+---------------+----------------+----------------+------------------+--------------------+
| 55 | 19 | NULL | stage/innodb/alter table (read PK and internal sort) | ut0stage.h:311 | 355895815294000 | 358099391998000 | 2203576704000 | 14032 | 33696 | 17 | STATEMENT |
+-----------+----------+--------------+------------------------------------------------------+----------------+-----------------+-----------------+---------------+----------------+----------------+------------------+--------------------+
1 row in set (0.00 sec)
mysql(Session-1)> update performance_schema.setup_consumers set enabled = 'NO' where name = 'events_stages_current';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql(Session-1)> select * from performance_schema.setup_consumers;
+----------------------------------+---------+
| NAME | ENABLED |
+----------------------------------+---------+
| events_stages_current | NO |
| events_stages_history | NO |
| events_stages_history_long | NO |
| events_statements_cpu | NO |
| events_statements_current | YES |
| events_statements_history | YES |
| events_statements_history_long | NO |
| events_transactions_current | YES |
| events_transactions_history | YES |
| events_transactions_history_long | NO |
| events_waits_current | NO |
| events_waits_history | NO |
| events_waits_history_long | NO |
| global_instrumentation | YES |
| thread_instrumentation | YES |
| statements_digest | YES |
+----------------------------------+---------+
16 rows in set (0.00 sec)
mysql(Session-2)> create index ix_t1 on test.t10 (tcol01,tcol02,tcol28);
mysql(Session-1)> select * FROM performance_schema.events_stages_current;
+-----------+----------+--------------+------------------------------------------------------+----------------+-----------------+-----------+------------+----------------+----------------+------------------+--------------------+
| THREAD_ID | EVENT_ID | END_EVENT_ID | EVENT_NAME | SOURCE | TIMER_START | TIMER_END | TIMER_WAIT | WORK_COMPLETED | WORK_ESTIMATED | NESTING_EVENT_ID | NESTING_EVENT_TYPE |
+-----------+----------+--------------+------------------------------------------------------+----------------+-----------------+-----------+------------+----------------+----------------+------------------+--------------------+
| 55 | 27 | 27 | stage/innodb/alter table (read PK and internal sort) | ut0stage.h:449 | 422239913373000 | NULL | 0 | 19838 | 41377 | 30 | STATEMENT |
+-----------+----------+--------------+------------------------------------------------------+----------------+-----------------+-----------+------------+----------------+----------------+------------------+--------------------+
1 row in set (0.00 sec)