I was able to fix this -- unfortunately the fix is in MySQLdb.  You
need to set an option to auto-reconnect on the C-layer MYSQL object,
and as far as I can tell MySQLdb does not expose an interface into
python to do this.

The essential part of the solution is to make the following call after
the mysql_real_connect() in
_mysql.c:_mysql_ConnectionObject_Initialize():

                my_bool bool = 1;
                mysql_options(conn, MYSQL_OPT_RECONNECT, &bool);

I'll submit a patch to MySQLdb at sourceforge that exposes an interface
for this, so that the behavior may be controlled by SQLObject/TG.  If
anyone wants this patch (which is a bit long to post due to all the
C/python API stuff), just send an email.

Paul
--
Paul Eastham       [EMAIL PROTECTED]       http://pauleastham.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to