Bug #100016 Cannot use Connector Python 8.0.18 or newer when using MariaDB
Submitted: 27 Jun 2020 10:34 Modified: 20 Oct 2022 20:43
Reporter: Gordon Hughes Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:8.0.18+, 8.0.20, 8.0.29 OS:CentOS
Assigned to: CPU Architecture:Other (x64)

[27 Jun 2020 10:34] Gordon Hughes
Description:
In Connector/Python 8.0.18 or newer, the connection pooling functionality does not work when using MariaDB 10.3 or newer. This is because when any attempts are made to call the connect() method in a pool, reset_connection is then called, which fails a version check and returns NotSupported for COM_RESET_CONNECTION not being present, even though if you use 8.0.16, there is no issue at all.

Due to this, I've been unable to upgrade Connector/Python for quite a while now, which leaves me open to potential bugs that are already fixed in newer versions.

How to repeat:
1) Install Connector/Python 8.0.18 or newer
2) Install MariaDB 10.3 or newer
3) Create a script that uses a connection pool with the appropriate credentials.
4) Start the script
5) Observe that your script won't start.

Suggested fix:
Fix the version check so that it can detect MariaDB versions as intended, and properly ensure that no failure occurs when using the newer Connector/Python builds with MariaDB.

The specific section of code that causes the failure is here: https://github.com/mysql/mysql-connector-python/blob/master/lib/mysql/connector/connection...
[27 Jun 2020 10:36] Gordon Hughes
Fixed incorrect version number and CPU Architecture.
[30 Jun 2020 12:01] MySQL Verification Team
Hello Gordon,

Thank you for the report!

regards,
Umesh
[20 Oct 2022 20:43] Oscar Pacheco
Posted by developer:
 
Greetings Gordon, 

I have set up a script as you described, then tested connector version 8.0.29 against a MariaDB server (version 10.9). I witnessed no issue.

This report will be closed with the status "bug is not reproducible". This does not mean the issue did not exist, it just means it was fixed at some point before version 8.0.29. If you are planning to use the connector against a MariaDB server I recommend you use version 8.0.29. 

Regards.