This is an option that needs to be set at mysqld startup.
The variable is called max_allowed_packet, and is default to 1mb.

By increasing this everything works as expected.

The message "MySQL server has gone away" normally happens if the
connection is closed, or the query is larger than max_allowed_packet.

Perhaps this could be mentioned in the wiki?

-Simen

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Simen Haugen
Sent: 10. august 2006 19:16
To: Dabo Users list
Subject: RE: [dabo-users] Adding blobs

Ok. It seems I get an error only on files over 1mb, and this is a
timeout? "2006, MySQL server has gone away". I also had some cryptic
error messages when trying to add a too large blob. The MySQLdb
wait_timeout has to be set at creation of the connection?

In order to add a blob you have to do a MySQLdb.escape_string() on the
field containing binary data.

-Simen

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ed Leafe
Sent: 10. august 2006 18:33
To: Dabo Users list
Subject: Re: [dabo-users] Adding blobs

On Aug 10, 2006, at 12:23 PM, Simen Haugen wrote:

> Is there a way of adding blobs with dabo?
> It breaks at cursors.py:273.

        AFAIK, it has never been tested. So my guess would be that no,
it  
doesn't work now.

> I get it to work if I assign the query to MySQLdb.Binary(query). Is
> there another way of dealing with this? This also works on ordinary
> types, but I assume there's a large performance issue involved (I
> haven't checked)

        If you find out more information, we could possibly add that as
an  
option: for MySQLdb first, and then to other backends. Instead of the  
default cursor, we could be sure to instantiate a binary-aware  
cursor. As long as it follows the dbapi, it should work with only  
minor tweaks on our end.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to