Documentation Home
MySQL Connector/Python Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 232.7Kb
PDF (A4) - 233.6Kb


MySQL Connector/Python Release Notes  /  Changes in MySQL Connector/Python 2.1  /  Changes in MySQL Connector/Python 2.1.1 (2015-02-23, Alpha)

Changes in MySQL Connector/Python 2.1.1 (2015-02-23, Alpha)

C Extension Notes

  • MySQL Connector/Python distributions now are available that include a C Extension that interfaces with the MySQL C client library. For queries that return large result sets, using the C Extension can improve performance compared to a pure Python implementation of the MySQL client/server protocol.

    For binary Connector/Python distributions, some packaging types have a single distribution file that includes the pure-Python Connector/Python code together with the C Extension. (Windows MSI and OS X Disk Image packages fall into this category.) Other packaging types have two related distribution files: One that includes the pure-Python Connector/Python code, and one that includes only the C Extension. For packaging types that have separate distribution files, install both distributions if you want to use the C Extension. The two files have related names, the difference being that the one that contains the C Extension has cext in the distribution file name.

    Source distributions include both the pure-Python code and the C Extension, and distribution names do not contain cext. Instead, availability of the C Extension is determined by whether you compile the distribution with the --with-mysql-capi option.

    Packages for Connector/Python with the C Extension are available at the Connector/Python download site. For installation instructions, see Connector/Python Installation. For information about using the C Extension, see The Connector/Python C Extension.

    For Connector/Python installations that support the C Extension, the use_pure connection argument to connect() controls whether to use the extension. If use_pure is True (the default), the connection uses pure Python. If use_pure is False, the connection uses the C Extension.

    It is also possible to use the C Extension directly, by importing the _mysql_connector module rather than the mysql.connector module. See The _mysql_connector C Extension Module.

Functionality Added or Changed

  • A new connect() option, consume_results, if enabled, causes result sets generated by queries to be automatically consumed and discarded. The can_consume_results connection object property indicates the value of consume_results.

Bugs Fixed

  • With mysql.connector.django as the engine, the python manage.py inspectdb command failed with an Unread result found error. (Bug #20022533)

  • If the pool_size and pool_name connection arguments were specified using the option file (as opposed to being passed explicitly to the connect call), the pooled connection was successfully created, but an exception was raised when closing it. (Bug #19549363)

  • The Django back end raised an exception when converting "0000-00-00 00:00:00" to None. (Bug #73940, Bug #19667984)

  • The type_code in cursor.description did not compare equal to any of the type objects defined in mysql.connector.dbapi. (Bug #73798, Bug #19584051)

  • Data corruption occurred when inserting sufficiently large data in a table with a TEXT type column using prepared statements, due to incorrect encoding of the data length while sending the prepared statement packet. (Bug #73690, Bug #19522948)

  • When the character set was binary, character set conversion could occur. Conversion is no longer done and binary data is returned as is. (Bug #71909, Bug #19500097)