MySQL Forums
Forum List  »  Perl

10MB Insert Issue
Posted by: west barnes
Date: April 26, 2006 12:26PM

Hello-

I am having an issue inserting the contents of a text file that I first parse and then attempt to insert.

Originally I was attempting to create a single insert statement to do the job but I decided to try multiple smaller inserts when I couldn't seem to get around an "Out of Memory" error.

Here's where I'm stuck. I wrote a function that breaks the single insert query into multiple inserts of a specified size (ex - 1MB). When I attempt to do the multiple inserts the first insert seems to always work but some of the subsequent inserts fails with this error:

DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''BH' at line 1 at /usr/opt/perl5/lib/site_perl/5.8.0/aix-thread-multi/Mysql.pm line 175, <IN> chunk 1.

However, if I take any of the failed chunks and attempt to insert it by itself, there is no problem (thus it can't really be a syntax error).

I have tried breaking the query into chunks as small at .0125MB and as large as 5MB. The same issue occurs in either case.

Any help with this issue would be appreciated.

I am using MySQL 5.0 on an AIX box connecting with DBD::MySQL 3.0 via a perl script.

Thank you!
West

Options: ReplyQuote


Subject
Written By
Posted
10MB Insert Issue
April 26, 2006 12:26PM
April 26, 2006 12:59PM
April 26, 2006 01:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.