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.8from
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.
b162fd9 to
7e768b4
Compare
gkodinov
left a comment
There was a problem hiding this comment.
LGTM after fixing the name.
Stand by for the final review please.
050ff57 to
f65fe01
Compare
@amodhakal Thanks. I've removed 11.4 from the Community Server version list. 11.8 Is the first CS affected version. That said, MariaDB Enterprise Server 11.4 is affected. @gkodinov @vuvova please note the need to push to ES 11.4, if so desired. Thanks |
f65fe01 to
cfd0152
Compare
cfd0152 to
3e2bc5a
Compare
raghunandanbhat
left a comment
There was a problem hiding this comment.
@amodhakal, thanks for the contribution.
We already have lot of test files, I'd like you to move this test into one of those instead of creating a new one. May be mysql-interactive.test
3e2bc5a to
31f9fdc
Compare
|
The following tests are failing in CI:
Based on my investigation, I couldn't find a connection or a reason why they should be failing. Glad to hear if there's something I'm missing. |
raghunandanbhat
left a comment
There was a problem hiding this comment.
I tested the fix manually on GNOME terminal. While the mtr test passes (likely because of socat & pty), the artifcat stage done remains on the CLI output.
here's the output from my terminal-
MariaDB [tdb]> create table t (c int) engine=innodb;
Query OK, 0 rows affected (0.023 sec)
MariaDB [tdb]> repair table t;
+-------+------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-------+------+----------+----------+
| tdb.t | repair | status | OK | stage done
+-------+------+----------+----------+
1 row in set (0.021 sec)
@amodhakal, are you seeing this on your terminal too?
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>
31f9fdc to
e1761bd
Compare
|
raghunandanbhat I've moved all includes to the top of the file. Regarding the stray stage done in the output: I wasn't able to reproduce this on macOS (Ghostty terminal), and another reviewer also couldn't reproduce it. Could you share your environment? That would help me find and resolve the issue. |
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