Package: python-mysqldb<div>Version: 1.2.2-10</div><div><br></div><div>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 <a href="http://dev.mysql.com/doc/refman/5.0/en/null-mysql-store-result.html">http://dev.mysql.com/doc/refman/5.0/en/null-mysql-store-result.html</a>, you have to check errno or num_fields afterwards.</div>
<div><br></div><div>Not doing this, causes exceptions to be silently dropped.</div><div><br></div><div>Here's a similar bugreport <a href="http://sourceforge.net/tracker/?func=detail&aid=2776267&group_id=22307&atid=374932">http://sourceforge.net/tracker/?func=detail&aid=2776267&group_id=22307&atid=374932</a></div>
<div><br></div><div>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.</div><div><br></div><div>Patch has also been submitted to python-mysqldb at sourceforge.<br>
<span class="Apple-style-span" style="font-family: Times; font-size: medium; "><code></code></span><div><br>-- <br>eskil<br>---<br>
</div></div>