Progress reporting for ALTER TABLE, LOAD DATA INFILE etc.
This is a feature that I think every MySQL user who has ever waited for an ALTER TABLE to finish has wanted for a long time! I know people who have written scripts to monitor the size of the result files to try to estimate how much an ALTER TABLE has progressed.
Progress reporting means that:
- There is a new column Progress in SHOW PROCESSLIST which shows the total progress (0-100 %)
- INFORMATION_SCHEMA.PROCESSLIST has three new columns which allow you to see in which process stage we are and how much of that stage is completed:
- PROGRESS_DONE (within current stage).
- The client receives out-of-band progress messages which it can display to the user to indicate how long the command will take!
MariaDB [test]> alter table my_mail engine=maria;
Stage: 1 of 2 'copy to tmp table' 5.37% of stage done
MariaDB 5.3 also includes a modified mytop which shows progress for the running commands.
This feature is now pending a review. It will be pushed into MariaDB 5.3 tomorrow.
You can find a full documentation of this feature in the knowledgebase.