List:Bugs« Previous MessageNext Message »
From:Peter Zaitsev Date:May 16 2003 7:16am
Subject:Re: mysql client and "\n" character in data
View as plain text  
On Fri, 2003-05-16 at 11:06, SaGu wrote:
> Hello,
>   because mysql have no "requests" mailling list I've decided to write here.
> 
> If in data occurs "\n" (new line) character mysql command line client (mysql or
> mysql.exe)
> shows result as

> 
> mysql>select 'a' s ,'b\nc' n;
> +---+-----+
> | s | n   |
> +---+-----+
> | a | b
> c |
> +---+-----+
> 1 row in set (0.00 sec)
> 
> I think that it would be nicer and clearer if the same result would be displayed as:
> 
> +---+-----+
> | s | n   |
> +---+-----+
> | a | b   |
> |   | c   |
> +---+-----+


This does not looks like solution good in general, as the latest result
correspond to 2 rows (with empty column s)  not  single row as you get
on the first place. This is not what you would like to do. You might 
like /G formating better in case you're using a lot of multiple line
strings.

> 
> Would it be difficult to implement such behavior?

MySQL is OpenSource so you can take a look at sources of  mysql.c and
patch it for your needs if you find it useful.  


-- 
Are you MySQL certified?, http://www.mysql.com/certification/
    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /   Peter Zaitsev <peter@stripped>
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
 /_/  /_/\_, /___/\___\_\___/   Moscow, Russia
        <___/   www.mysql.com   

Thread
mysql client and "\n" character in dataSaGu16 May
  • Re: mysql client and "\n" character in dataPeter Zaitsev16 May