List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 22 1999 9:03pm
Subject:importing a large dump file
View as plain text  
>>>>> "Greg" == Greg Dickson <witchy@stripped> writes:

Greg> I am tring to import a dump file with over 1064 lines in it 
Greg> I keep getting syntax error reports for line 1064 

Greg> The dump file has both update and insert lines in it
Greg> if I try and insert the individual line itself there are no problems it
Greg> happens when I try to pipe the file into the database with <

Greg> Has anyone got any ideas on this

Greg> Thanks Greg

Thanks for providing us with the file.  When I tried this with MySQL
3.23.3 I got:

(/my/data/mysql) mysql test2 < /tmp/radacct.dump.sql
ERROR 1064 at line 1275: You have an error in your SQL syntax near '1999-6-21
22:54:37",inbytes=0,outbytes=0 WHERE id="00000255" AND server="203.57.' at line 1

I checked the line 1275:

UPDATE usertime SET time_on=0, stop_time="1999-6-21 22:53:34",inbytes=0,outbytes=0 WHERE
id="00000254" AND server="" AND name="\";

The problem with the above line is that the last string is not
complete !

This will force MySQL to read many rows, until it finds a matching the 
start of the string again!  The last string should probably be "";

After fixing the above row (and removing the last 'broken row in the test I
got from you) everything worked nicely.

importing a large dump fileGreg Dickson16 Sep
  • importing a large dump fileMichael Widenius18 Sep
  • importing a large dump fileMichael Widenius23 Sep