Re: mysql and SELECT ... INTO OUTFILE 'file_name'

2010-01-07 Thread Aristotle Pagaltzis
* Nicholas Clark n...@ccl4.org [2010-01-06 14:50]: At which point *the server* writes the output file into the directory that holds the database itself. So this can overwrite the database itself? Or some of its tables, or whatever is stored as separate files in the on-disk structure of a

Re: mysql and SELECT ... INTO OUTFILE 'file_name'

2010-01-07 Thread Nicholas Clark
On Thu, Jan 07, 2010 at 06:39:19AM +0100, Aristotle Pagaltzis wrote: * Nicholas Clark n...@ccl4.org [2010-01-06 14:50]: At which point *the server* writes the output file into the directory that holds the database itself. So this can overwrite the database itself? Or some of its tables,

mysql and SELECT ... INTO OUTFILE 'file_name'

2010-01-06 Thread Nicholas Clark
So, mysql has an extension of SELECT, INTO OUTFILE 'file_name' This is great. Until you use a relative filename for file_name. (For example, their example). At which point *the server* writes the output file into the directory that holds the database itself. Which, you don't notice. Until you

Re: mysql and SELECT ... INTO OUTFILE 'file_name'

2010-01-06 Thread Peter da Silva
system. FTFM: PostgreSQL: COPY with a file name instructs the PostgreSQL server to directly read from or write to a file. The file must be accessible to the server and the name must be specified from the viewpoint of the server. MySQL: The SELECT ... INTO OUTFILE 'file_name' form of SELECT