Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1693848

Browse filesBrowse files
authored
Fix compile error with MariaDB 10.2. (PyMySQL#177)
Don't touch MYSQL.reconnect directly.
1 parent f96cb44 commit 1693848
Copy full SHA for 1693848

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎_mysql.c

Copy file name to clipboardExpand all lines: _mysql.c
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,10 @@ _mysql_ConnectionObject_ping(
19081908
int r, reconnect = -1;
19091909
if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
19101910
check_connection(self);
1911-
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
1911+
if (reconnect != -1) {
1912+
my_bool recon = reconnect;
1913+
mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);
1914+
}
19121915
Py_BEGIN_ALLOW_THREADS
19131916
r = mysql_ping(&(self->connection));
19141917
Py_END_ALLOW_THREADS

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.