MySQL Connector/Python 1.1.1アルファがリリースされました


>MySQL Connector/Python v1.1.1はMySQL用のピュアPythonデータベースドライバの1.1リリースシリーズの次のアルファバージョンです。これはユーザに新機能に慣れ親しんでもらうことが目的です。



MySQL Connector Pythonのバージョン1.1.1-alphaはMySQL 5.5以上と互換性を持ちますが、それ以前のバージョンでも動作します(バージョン4.1以上)。Python v2.6とPython v3.1以上でサポートされます。

MySQL Connector/Python 1.1.1-alphaは からダウンロードできます。

MySQL Connector/Python 1.1.1の変更の要約は配布物内の変更履歴に含まれています。より完全な変更のリストはもしくはオンラインで確認してください。

Changes in MySQL Connector/Python 1.1.1 (2013-09-10, Alpha)

Functionality Added or Changed

* Output for individual unit tests did not show timings, making
it more difficult to debug problems that involve a change in
test execution time. now has a new --stats option
that runs tests and shows elapsed time for each.
It is also possible to save the data to a MySQL server. When
the --stats-host option is given with other options such as
--stats-user, results are saved to a table called
myconnpy_X_Y_Z. The table contains the name of the test case
and columns that combine Python and MySQL versions; for
example, py27my55 or py33my56.
For example, to see the difference between MySQL 5.1 and 5.6,
using Python 2.7, after running the test cases for both using
Connector/Python 1.1.0, use this statement:
SELECT test_case, py27my51, py27my56, (py27my56-py27my51) AS diff51
FROM myconnpy_1_1_0 WHERE (py27my56-py27my51) > 0.5;
(Bug #17028999)

* MySQL Connector/Python now supports simple connection pooling
that has these characteristics:

+ A pool opens a number of connections and handles thread
safety when providing connections to requesters.

+ The size of a connection pool is configurable at pool
creation time. It cannot be resized thereafter.

+ A connection pool can be named at pool creation time. If
no name is given, one is generated using the connection

+ The connection pool name can be retrieved from the
connection pool or connections obtained from it.

+ It is possible to have multiple connection pools. This
enables applications to support pools of connections to
different MySQL servers, for example.

+ For each connection request, the pool provides the next
available connection. No round-robin or other scheduling
algorithm is used.

+ It is possible to reconfigure the connection parameters
used by a pool. These apply to connections obtained from
the pool thereafter. Reconfiguring individual connections
obtained from the pool by calling the connection config()
method is not supported.
Applications that can benefit from connection-pooling
capability include:

+ Middleware that maintains multiple connections to
multiple MySQL servers and requires connections to be
readily available.

+ Web sites that can have more "permanent" connections open
to the MySQL server.

The connection pooling implementation involves these interface

+ A new module, mysql.connector.pooling, provides two
classes: MySQLConnectionPool instantiates and manages
connection pools, and PooledMySQLConnection is similar to
MySQLConnection but is used for connections that are part
of a connection pool.

+ A new exception, PoolError, occurs for pool-related
exceptions. PoolError is a subclass of Error.
For more information, see Connector/Python Connection Pooling


* Connector/Python now includes a mysql.connector.django module
that provides a Django backend for MySQL. This backend
supports new features found in MySQL 5.6 such as fractional
seconds support for temporal data types. For more information,
see Connector/Python Django Backend


Bugs Fixed

* Following fetchone() or fetchmany(), the result returned by
fetchall() was missing one row. (Bug #17041412)

* Previously, executing a statement after the connection was
closed raised an OperationalError with an unclear error.
Connector/Python now returns the client error 2006, MySQL
Server has gone away, with an extra message.
The Error() class has been extended to accept a new argument,
extra_msg. When given, it is appended between brackets. For
example: [2000] Unknown MySQL Error (Some extra message) (Bug

* LOAD DATA LOCAL INFILE failed for files approximately 14MB or
larger. (Bug #17002411)

* An InternalError was raised during transaction rollback if
there were unread results. The MySQLConnection.rollback()
method now consumes unread results instead of raising an
error. (Bug #16656621)

* Python 2.6 and 2.7 raised a UnicodeDecodeError when
unicode_literals was used and a database name contained
nonlatin Unicode characters. (Bug #16655208)

* An unclear OperationalError was raised if a cursor object was
closed while there were unread results. Connector/Python now
raises an InternalError indicating that there are still unread
results. This provides information that to avoid the error it
is necessary to consume the result by reading all rows. (Bug
#67649, Bug #17041240)

* The MySQLCursor.executemany() method raised an exception when
a SQL function was used as a column value when executing an
INSERT statement. (Bug #69675, Bug #17065366)