Bug #11229 | excape characters not written correctly to outfile in SELECT INTO OUTFILE | ||
---|---|---|---|
Submitted: | 10 Jun 2005 8:53 | Modified: | 22 Aug 2005 7:18 |
Reporter: | Kai Sautter (Basic Quality Contributor) | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.x | OS: | Linux (Suse Linux and Win XP) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[10 Jun 2005 8:53]
Kai Sautter
[13 Jun 2005 8:33]
Vasily Kishkin
Could you please provide the definition of table ?
[21 Jun 2005 9:40]
Vasily Kishkin
According to mysql documentation both scripts store right results into files. Please read URL: http://dev.mysql.com/doc/mysql/en/string-syntax.html
[22 Jun 2005 8:31]
Kai Sautter
I had a look at the documentation quoted in your answer. It describes the results I also would expect. Yet the results I get deviate, at least to my understanding. I have done it with two very simple examples: Example 1: select 'bla\tbla' as ' ' into outfile 'c:/temp/testt.txt'; This should result in the text "bla<tab>bla" being inserted into the file. The actual result is: "bla\ bla", so "bla\<tab>bla". In my interpretation of the documented features, this should either result in "bla<tab>bla" as seen when respesenting the results as table result (without INTO OUTFILE) or in "bla\tbla" (so a fully escaped sequence). The result, we are observing, is a mix of both. Example 2: select 'bla\\tbla' as ' ' into outfile 'c:/temp/testbst.txt'; This should result in the text "bla\tbla" being inserted into the file. The actual result is: "bla\\tbla". This at least is a more predictable result, as it mirrors exacly the input and could be used as input itself again. To conclude, based on the documentation, I can predict the results of example 2 based on the manual, but the result of example 1 is for me not predictable, if I apply the same logic as for example 2. I still believe that this is a bug.
[22 Aug 2005 7:18]
Sergei Golubchik
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead. Thank you for your interest in MySQL. Additional info: see bug#11959