views:

9

answers:

0

Hello folks,

I am loading a large text file into my db through LOAD DATA. The file is about 122,000 lines long. Let alone, The db is designed to be triggered on AFTER INSERT's on that table. What happens exactly is that the query begin executing, keeps executing for like 15-20 mins and then it returns

Error Code: 2013
Lost connection to MySQL server during query

then

Error Code: 2006
MySQL server has gone away

After the errors appear , i re-execute the query and it finishes immediately ;

0 row(s) affected
Records: 122574  Deleted: 0  Skipped: 122574  Warnings: 0

And the table is indeed imported ;

select * from quote
122574 row(s) returned

I am running mysqld 5.1.51 on Mac OS X 10.6.4 and my query is

    LOAD data local INFILE 
        '/Users/ash/quotes/data.txt' 
        INTO TABLE quote fields 
        TERMINATED BY ',' ENCLOSED BY '' LINES TERMINATED BY '\r\n' 
          (quote.date,quote.ticker,quote.open,
           quote.high,quote.low,quote.close,quote.volume,@market) 
          SET market = 'sp';

Really would appreciate any feedback,

Regards