mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 19:31:54 +08:00
Finally chased down an ugly memory leak in _mysql. Tested with a script
I got from mxODBC author Marc-Andre Lemburg, which revealed the leak in the first place. Added a connection.rollback() method that always raises an OperationalError, since MySQL doesn't have transactions. connection.commit() still succeeds without doing anything.
This commit is contained in:
@ -25,7 +25,10 @@ class Cursor:
|
||||
self.result = None
|
||||
self.arraysize = None
|
||||
self.warnings = 1
|
||||
|
||||
|
||||
## def __del__(self):
|
||||
## self.result = None
|
||||
##
|
||||
def setinputsizes(self, size): pass
|
||||
|
||||
def setoutputsizes(self, size): pass
|
||||
@ -115,6 +118,8 @@ class Connection:
|
||||
self.db.close()
|
||||
|
||||
def commit(self): pass
|
||||
|
||||
def rollback(self): raise OperationalError, "transactions not supported"
|
||||
|
||||
def cursor(self, name=''):
|
||||
return self.CursorClass(self, name)
|
||||
|
Reference in New Issue
Block a user