summaryrefslogtreecommitdiff
path: root/databases/py-MySQLdb/files
diff options
context:
space:
mode:
authorBernard Spil <brnrd@FreeBSD.org>2017-07-24 09:43:40 +0000
committerBernard Spil <brnrd@FreeBSD.org>2017-07-24 09:43:40 +0000
commit771335e2e82492985fa4413f1c4e5318d28ae8fc (patch)
tree3d1fb21e97c7e9860d2d700c5a01fdcdb1c53239 /databases/py-MySQLdb/files
parentUpdate puppet-lint to 2.3.0. (diff)
bases/py-MySQLdb: Fix build with MariaDB 10.2.7
With MariaDB 10.2.6 the Connect/C is updated to ~3.0. This means the C interface changed slightly and some functions are changed. - Replace direct struct access with accessor in _mysql.c - Add LICENSE/LICENSE_FILE - Strip Binaries - Remove conflict with itself PR: 219797 Reviewed_by: sunpoet, koobs, brnrd Submitted by: sirl33tname@gmail.com Approved by: koobs (python) Differential Revision: https://reviews.freebsd.org/D11054
Notes
Notes: svn path=/head/; revision=446515
Diffstat (limited to 'databases/py-MySQLdb/files')
-rw-r--r--databases/py-MySQLdb/files/patch-_mysql.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/databases/py-MySQLdb/files/patch-_mysql.c b/databases/py-MySQLdb/files/patch-_mysql.c
index 2f28da8facf4..4eedeb36ded8 100644
--- a/databases/py-MySQLdb/files/patch-_mysql.c
+++ b/databases/py-MySQLdb/files/patch-_mysql.c
@@ -1,7 +1,7 @@
---- _mysql.c.orig 2014-03-18 19:07:07.000000000 +0400
-+++ _mysql.c 2014-03-18 19:07:40.000000000 +0400
-@@ -102,6 +102,10 @@ static int _mysql_server_init_done = 0;
- #define check_server_init(x) if (!_mysql_server_init_done) _mysql_server_init_done = 1
+--- _mysql.c.orig 2014-01-02 19:15:03 UTC
++++ _mysql.c
+@@ -124,6 +124,10 @@ static int _mysql_server_init_done = 0;
+ #define HAVE_MYSQL_OPT_TIMEOUTS 1
#endif
+#if MYSQL_VERSION_ID >= 50500
@@ -11,3 +11,14 @@
PyObject *
_mysql_Exception(_mysql_ConnectionObject *c)
{
+@@ -2002,7 +2006,9 @@ _mysql_ConnectionObject_ping(
+ int r, reconnect = -1;
+ if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
+ check_connection(self);
+- if ( reconnect != -1 ) self->connection.reconnect = reconnect;
++ if (reconnect != -1) {
++ mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &reconnect);
++ }
+ Py_BEGIN_ALLOW_THREADS
+ r = mysql_ping(&(self->connection));
+ Py_END_ALLOW_THREADS