Re: inserting huge string

2004-02-25 Thread vpendleton
Have you changed the interactive_timeout and wait_timeout values?

 Original Message 

On 2/24/04, 4:54:57 PM, [EMAIL PROTECTED] wrote regarding inserting huge 
string:


 hi,
 I am using mysql 4.0.14. I have a table where one of the fields has a
 datatype longblob. What I am trying to do is to enter a genome sequence 
which
 has around 175 characters. the file size is about 1.5MB which is well
 within the longblob size. I am using python to enter the sequence from a 
file
 to the database and the while i am running the python program ,the 
connection
 to the db is lost. So it takes in only around 103500 characters.

 I tried changing the variables in mysql,the max_allowed_packet  using the
 following command:

 set max_allowed_packet=4;

 I tried changing it to max 4G which is the maximum size for longblob. But 
it
 changed to a maximum of 1G.

 Even is it is 1G, the size of the file i am trying to enter is well 
within the
 size of the datatype.

 I am not sure how to enter this huge string. What should I do??

 thanks,
 liz



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



inserting huge string

2004-02-24 Thread lga2
hi,
I am using mysql 4.0.14. I have a table where one of the fields has a 
datatype longblob. What I am trying to do is to enter a genome sequence which 
has around 175 characters. the file size is about 1.5MB which is well 
within the longblob size. I am using python to enter the sequence from a file 
to the database and the while i am running the python program ,the connection 
to the db is lost. So it takes in only around 103500 characters.

I tried changing the variables in mysql,the max_allowed_packet  using the 
following command:

set max_allowed_packet=4;

I tried changing it to max 4G which is the maximum size for longblob. But it 
changed to a maximum of 1G. 

Even is it is 1G, the size of the file i am trying to enter is well within the 
size of the datatype.

I am not sure how to enter this huge string. What should I do??

thanks,
liz



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



re: inserting huge string

2004-02-24 Thread Jeremy March
 What I am trying to do is to enter a genome sequence which has around
 175 characters. the file size is about 1.5MB which is well within
 the longblob size. I am using python to enter the sequence from a file
 to the database and the while i am running the python program ,the
connection to the db is lost. So it takes in only around 103500
characters.

To determine if the problem is with the server you could try inserting
from the command line client:

INSERT INTO your_table (longblob_col) VALUES
(LOAD_FILE('/path/to/yourfile'));

I just tried this and I could only get it to work if the file was in the
mysql data directory and had world readable permissions, but I could
successfully insert 5 MB files into long blobs after I increased
max_allowed_packet.  

If that works then the problem is probably with your python client.

best,
Jeremy


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]