Hi!
>>>>> "Paul" == Paul DuBois <paul@stripped> writes:
Paul> At 12:54 AM +0200 1999-12-30, Michael Widenius wrote:
>> Hi!
>>
>>>>>>> "Paul" == Paul DuBois <paul@stripped> writes:
>>
Paul> Actually, this does look incorrect to me, too. Should the filename
Paul> in the LOAD DATA statement be just "data.txt" without a leading dot?
>>
>> What do you mean? I think the explanation isn't that bad...
>>
>> The server starts by doing a 'cd' to the mysql data directory. Any
>> file name, without a path, will automaticly get the current threads
>> data directory before the name. In other words, assuming you have the
>> following files:
<cut>
Paul> The explanation is fine, it's just that the example is incorrect, because
Paul> it's supposed to illustrate that even though the file is being read into
Paul> a table explicitly named as being in db2, the file is read from the data
Paul> directory for db1. At least that's the intent. The filename in the
Paul> example, however ("./data.txt") will be read from the server's data
Paul> directory. I think I'll change the last sentence of the narrative
Paul> before the example to make it clearer what the intent of the example
Paul> is, and fix the example so that it illustrates the intent better.
Ouch, missed the example with db1 and db2; I just concentrated on the
previous paragraph :)
Regards,
Monty
Paul> At 4:43 PM +0200 1999-12-29, <sinisa@stripped> wrote:
>>>> qJames Lyon writes:
>>>> > I think the dox have a superfluous "./" in them as follows: -
>>>> >
>>>> >
>>>> > Note that these rules mean a file given as `./myfile.txt' is
> read
>>>> > from the server's data directory, whereas a file given as
>>>> > `myfile.txt' is read from the database directory of the current
>>>> > database. Note also that for statements such as those below,
>>>> > the file is read from the database directory for db1, not db2:
>>>> >
>>>> > mysql> USE db1;
>>>> > mysql> LOAD DATA INFILE "./data.txt" INTO TABLE
>>>> > db2.my_table;
>>>> >
>>>> >
>>>> > (It appears that the example should refer to just "data.txt"
> instead.)