diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 75aa423b2ac..3cf86c3d358 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -2304,7 +2304,6 @@ row_merge_sort( { const ulint half = file->offset / 2; ulint num_runs; - ulint cur_run = 0; ulint* run_offset; dberr_t error = DB_SUCCESS; DBUG_ENTER("row_merge_sort"); @@ -2328,18 +2327,16 @@ row_merge_sort( of file marker). Thus, it must be at least one block. */ ut_ad(file->offset > 0); - thd_progress_init(trx->mysql_thd, num_runs); + thd_progress_init(trx->mysql_thd, 1); /* Merge the runs until we have one big run */ do { - cur_run++; - error = row_merge(trx, dup, file, block, tmpfd, &num_runs, run_offset); /* Report progress of merge sort to MySQL for show processlist progress field */ - thd_progress_report(trx->mysql_thd, cur_run, num_runs); + thd_progress_report(trx->mysql_thd, file->offset - num_runs, file->offset); if (error != DB_SUCCESS) { break; diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc index 3447d15ed1c..12c38fdfc2f 100644 --- a/storage/xtradb/row/row0merge.cc +++ b/storage/xtradb/row/row0merge.cc @@ -2312,7 +2312,6 @@ row_merge_sort( { const ulint half = file->offset / 2; ulint num_runs; - ulint cur_run = 0; ulint* run_offset; dberr_t error = DB_SUCCESS; DBUG_ENTER("row_merge_sort"); @@ -2336,18 +2335,16 @@ row_merge_sort( of file marker). Thus, it must be at least one block. */ ut_ad(file->offset > 0); - thd_progress_init(trx->mysql_thd, num_runs); + thd_progress_init(trx->mysql_thd, 1); /* Merge the runs until we have one big run */ do { - cur_run++; - error = row_merge(trx, dup, file, block, tmpfd, &num_runs, run_offset); /* Report progress of merge sort to MySQL for show processlist progress field */ - thd_progress_report(trx->mysql_thd, cur_run, num_runs); + thd_progress_report(trx->mysql_thd, file->offset - num_runs, file->offset); if (error != DB_SUCCESS) { break;