python-mysqldb silently drops exceptions on deadlocks

Bug #588859 reported by Eskil Heyn Olsen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQLdb
Invalid
Undecided
Unassigned
python-mysqldb (Debian)
Invalid
Undecided
Unassigned
python-mysqldb (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: python-mysqldb

There is a missing check in _mysql.c _mysql_ResultObject_Initialize, where a failed SELECT that ends in a deadlock, returns a NULL from mysql_store result, but according to http://dev.mysql.com/doc/refman/5.0/en/null-mysql-store-result.html, you have to check errno or num_fields afterwards.

Not doing this, causes exceptions to be silently dropped.

Here's a similar bugreport http://sourceforge.net/tracker/?func=detail&aid=2776267&group_id=22307&atid=374932

Attached is a patch that fixes the problem in _mysql.c. It was made against 1.2.3, but applies to 1.2.2 with some fuzz.

Patch has also been submitted to python-mysqldb at sourceforge (http://sourceforge.net/tracker/?func=detail&aid=3008217&group_id=22307&atid=374934) and for debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584260)

Revision history for this message
Eskil Heyn Olsen (eskil) wrote :
tags: added: patch
tags: added: patch-forwarded-debian patch-forwarded-upstream
Changed in python-mysqldb (Debian):
status: Unknown → New
Revision history for this message
dino99 (9d9) wrote :

This version has expired

Changed in python-mysqldb (Ubuntu):
status: New → Invalid
Changed in python-mysqldb:
importance: Unknown → Undecided
status: Unknown → New
Changed in python-mysqldb (Debian):
importance: Unknown → Undecided
status: New → Invalid
Changed in python-mysqldb:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.