Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
1.1.14
-
None
-
None
-
Windows 11/Ubuntu 25
On Windows, the default binaries are used as installed via pip: `\Lib\site-packages\mariadb\_mariadb.cp312-win_amd64.pyd`
On ubuntu, binaries are install via `sudo apt-get install libmariadb3 libmariadb-dev`
On Windows, python -c "import mariadb;print(mariadb.mariadbapi_version)" prints `3.4.7`.Windows 11/Ubuntu 25 On Windows, the default binaries are used as installed via pip: `\Lib\site-packages\mariadb\_mariadb.cp312-win_amd64.pyd` On ubuntu, binaries are install via `sudo apt-get install libmariadb3 libmariadb-dev` On Windows, python -c "import mariadb;print(mariadb.mariadbapi_version)" prints `3.4.7`.
-
3.12.10
Description
I've created a DB API v2 connection wrapper class which uses a MariaDB connection class as the underlying connection instance. The error I am referring to happens during testing, after I run a specific test that executes a single query which retrieves a single scalar value from the database, e.g. "SELECT 1", "SELECT '1'", "SELECT 1.0", etc...
After the test is executed 5 or 6 times, a `Windows fatal exception: access violation` error is raised and the python process completely stops. In Ubuntu, a similar segmentation fault error is raised.
I've traced where the bug occurs and it does while attempting to close the connection, (which I do after a test is over). Furthermore, the segmentation fault actually happens due to an AttributeError in line 119 of mariadb.connection.py.
The line is `if self._Connection__pool:`.
And the error is this: `AttributeError: 'Connection' object has no attribute '_Connection__pool'`.
If I comment out this if/else and just close the connection, the program works just fine.