Skip to content

Commit e8ffcf5

Browse files
committed
Bug#20685859 ENABLE STAGES WITH PROGRESS BY DEFAULT FOR EASE OF USE
Before this fix, every "stage/%" instrument is disabled by default. With this fix, stage instruments that provide online progress monitoring are enabled and timed by default. The list of stage instruments with online progress is currently: - stage/sql/copy to tmp table - stage/innodb/alter table (end) - stage/innodb/alter table (flush) - stage/innodb/alter table (insert) - stage/innodb/alter table (log apply index) - stage/innodb/alter table (log apply table) - stage/innodb/alter table (merge sort) - stage/innodb/alter table (read PK and internal sort) - stage/innodb/buffer pool load
1 parent 388bfd4 commit e8ffcf5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

storage/perfschema/pfs_instr_class.cc

+14-2
Original file line numberDiff line numberDiff line change
@@ -1388,8 +1388,20 @@ PFS_stage_key register_stage_class(const char *name,
13881388
init_instr_class(entry, name, name_length, flags, PFS_CLASS_STAGE);
13891389
entry->m_prefix_length= prefix_length;
13901390
entry->m_event_name_index= index;
1391-
entry->m_enabled= false; /* disabled by default */
1392-
entry->m_timed= false;
1391+
1392+
if (flags & PSI_FLAG_STAGE_PROGRESS)
1393+
{
1394+
/* Stages with progress information are enabled and timed by default */
1395+
entry->m_enabled= true;
1396+
entry->m_timed= true;
1397+
}
1398+
else
1399+
{
1400+
/* Stages without progress information are disabled by default */
1401+
entry->m_enabled= false;
1402+
entry->m_timed= false;
1403+
}
1404+
13931405
/* Set user-defined configuration options for this instrument */
13941406
configure_instr_class(entry);
13951407
PFS_atomic::add_u32(&stage_class_allocated_count, 1);

0 commit comments

Comments
 (0)