freebsd-ports/databases/py-MySQLdb/files/patch-_mysql.c
Clement Laforet 2624ec2552 - Use OPTIONS and add various knob [1]
- Fix build with mysql-client-5.0.x [2]
- Pass maintainership to submitter of [1]

PRs:            ports/72656 [1],
                ports/70082 [2]
Submitted by:   Marcus Grando <marcus@corp.grupos.com.br> [1],
                Roman Bogorodskiy <bogorodskiy@inbox.ru> [2]
2004-11-28 21:43:52 +00:00

21 lines
688 B
C

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 >= 40103 && MYSQL_VERSION_ID < 50000
+ 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);