pool_reset_connection

Overview

If set to true, the connection will be reset on both client and server side after .close() method is called. (read/write)

See also: MariaDB Connector/Python 1.1 and in 1.0

EXAMPLES

The following outputs the default state of pool_reset_connection setting and then enables it:

import mariadb

pool = mariadb.ConnectionPool(
    pool_name = 'pool1',
    pool_size = 3,
    pool_reset_connection = False,
    host = '127.0.0.1',
    user = 'root',
    password = 'secret',
    database = 'test',
    )

print(pool.pool_reset_connection) # Prints: False
pool.pool_reset_connection = True

CHANGE HISTORY

Release Series

History

1.1

  • Present starting in MariaDB Connector/Python 1.1.0rc1.

1.0

  • Present starting in MariaDB Connector/Python 1.0.0.