mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2026-03-13 08:00:02 +08:00
Very minor DB-API compliance fixes.
This commit is contained in:
@@ -29,7 +29,7 @@ class BaseCursor(object):
|
||||
self.connection = connection
|
||||
self.description = None
|
||||
self.rowcount = -1
|
||||
self.arraysize = 100
|
||||
self.arraysize = 1
|
||||
self._executed = None
|
||||
self.lastrowid = None
|
||||
self.messages = []
|
||||
|
||||
@@ -609,6 +609,10 @@ _mysql_ConnectionObject_close(
|
||||
mysql_close(&(self->connection));
|
||||
Py_END_ALLOW_THREADS
|
||||
self->open = 0;
|
||||
} else {
|
||||
PyErr_SetString(_mysql_ProgrammingError,
|
||||
"closing a closed connection");
|
||||
return NULL;
|
||||
}
|
||||
_mysql_ConnectionObject_clear(self);
|
||||
Py_INCREF(Py_None);
|
||||
|
||||
Reference in New Issue
Block a user