List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:December 29 1999 10:54pm
Subject:Re: Tiny typo in doc's. Maybe.
View as plain text  
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:

/my/data/rows.txt
/my/data/test/rows2.txt

You can read the first file with:

LOAD DATA INFILE "./rows.txt" ...
or
LOAD DATA INFILE "/my/data/rows.txt" ...

and the second file with:

USE test;
LOAD DATA INFILE "rows2.txt" ...
or
LOAD DATA INFILE "./test/rows2.txt"
or
LOAD DATA INFILE "/my/data/test/rows2.txt" ...

Your are welcome to improve the explanation in the manual :)

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.)
>> >
>> > Ref: www.mysql.net/Manual_chapter/manual_Reference.html#LOAD_DATA
>> >
>> > Hope this helps ... oh, and BTW do you want tidbits like this on the
>> > mailing list, or should I go
>> > somewhere else. (So to speak.)
>> >
>> > Ta,
>> > James.
>> >
>> 
>> HI!
>> 
>> It is not superfluous. Why do you think so ??
>> 
>> Regards,
>> 
>> Sinisa
>> 
>> +----------------------------------------------------------------------+
>> | TcX  ____  __     _____   _____  ___     ==  mysql@stripped            |
>> |     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
>> |    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped     |
>> |   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
>> |  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
>> |  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
>> |             /*/             \*\                Developers Team       |
>> +----------------------------------------------------------------------+
>> 
>> --
>> ---------------------------------------------------------------------
>> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>> posting. To request this thread, e-mail mysql-thread22374@stripped
>> 
>> To unsubscribe, send a message to:
>> <mysql-unsubscribe-paul=snake.net@stripped>


Paul> -- 
Paul> Paul DuBois, paul@stripped
Thread
Tiny typo in doc's. Maybe.James Lyon29 Dec
  • Re: Tiny typo in doc's. Maybe.sinisa29 Dec
    • Re: Tiny typo in doc's. Maybe.Paul DuBois29 Dec
      • Re: Tiny typo in doc's. Maybe.Michael Widenius30 Dec
        • Re: Tiny typo in doc's. Maybe.Paul DuBois30 Dec
          • Re: Tiny typo in doc's. Maybe.Michael Widenius30 Dec
  • Re: Tiny typo in doc's. Maybe.James Lyon30 Dec
    • RE: Tiny typo in doc's. Maybe.John Zook30 Dec
      • Re: Tiny typo in doc's. Maybe.James Lyon30 Dec
    • Re: Tiny typo in doc's. Maybe.Paul DuBois30 Dec