Skip to content

Commit 322d126

Browse files
committed
BUG25199131: A warning is thrown while installing the C extension
When using MySQL server versions < 5.7.11, a warning is thrown about an unused variable while installing the C extension. This patch adds a check for the MySQL server version.
1 parent e70b985 commit 322d126

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mysql_capi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,9 @@ MySQL_connect(MySQL *self, PyObject *args, PyObject *kwds)
10321032
unsigned long client_flags= 0;
10331033
unsigned int port= 3306, tmp_uint;
10341034
unsigned int protocol= 0;
1035-
unsigned int ssl_mode;
1035+
#if MYSQL_VERSION_ID >= 50711
1036+
unsigned int ssl_mode;
1037+
#endif
10361038
my_bool abool;
10371039
MYSQL *res;
10381040

0 commit comments

Comments
 (0)