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 269d320

Browse filesBrowse files
authored
MySQL Connector/C 6.1.6 doesn't have mysql_real_escape_string_quote (PyMySQL#111)
While it's MYSQL_VERSION_ID is 50706 and MySQL 5.7.6 has it. Since MySQL 5.7.6 is old milestone version, just drop supporting it. fixes PyMySQL#110
1 parent 4b39e93 commit 269d320
Copy full SHA for 269d320

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎_mysql.c

Copy file name to clipboardExpand all lines: _mysql.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ _mysql_escape_string(
10641064
if (self && PyModule_Check((PyObject*)self))
10651065
self = NULL;
10661066
if (self && self->open) {
1067-
#if MYSQL_VERSION_ID >= 50706
1067+
#if MYSQL_VERSION_ID >= 50707
10681068
len = mysql_real_escape_string_quote(&(self->connection), out, in, size, '\'');
10691069
#else
10701070
len = mysql_real_escape_string(&(self->connection), out, in, size);
@@ -1122,7 +1122,7 @@ _mysql_string_literal(
11221122
out = PyBytes_AS_STRING(str);
11231123
check_server_init(NULL);
11241124
if (self && self->open) {
1125-
#if MYSQL_VERSION_ID >= 50706
1125+
#if MYSQL_VERSION_ID >= 50707
11261126
len = mysql_real_escape_string_quote(&(self->connection), out+1, in, size, '\'');
11271127
#else
11281128
len = mysql_real_escape_string(&(self->connection), out+1, in, size);

0 commit comments

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