Skip to content

Commit 1a9874b

Browse files
authored
raise InterfaceError when mysql_errno() returns 0 (PyMySQL#203)
1 parent bab17ed commit 1a9874b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

_mysql.c

+3
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ _mysql_Exception(_mysql_ConnectionObject *c)
112112
}
113113
merr = mysql_errno(&(c->connection));
114114
switch (merr) {
115+
case 0:
116+
e = _mysql_InterfaceError;
117+
break;
115118
case CR_COMMANDS_OUT_OF_SYNC:
116119
case ER_DB_CREATE_EXISTS:
117120
case ER_SYNTAX_ERROR:

0 commit comments

Comments
 (0)