myqsldb warning problem

Bill Dandreta wjdandreta at worldnet.att.net
Fri Aug 9 21:04:25 CEST 2002


Hi Joshua,

>You need to derive from a db connection that does not raise() on
>errors.   Examine the Mysql module, I have used this quite a lot, and

Thanks for the tip. I tried it and it worked for the smaller update
strings but when I tried with the larger ones I get the following
error:

Error:2006: Mysql server has gone away

I seemed to have resolved that error by updating 1000 records at a
time.

>there are any number of reasons why mysql is 'warning'.  It could be a
>changed field type, or slightly adjusted data, or a index that didn't
>fit.   For most circumstances this is safe to ignore, just read the
>mysqlmodule.py [whatever it's called now], and there is an easy way to
>use the no-warning class. [CursorNW I think, can't remember]

I am quite sure there are no errors in the data because updating one
record at a time gives no warnings or errors but using the same data,
as soon as I start updating the records in groups, warnings start to
show up. (I tried updating 10 records at a time and it still gives
warnings occassionally. ) When I put a huge string (one was over 5 MB)
in cursor.execute(mystring), I get the above message. The 1000 record
update has around 200KB string and it does not give the error (so far)

I suspect either MySQLdb or mysql itself has a problem with block
updates.

Bill



More information about the Python-list mailing list