[MDEV-3829] "show create table" is messing up the result format Created: 2012-11-02  Updated: 2015-04-03  Resolved: 2015-04-03

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.0.0, 5.5.28, 5.3.8, 5.2.12, 5.1.62
Fix Version/s: N/A

Type: Bug Priority: Trivial
Reporter: Leo Unglaub Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: upstream
Environment:

leo@voyager:~$ uname -a
Linux voyager 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux


Attachments: JPEG File Auswahl_013.jpg    

 Description   

Hey,
if you run a "show create table" query the result is not very well formated. Normaly a column in the result needs just as much space as it's content, but in this special case it takes more that twice of your screen for a smal content.

Please see the screenshots i added you.
Thanks and greetings
Leo



 Comments   
Comment by Elena Stepanova [ 2015-04-03 ]

In fact, it has the exact length of the contents. The problem is that the contents comes with end-of-line symbols, so it's wrapped. It's pretty much like this:

Example from MySQL 5.7.6

mysql> create table t2 (c varchar(32));
Query OK, 0 rows affected (1.01 sec)
 
mysql> insert into t2 values ("a\nb\nc\n");
Query OK, 1 row affected (0.07 sec)
 
mysql> select * from t2;
+--------+
| c      |
+--------+
| a
b
c
 |
+--------+
1 row in set (0.00 sec)

I don't know if it's worth struggling for looking it much better in a console client.
Closing for now as "won't fix", please comment to re-open if disagree.

Generated at Thu Feb 08 06:51:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.