Very minor DB-API compliance fixes.

This commit is contained in:
adustman
2004-12-31 22:34:11 +00:00
parent 6943657d87
commit 34ad168b73
2 changed files with 5 additions and 1 deletions

View File

@@ -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 = []

View File

@@ -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);