summaryrefslogtreecommitdiff
path: root/storage/innobase/include/ut0stage.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include/ut0stage.h')
-rw-r--r--storage/innobase/include/ut0stage.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/storage/innobase/include/ut0stage.h b/storage/innobase/include/ut0stage.h
index 71ace53cea0..68bcc80aa3c 100644
--- a/storage/innobase/include/ut0stage.h
+++ b/storage/innobase/include/ut0stage.h
@@ -153,7 +153,6 @@ private:
const PSI_stage_info* new_stage);
/** Performance schema accounting object. */
- /* TODO: MySQL 5.7 PSI */
PSI_stage_progress* m_progress;
/** Old table PK. Used for calculating the estimate. */
@@ -205,13 +204,12 @@ ut_stage_alter_t::~ut_stage_alter_t()
return;
}
- /* TODO: MySQL 5.7 PSI: Set completed = estimated before we quit.
+ /* Set completed = estimated before we quit. */
mysql_stage_set_work_completed(
m_progress,
mysql_stage_get_work_estimated(m_progress));
mysql_end_stage();
- */
}
/** Flag an ALTER TABLE start (read primary key phase).
@@ -226,12 +224,10 @@ ut_stage_alter_t::begin_phase_read_pk(
m_cur_phase = READ_PK;
- /* TODO: MySQL 5.7 PSI
m_progress = mysql_set_stage(
srv_stage_alter_table_read_pk_internal_sort.m_key);
mysql_stage_set_work_completed(m_progress, 0);
- */
reestimate();
}
@@ -251,7 +247,7 @@ ut_stage_alter_t::n_pk_recs_inc()
current phase. */
inline
void
-ut_stage_alter_t::inc(ulint)
+ut_stage_alter_t::inc(ulint inc_val)
{
if (m_progress == NULL) {
return;
@@ -265,14 +261,12 @@ ut_stage_alter_t::inc(ulint)
ut_error;
case READ_PK:
m_n_pk_pages++;
-#if 0 /* TODO: MySQL 5.7 PSI */
ut_ad(inc_val == 1);
/* Overall the read pk phase will read all the pages from the
PK and will do work, proportional to the number of added
indexes, thus when this is called once per read page we
increment with 1 + m_n_sort_indexes */
inc_val = 1 + m_n_sort_indexes;
-#endif
break;
case SORT:
multi_factor = m_sort_multi_factor;
@@ -313,9 +307,7 @@ ut_stage_alter_t::inc(ulint)
}
if (should_proceed) {
- /* TODO: MySQL 5.7 PSI
mysql_stage_inc_work_completed(m_progress, inc_val);
- */
reestimate();
}
}
@@ -404,12 +396,10 @@ ut_stage_alter_t::reestimate()
/* During the log table phase we calculate the estimate as
work done so far + log size remaining. */
if (m_cur_phase == LOG_INNODB_TABLE) {
- /* TODO: MySQL 5.7 PSI
mysql_stage_set_work_estimated(
m_progress,
mysql_stage_get_work_completed(m_progress)
+ row_log_estimate_work(m_pk));
- */
return;
}
@@ -433,12 +423,10 @@ ut_stage_alter_t::reestimate()
+ row_log_estimate_work(m_pk);
/* Prevent estimate < completed */
- /* TODO: MySQL 5.7 PSI
estimate = std::max(estimate,
mysql_stage_get_work_completed(m_progress));
mysql_stage_set_work_estimated(m_progress, estimate);
- */
}
/** Change the current phase.
@@ -469,7 +457,6 @@ ut_stage_alter_t::change_phase(
ut_error;
}
- /* TODO: MySQL 5.7 PSI
const ulonglong c = mysql_stage_get_work_completed(m_progress);
const ulonglong e = mysql_stage_get_work_estimated(m_progress);
@@ -477,7 +464,6 @@ ut_stage_alter_t::change_phase(
mysql_stage_set_work_completed(m_progress, c);
mysql_stage_set_work_estimated(m_progress, e);
- */
}
#else /* HAVE_PSI_STAGE_INTERFACE */