Skip to content
/ server Public

MDEV-38922 Fix cosmetic "stage done" output for REPAIR TABLE#4710

Open
amodhakal wants to merge 1 commit intoMariaDB:11.4from
amodhakal:fix/MDEV-38922
Open

MDEV-38922 Fix cosmetic "stage done" output for REPAIR TABLE#4710
amodhakal wants to merge 1 commit intoMariaDB:11.4from
amodhakal:fix/MDEV-38922

Conversation

@amodhakal
Copy link

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

@CLAassistant
Copy link

CLAassistant commented Feb 28, 2026

CLA assistant check
All committers have signed the CLA.

@mariadb-RoelVandePaar
Copy link

The fix itself was tested and works, ref https://jira.mariadb.org/browse/MDEV-38922

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 2, 2026
Copy link
Member

@gkodinov gkodinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@amodhakal amodhakal requested a review from gkodinov March 2, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

4 participants