[Phpmyadmin-devel] load data bug

Dan Allen bigredlinux at yahoo.com
Tue Aug 14 22:16:55 CEST 2001


I came across a bug today in the load data from
infile.  I had data in a text file that had rows
terminated with a line feed (\n).  When the query
was executed, it echoed

...LINES TERMINATED BY "\\n"

however, that is incorrect because it is escaping
the \ so that it is not interpreted as a line fed
but literately as "\n"

The problem is, when the line termination
varibable goes into ldi_check.php, it strips the
slashes if magic quote are enabled...and then it
runs the sql_addslashes function, however, this
is not correct...it should only add slashes for
the single quotes and not for the backslashes if
it is backslash \n \r or both...Anyway...check
out the patch to the CVS version

Dan Allen

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: load_data_patch.diff
Type: application/octet-stream
Size: 1020 bytes
Desc: load_data_patch.diff
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20010814/86867fcd/attachment.obj>


More information about the Developers mailing list