[CONPY-250] ConnectionPool connection_count property throws an exception Created: 2023-02-08  Updated: 2023-02-08  Resolved: 2023-02-08

Status: Closed
Project: MariaDB Connector/Python
Component/s: Connection Pooling
Affects Version/s: 1.1.6
Fix Version/s: 1.1.6

Type: Bug Priority: Major
Reporter: Rimvydas Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None

Python Version: 3.10

 Description   

It's trying to access a non-existing property:

return len(self._connections)

Please double-check the logic but maybe it should sum up the new properties like this:

return len(self._connections_free) + len(self._connections_used)

Referring to this line: https://github.com/mariadb-corporation/mariadb-connector-python/blob/1.1/mariadb/connectionpool.py#L292

Maybe also check if those lists are not None (because they are set to None in the "close" method).



 Comments   
Comment by Georg Richter [ 2023-02-08 ]

Issue fixed in 9f7fcbb3567e46cfef27e5b98f92f9fef3bf6bb7

Generated at Thu Feb 08 03:31:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.