Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#64 SELECT FOR UPDATE sometimes quietly drops lock timeouts

MySQLdb
open
Andy Dustman
MySQLdb (53)
5
2012-09-19
2010-05-27
Eskil Olsen
No

This is an alternate patch for https://sourceforge.net/tracker/?func=detail&aid=2776267&group_id=22307&atid=374932. Instead of adding the checkin python, add it in _mysql.c and use the full _mysql_Exception method.

(yes, I would have added this patch to that bug, but for some reason I cannot comment on that bug).

Discussion

  • rhettg
    rhettg
    2010-05-28

    This is a pretty serious issue.
    The only reason we found it was because we were using cursor.description which is probably not typical.

    This means anyone who is using SELECT FOR UPDATE to prevent duplicate rows (rather than unique indexes) is probably going to have some issues.

    I think this patch is correctly doing what the MySQL docs seem to indicate we should be doing: http://dev.mysql.com/doc/refman/5.0/en/null-mysql-store-result.html