Bug #73445 Setting conn. pooling through the connect func. seems to be broken with Fabric
Submitted: 31 Jul 2014 8:55 Modified: 3 Dec 2014 15:34
Reporter: Alfranio Correia Email Updates:
Status: Closed Impact on me:
Category:Connector / Python Severity:S3 (Non-critical)
Version:2.0.0 OS:Any
Assigned to: CPU Architecture:Any

[31 Jul 2014 8:55] Alfranio Correia
Setting the connection pooling when MySQL Fabric is in use seems to be broken.
The problem does not happen in previous releases that support MySQL Fabric.

The following error is reported:
    return self.__cnx.cursor()
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/fabric/connection.py", line 1168, in cursor
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/fabric/connection.py", line 1128, in _connect
    self._mysql_cnx = MySQLConnection(**dbconfig)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 129, in __init__
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 504, in connect
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 410, in config
    raise AttributeError("Unsupported argument '{0}'".format(key))
AttributeError: Unsupported argument 'pool_name'

This happens because of the following code:

def config(self, **kwargs):
    for key, value in config.items():
        except KeyError:
            raise AttributeError("Unsupported argument '{0}'".format(key)

Neither pool_name or pool_size are present in the DEFAULT_CONFIGURATION dictionary. However, even after ignoring the KeyError, the connection pooling
does not seem to be working properly.

How to repeat:
params = {
    "fabric" : {
        "host" : fabric_host, "port" : fabric_port, "user" : "admin",
        "password" : "password"
    "user"   : user, "passwd" : passwd, "database" : "mysql", "pool_name" :

cnx = connect(**params)
cur = cnx.cursor()
[3 Dec 2014 15:34] Paul Dubois
Noted in 2.0.3 changelog.

Connection pooling did not work when using MySQL Fabric.
[30 Mar 2015 16:00] Paul Dubois
Noted in 2.1.2 changelog.