Release Notes for MariaDB Connector/Python 1.1.0-rc1

Overview

MariaDB Connector/Python is a native MariaDB connector for building Python applications on MariaDB. It is compliant with Python DB API 2.0 (PEP-249). It is written in C and uses MariaDB Connector/C.

MariaDB Connector/Python 1.1.0-rc1 was released on 2022-04-07. It is the first release candidate (RC) of MariaDB Connector/Python 1.1.

Notable Changes

  • When MariaDB Connector/Python 1.1 is built with MariaDB Connector/C 3.3, the connector supports connection failover between multiple server addresses defined in the connection string. (CONC-365) (CONPY-44)

    • When calling the mariadb.connect function, the host argument can be specified as a comma-separated list containing multiple server addresses.

    • The Windows builds of MariaDB Connector/Python 1.1 provided on the MariaDB Downloads page are statically linked with MariaDB Connector/C 3.3, so there are no external dependencies.

    • The Linux builds of MariaDB Connector/Python 1.1 provided on the MariaDB Downloads page require MariaDB Connector/C 3.3 to be installed separately.

    • For additional information, see "MariaDB Connector/Python: Connection Failover".

  • MariaDB Connector/Python 1.1 defines the repr() method for the Connection, Cursor, and ConnectionPool classes, so that objects of those classes can be implicitly converted to strings in error messages and debugging output. (CONPY-184)

  • The Cursor.description attribute has been extended to provide the table name (descriptor[8]), the original column name (descriptor[9]), and the original table name (descriptor[10]). (CONPY-88)

Issues Fixed

  • Calling the escape_string(string) method can cause a crash due to a segmentation fault when the specified string is too large to fit on the stack. (CONPY-175)

    • Starting with this release, the memory for the string is allocated from the heap to avoid allocating large strings on the stack.

  • When checking the initial handshake packet for the server capabilities, MariaDB Connector/Python does not check for MariaDB Server's extended server capabilities. (CONPY-187)

    • In previous releases, any feature requiring MariaDB Server's extended server capabilities would not work. For example, performing bulk operations over the binary protocol requires MariaDB Server's extended server capabilities.

    • Starting with this release, MariaDB Connector/Python properly checks the initial handshake packet for MariaDB Server's extended server capabilities.

  • When a Connection, Cursor, or ConnectionPool object has been closed and any method or property of the object is called, a crash can occur. (CONPY-188) (CONPY-183)

    • Starting with this release, an exception will be thrown with one of the following error messages: "Invalid connection or not connected" or "Invalid cursor or not connected"