Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.10
-
None
-
3.8
Description
When closing a cursor the reference pointer for the corresponding connection object needs to be decremented to prevent leakage.
How to repeat:
import resource, mariadb |
|
...
|
|
def test_connection_ref(self): |
if is_maxscale(): |
self.skipTest("skip test (possible timeout)") |
last= 0 |
for i in range(1,100000): |
conn= create_connection() |
cursor= conn.cursor() |
cursor.close()
|
conn.close()
|
usage = resource.getrusage(resource.RUSAGE_SELF) |
new= usage[2] |
if (last > 0): |
self.assertEqual(new, last) |
last= new |
|
This doesn't affect Connector/Python 1.1.x
Attachments
Issue Links
- relates to
-
CONPY-195 Memory leak - using cursor function - fetchone
- Closed