Ticket #5783 (closed defect: fixed)
Opened 5 years ago
Last modified 4 years ago
mysql connection drop issue, w/ patch
| Reported by: | amax@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | high | Milestone: | 0.10.5 |
| Component: | general | Version: | 0.10.4 |
| Severity: | normal | Keywords: | mysql |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
Hi,
We experienced a login defect with the AccountManagerPlugin, whose cause was eventually traced down to db/mysql_backend.py. Because the bug is in trac core, and not the plugin, we are recreating the ticket here. A patch that I believe fixes the issue is here:
http://trac-hacks.org/attachment/ticket/1493/mysql-autologoutbug.patch
The original ticket is here:
http://trac-hacks.org/ticket/1493
It is related to an older bug:
http://trac.edgewall.org/ticket/4802
In MySQLConnection.rollback(), the return value of self.cnx.ping() is checked (cnx is a MySQLdb connection object, IIRC). I believe this is faulty; ping() does not have a defined return value - see http://groups.google.com/group/trac-dev/browse_thread/thread/9c8adb7cf6993500 . While in practice the existing version works for some (or many), the patch above seems to work more universally.
As a data point, we have been using the above patch in our trac here (~10 developers) for over two months now, and it has been holding up well in our heterogenous environment.
Attachments
Change History
comment:1 Changed 4 years ago by cboos
- Keywords mysql added
- Milestone set to 0.10.5
- Owner changed from jonas to cboos
- Status changed from new to assigned
comment:2 Changed 4 years ago by cboos
- Priority changed from normal to high
Similar error reported in #6806, and the proposed patch appears to work.
comment:3 Changed 4 years ago by cboos
- Resolution set to fixed
- Status changed from assigned to closed



oops, I thought I fixed that already, but apparently not.