Edgewall Software
Modify

Ticket #5783 (closed defect: fixed)

Opened 3 years ago

Last modified 2 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:

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 2 years ago by cboos

  • Keywords mysql added
  • Owner changed from jonas to cboos
  • Status changed from new to assigned
  • Milestone set to 0.10.5

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

comment:2 Changed 2 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 2 years ago by cboos

  • Status changed from assigned to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.