Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3829

"show create table" is messing up the result format

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 10.0.0, 5.5.28, 5.3.8, 5.2.12, 5.1.62
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
    • 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

      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

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            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.

            Show
            elenst Elena Stepanova added a comment - 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.

              People

              • Assignee:
                Unassigned
                Reporter:
                leo.unglaub Leo Unglaub
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: