we're trying to track down a particularily icky bug
that seems to be somewhere between our application code
and MySQL-python-test 1.1.7. I'll give as much detail
as possible and continue to leave comments as I find
Our setup is as follows:
Arch is i386 and we've seen this issue on Red Hat 7.3
and Red Hat ES 3.0 systems. I know that Python 2.2
isn't supported but unfortunately we're stuck with it
at the moment.
Our application caches MySQLdb connections to many
different database servers and some connections are
opened and closed while others remain intact. The issue
only happens on connection 'A' if a connection 'B' has
been closed before the query is issued on 'A'.
Unfortunately I haven't been able to make a test case
to demonstrate it.
The problem happens in _mysql_string_literal. On line
826 of _mysql.c is the check "if (self)" followed on
line 827 by "check_connection(self)". It seems that in
some cases self is set but check_connection fails. On
the Python side an exception InterfaceError: (0, '') is
I can work around the problem by changing line 826 to
"if (self && self->open)" however I'm not sure if
that's just working around a bigger problem. Is it
acceptable for self to be set and be closed in this
function? If so, could you make the change to _mysql.c
to handle this case?
Log in to post a comment.