Bug #2513 outfile problem
Submitted: 26 Jan 2004 7:40 Modified: 3 Feb 2004 4:00
Reporter: Max Sosnitsky Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:3.23.38 OS:Linux (Linux-Intel)
Assigned to: Victor Vagin CPU Architecture:Any

[26 Jan 2004 7:40] Max Sosnitsky
Description:
Extra chars when selecting into outfile.

How to repeat:
select concat_ws(char(9),a1,a2,a3) into outfile './some' from table;
select concat(a1,char(9),a2,char(9),a3) into outfile './some' from table;

Will insert extra '\' before tabulation. It works fine onscreen, but fails when you try to select into outfile.
I`ve tried several installations - everywhere the same.
I asked my friend to test - the same result with MySQL 4.0.12-nt

Suggested fix:
I don`t know...
It would be better without those '\' 8-)
[26 Jan 2004 12:25] Dean Ellis
Verified with 4.0.18.

SELECT CONCAT_WS('\t', 'ONE', 'TWO') INTO OUTFILE '/tmp/testing' FROM mysql.user;
[3 Feb 2004 4:00] Victor Vagin
symbol '\' is needed to distinguish the '\t' 
from field separator of 'SELECT ... INTO OUTFILE' 
which is '\t' by default 
(take a look at description of FIELDS TERMINATED BY 
clause in the manual)