Bug #113146 Column Alignment
Submitted: 20 Nov 2023 13:01 Modified: 9 Dec 2023 16:58
Reporter: Jean-Marc ANDRE Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[20 Nov 2023 13:01] Jean-Marc ANDRE
Description:
echo "SELECT nom FROM collaborateur LIMIT 5;" | mysql -t gfv_dev
+------------+
| nom        |
+------------+
| BEUDIN     |
| DOMENECH   |
| POLLIN     |
| KREISS     |
| NAPOLITANO |
+------------+

When option -N is selected on command line, data is right aligned 

echo "SELECT nom FROM collaborateur LIMIT 5;" | mysql -N -t gfv_dev
+------------+
|     BEUDIN |
|   DOMENECH |
|     POLLIN |
|     KREISS |
| NAPOLITANO |
+------------+

How can i get a left alignment ?

Thank you

How to repeat:
just execute SELECT statement with option -N
[20 Nov 2023 13:44] MySQL Verification Team
Hi Mr. ANDRE,

Thank you for your bug report.

However, this is not a bug.

It is the intended behaviour. It is one of the rare options that force the alignment of the table data to the left. It is there to show that column names headers are missing.

We shall address it in the next release of our Manual.
[20 Nov 2023 13:47] MySQL Verification Team
Verified for 8.0 and higher.
[21 Nov 2023 16:46] Jean-Marc ANDRE
Heelo

Thank you for this quick feedback

i'm suprised because with another version (5.1.63-0+squeeze1), the behavior was different : all data aligned on left even with -N option 

But it is ok : i am going to upgrade my selections

thank you

Best regards

JmA
[22 Nov 2023 10:52] MySQL Verification Team
You are truly welcome.
[9 Dec 2023 16:58] Jon Stephens
Fixed in mysqldoc rev 77452.

Note: The output of mysql is normally left-aligned; --skip-column-names causes it to be right-aligned.

Closed.
[11 Dec 2023 11:10] MySQL Verification Team
Thank you, Jon.