MDEV-38922 Fix cosmetic "stage done" output for REPAIR TABLE#4710
MDEV-38922 Fix cosmetic "stage done" output for REPAIR TABLE#4710amodhakal wants to merge 1 commit intoMariaDB:11.4from
Conversation
|
The fix itself was tested and works, ref https://jira.mariadb.org/browse/MDEV-38922 |
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution! This is a preliminary review.
Please consider adding a regression test. See mysql-interactive.test on how to run CLI in interactive mode (so you'd see the progress reports).
Also, the commit message is somewhat misleading. Or maybe the function naming is: report_progress_end() does not actually print the message. It "erases it" by printing spaces atop of the last message printed.
I'd say that the fix consists of moving report_progress_end() from after the query is executed to after the caching of the resultset (where progress messages might get printed) so that any progress messages printed during the receiving of the resultset would get erased before the result set printing starts.
report_progress_end() erases progress messages by overwriting them with spaces. It was called immediately after query execution, before the result set was fetched. Progress messages can arrive during result fetching, so moving the call to after the result set is cached ensures any such messages are erased before the result set is printed. Signed-off-by: Amodh Dhakal <amodhakal@gmail.com>
b162fd9 to
7e768b4
Compare
The client shows "stage done" immediately after sending the query, before results were fetched. Move report_progress_end() into the result processing path so the message appears only after the stage actually completes.
Meant to fix https://jira.mariadb.org/browse/MDEV-38922