On 6/24/09 11:44 AM, Michael Widenius wrote:
> Hi!
>
>>>>>> "Davi" == Davi Arnaut<Davi.Arnaut@stripped> writes:
>
> Davi> Hi Paul,
> Davi> On 6/13/09 12:09 PM, Paul DuBois wrote:
>>>
> http://dev.mysql.com/doc/refman/5.1/en/error-messages-server.html#error_er_cant_create_file:
>
> Davi> BTW, this page does not list errors declared within the mysys library,
> Davi> yet the server might return some of then to a client.
>
> Davi> The list of mysys errors is declared in include/mysys_err.h and the
> Davi> messages in mysys/errors.c (there is also some bits in mysys/errors.c).
>
>>> Error: 1004 SQLSTATE: HY000 (ER_CANT_CREATE_FILE)
>>>
>>> Message: Can't create file '%s' (errno: %d)
>>>
>>>
>>> Likely cause:
>>> * Server trying to create file in which it has no write permission?
>>> * What else?
>
> Davi> Currently, this error can only be thrown when copying a .frm file over
> Davi> to a new location fails. More precisely, it can only be thrown during
> Davi> the execution of a CREATE TABLE dst LIKE src statement when the server
> Davi> tries to copy the source table .frm file to the destination table .frm
> file.
>
> Actually it can happen for any 'create file' event that the server
> executes.
>
> Some examples:
>
> - For a storage handler that uses MySQL (like MyISAM) when creating a file
> - When creating a log or trace file
> - SELECT into outfile
You mean something like the above?
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1);
SELECT * INTO OUTFILE 'dir-does-not-exist/t1' from t1;