Re: long string

2004-04-21 Thread Egor Egorov
[EMAIL PROTECTED] wrote:
> hi,
>   I am trying to enter a genome sequence into mysql database. I have created 
> a database in mysql as:
> 
> create table sequence(seq blob);
> 
> the length of my sequence is approx. 170.
> 
> this is the error i get whe i run my python script:
> 
> OperationalError: (2006, 'MySQL server has gone away')
> 
> i am not sure what is wrong.

Check values of wait_timeout, max_allowed_packet variables:
http://dev.mysql.com/doc/mysql/en/Gone_away.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




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



long string

2004-04-20 Thread lga2
hi,
   I am trying to enter a genome sequence into mysql database. I have created 
a database in mysql as:

create table sequence(seq blob);

the length of my sequence is approx. 170.

this is the error i get whe i run my python script:

OperationalError: (2006, 'MySQL server has gone away')

i am not sure what is wrong.

Liz

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



error when inserting long string from cgi

2003-12-04 Thread NAPPER,RACHEL DAWN
Hi there,

I am attempting to insert a string into a longtext field (from a CGI
program using the C API) and I keep getting an error message. The string
is not that long actually, 78,069 characters. (Originally this was
mediumtext, but I changed it to longtext as I debugged this problem.)

The command is:
INSERT INTO my_table_name (integer_field, longtext_field) VALUES (24144,
"x24144(5000)14799:1.00~23534:1.00~...24114:1.00~")

The error message is:
MySQL error inserting data in save_neighbors_of_favorites: You have an
error in your SQL syntax near
'"x23973(5000)79397:1.00~92558:1.00~216160:1.00~263178:1.00~27521'
at line 1.

The error occurs when the string I want to insert has about 2000 or more
characters. The error goes away when the string is shorter than that.

So this seems to be a problem with the length of the string. I keep thinking
that the syntax error is caused because the INSERT command is being
truncated because it's too long. I have tried resetting the net_buffer_size
and max_allowed_packet variables. Currently, net_buffer_size is set to
1,407,552 and max_allowed_packet is 3,144,704. (Actually, I tried to set
both to 3M doing /usr/bin/safe_mysqld  -O max_allowed_packet=3145728 -O
net_buffer_length=3145728 &
but end up being the sizes I listed above. Maybe I am doing something wrong
here?)

I am running MySQL 3.23.58 on Red Hat 8.0 with 128M of memory.

I don't think any of the non-integer characters need to be escaped. I have
tried escaping the string anyway just in case using mysql_escape_string()
(I know I'm supposed to use mysql_real_eascape_string(), but for some
reason it
causes my program to seg fault) and I get the same error.


I would very much appreciate any help or suggestions.
Thanks!
Rachel


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