Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#5783 closed defect (fixed)

mysql connection drop issue, w/ patch

Reported by: amax@… Owned by: Christian Boos
Priority: high Milestone: 0.10.5
Component: general Version: 0.10.4
Severity: normal Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal 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 (0)

Change History (3)

comment:1 by Christian Boos, 17 years ago

Keywords: mysql added
Milestone: 0.10.5
Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

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

comment:2 by Christian Boos, 17 years ago

Priority: normalhigh

Similar error reported in #6806, and the proposed patch appears to work.

comment:3 by Christian Boos, 17 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in r6506 (trunk) and r6507 (0.10.5). Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.