Menu

#64 SELECT FOR UPDATE sometimes quietly drops lock timeouts

MySQLdb
open
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

  • Eskil Olsen

    Eskil Olsen - 2010-05-27
     
  • 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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.