Bug #35122 | Escape characters printed in output when using client in silent mode | ||
---|---|---|---|
Submitted: | 6 Mar 2008 16:40 | Modified: | 22 Apr 2008 17:28 |
Reporter: | Gregory Haase | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.0.45, 5.0.56 | OS: | Linux |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
Tags: | backslash, batch, raw, silent |
[6 Mar 2008 16:40]
Gregory Haase
[6 Mar 2008 20:11]
Valeriy Kravchuk
Thank you for a bug report. I have much simpler test case: C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -uroot -proot -P3308 test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.0.56-enterprise-gpl-nt MySQL Enterprise Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select '\\'; +---+ | \ | +---+ | \ | +---+ 1 row in set (0.00 sec) mysql> exit Bye C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -uroot -proot -s -P3308 test mysql> select '\\'; \ \\ mysql> If the above is intended behaviour of -s mode, it should be documented at http://dev.mysql.com/doc/refman/5.0/en/mysql-command-options.html#option_mysql_silent
[25 Mar 2008 20:47]
Chad MILLER
I think this isn't a bug. Unescaped output is delimited by the table-layout bracketing, but in switching to silent, you lose borders and data/metadata identity unless its data is interpreted and represented as a logical chunk. Newlines, tabs, NULs, and backslash all are interpreted and escaped, so a reader can know what is what in the output. The correct solution is to add --raw or -r to the command line, which tells the client not to interpret and escape special characters. The documentation should get an additional note that "silent" is like "batch" in that it may often be used with "raw".
[22 Apr 2008 14:05]
Paul DuBois
Appears to be a documentation bug. Categorizing that way and assigning to myself.
[22 Apr 2008 17:28]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products. Updated the descriptions for the --silent, --raw, and --batch options. Gave example of various output formats in --raw option description.