Lines 1-7
Link Here
|
1 |
--- _mysql.c.orig 2014-03-18 19:07:07.000000000 +0400 |
1 |
--- _mysql.c.orig 2014-01-02 19:15:03 UTC |
2 |
+++ _mysql.c 2014-03-18 19:07:40.000000000 +0400 |
2 |
+++ _mysql.c |
3 |
@@ -102,6 +102,10 @@ static int _mysql_server_init_done = 0; |
3 |
@@ -124,6 +124,10 @@ static int _mysql_server_init_done = 0; |
4 |
#define check_server_init(x) if (!_mysql_server_init_done) _mysql_server_init_done = 1 |
4 |
#define HAVE_MYSQL_OPT_TIMEOUTS 1 |
5 |
#endif |
5 |
#endif |
6 |
|
6 |
|
7 |
+#if MYSQL_VERSION_ID >= 50500 |
7 |
+#if MYSQL_VERSION_ID >= 50500 |
Lines 11-13
Link Here
|
11 |
PyObject * |
11 |
PyObject * |
12 |
_mysql_Exception(_mysql_ConnectionObject *c) |
12 |
_mysql_Exception(_mysql_ConnectionObject *c) |
13 |
{ |
13 |
{ |
|
|
14 |
@@ -2002,7 +2006,9 @@ _mysql_ConnectionObject_ping( |
15 |
int r, reconnect = -1; |
16 |
if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL; |
17 |
check_connection(self); |
18 |
- if ( reconnect != -1 ) self->connection.reconnect = reconnect; |
19 |
+ if (reconnect != -1) { |
20 |
+ mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &reconnect); |
21 |
+ } |
22 |
Py_BEGIN_ALLOW_THREADS |
23 |
r = mysql_ping(&(self->connection)); |
24 |
Py_END_ALLOW_THREADS |