[Python-modules-team] Bug#678169: python-mysqldb: fails to connect to mysql.
Eldon Koyle
ekoyle at gmail.com
Fri Mar 8 00:52:49 UTC 2013
Package: python-mysqldb
Version: 1.2.3-1+b1
Tags: patch
Followup-For: Bug #678169
Here is the patch from upstream.
svn diff -r 654:656 svn://svn.code.sf.net/p/mysql-python/svn/
Index: branches/MySQLdb-1.2/MySQLdb/_mysql.c
===================================================================
--- branches/MySQLdb-1.2/MySQLdb/_mysql.c (revision 654)
+++ branches/MySQLdb-1.2/MySQLdb/_mysql.c (revision 656)
@@ -100,6 +100,10 @@
#define check_server_init(x) if (!_mysql_server_init_done) _mysql_server_init_done = 1
#endif
+#if MYSQL_VERSION_ID >= 50500
+#define HAVE_OPENSSL 1
+#endif
+
PyObject *
_mysql_Exception(_mysql_ConnectionObject *c)
{
@@ -381,6 +385,10 @@
self->result = result;
Py_END_ALLOW_THREADS ;
if (!result) {
+ if (mysql_field_count(&(conn->connection)) > 0) {
+ _mysql_Exception(conn);
+ return -1;
+ }
self->converter = PyTuple_New(0);
return 0;
}
More information about the Python-modules-team
mailing list