add_connection()

Adds a connection to the connection pool. In case the pool doesn't have a free slot or is not configured a PoolError exception will be raised.

See also: MariaDB Connector/Python 1.0

EXAMPLES

Create a pool object and add a connection to it:

import mariadb

pool = mariadb.ConnectionPool(pool_size=3)

conn = mariadb.connect(
    host = 'localhost',
    user = 'root',
    password = 'secret',
    )

pool.add_connection(conn)