← Back to team overview

maria-discuss team mailing list archive

Re: INFORMATION_SCHEMA.PROCESSLIST values of PROGRESS, STAGE and STAGE_MAX

 

And, to answer your question:

Lately, i did modify mytop (https://mariadb.atlassian.net/browse/MDEV-4476) to use INFORMATION_SCHEMA.PROCESSLIST instead of SHOW PROCESSLIST (when available) to gather running processes informations as it's more flexible and has more informations but the value of the PROGRESS column on both is different, so i wondered if the PROGRESS value on SHOW PROCESSLIST was using a simple formula like this one or something more complex : (STAGE-1)/MAX_STAGE + {decimal progress on the actual stage}/MAX_STAGE
your formula is correct, as

double  total_progress=
 ((stage  -1)  /  (double)  max_stage  *  100.00  +  progress  /  max_stage);

is the formula used.

ian



References