- Fix build with MySQL 4.1.3

Reported by: 	crappy, thierry
Submitted by:	thierry
Obtained from:	http://sourceforge.net/tracker/index.php?func=detail&aid=998151&group_id=22307&atid=374934
This commit is contained in:
Clement Laforet
2004-07-31 20:13:16 +00:00
parent 0c6a5caf4e
commit 1928b42c5f
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
Index: MySQLdb/_mysql.c
===================================================================
RCS file: /cvsroot/mysql-python/MySQLdb/_mysql.c,v
retrieving revision 1.49
diff -u -r1.49 _mysql.c
--- _mysql.c 7 Jun 2004 03:44:38 -0000 1.49
+++ _mysql.c 26 Jul 2004 16:58:29 -0000
@@ -1542,7 +1542,13 @@
if (!PyArg_ParseTuple(args, "")) return NULL;
check_connection(self);
Py_BEGIN_ALLOW_THREADS
+
+#if MYSQL_VERSION_ID >= 040103
+ r = mysql_shutdown(&(self->connection),
+ SHUTDOWN_DEFAULT);
+#else
r = mysql_shutdown(&(self->connection));
+#endif
Py_END_ALLOW_THREADS
if (r) return _mysql_Exception(self);
Py_INCREF(Py_None);