I have something odd happening with a bulk insert file and haven't been able
to find anything in docs or archives that gives me a clue what's going on.
I'm creating a bulk insert file programmatically with Python.  Everything
seems to work fine, except that in the last field of each record, a return
character ('\n') is getting tacked onto the field data.  I'm using LOAD DATA
INFILE's defaults -- tab-separated fields and return-separated records.  I
cannot figure out where this extra return is coming from.  It seems
downright impossible for it to be there, since MySQL is correctly
identifying the fields and records -- there are no warnings from LOAD DATA
INFILE and I can see that all the records are being loaded.

I've tried changing the Python statement between ending the print statement
with "'\n'," and just letting it add the return as it does by default if
there's no comma at the end of the statement -- no effect.

I have also tried loading the bulk file from the MySQL client -- same thing
happens.

I'm as certain as I can be that Python is just putting one return character
into the insert file, which is why I'm asking the question here, rather than
on a Python list.

I'm having flashbacks to CR/LF problems when moving Macintosh files to DOS!

This is on Windows 2000, using Python 2.2 and MySQL 3.23.46-nt.

That last field also seems to be truncated on the last record inserted.  I'm
mystified.  Suggestions appreciated.

Nick


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to