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 62c8c8c

Browse filesBrowse files
authored
call mysql_library_init in module initialization (PyMySQL#377)
1 parent 8e9d759 commit 62c8c8c
Copy full SHA for 62c8c8c

File tree

Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed

‎MySQLdb/_mysql.c

Copy file name to clipboardExpand all lines: MySQLdb/_mysql.c
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,6 +2643,15 @@ init_mysql(void)
26432643
{
26442644
PyObject *dict, *module, *emod, *edict;
26452645

2646+
if (mysql_library_init(0, NULL, NULL)) {
2647+
PyErr_SetString(PyExc_ImportError, "_mysql: mysql_library_init failed");
2648+
#ifdef IS_PY3K
2649+
return NULL;
2650+
#else
2651+
return;
2652+
#endif
2653+
}
2654+
26462655
#ifdef IS_PY3K
26472656
if (PyType_Ready(&_mysql_ConnectionObject_Type) < 0)
26482657
return NULL;

0 commit comments

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