MDEV-40551 Copy/Paste friendly output format for MariaDB Command Line Client - #5632
Open
KhaledR57 wants to merge 1 commit into
Open
MDEV-40551 Copy/Paste friendly output format for MariaDB Command Line Client#5632KhaledR57 wants to merge 1 commit into
KhaledR57 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Multiline interactive history loses the \S terminator, and the tests only exercise batch mode.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds the \S statement terminator for tab-separated output without column names.
Changes:
- Adds and implements the
silentclient command. - Prioritizes plain output over table and vertical formats.
- Adds regression cases and expected results.
File summaries
| File | Description |
|---|---|
client/mysql.cc |
Implements \S plain-output handling. |
mysql-test/main/mysql.test |
Adds command behavior tests. |
mysql-test/main/mysql.result |
Records expected test output. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
midenok
requested changes
Sep 9, 2026
midenok
left a comment
Contributor
There was a problem hiding this comment.
Please address Copilot comments and rerequest Copilot review.
KhaledR57
force-pushed
the
bb-main-MDEV-40551
branch
from
September 10, 2026 18:45
ef40d4a to
86f5a4d
Compare
Contributor
Author
|
@midenok for some reason I cannot request another review from copilot |
midenok
approved these changes
Sep 11, 2026
… Client Copy/paste friendly output was only reachable by starting the client with --silent --skip-column-names, which cannot be done from a running interactive session. Add \S, a statement terminator which prints the result of one statement in the tab separated format without column names. com_silent() sets output_plain, opt_silent and column_names around com_go(), then restores them, the same way com_ego() handles vertical. output_plain selects print_tab_data() ahead of the vertical and table branches, so \S gives the same output whether the session was started plainly or with --table, --vertical or --silent. --html and --xml still win, matching \G.
KhaledR57
force-pushed
the
bb-main-MDEV-40551
branch
from
September 11, 2026 11:23
86f5a4d to
9f82c87
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copy/paste friendly output was only reachable by starting the client with
--silent--skip-column-names, which cannot be done from a running interactive session.Add
\S, a statement terminator which prints the result of one statement in the tab separated format without column names.com_silent()setsoutput_plain,opt_silentandcolumn_namesaroundcom_go(), then restores them, the same waycom_ego()handles vertical.output_plainselectsprint_tab_data()ahead of the vertical and table branches, so\Sgives the same output whether the session was started plainly or with--table,--verticalor--silent.--htmland--xmlstill win, matching\G.