Changes:
o Tidy-up and reorganizing the code so we have a clearer separation between
Python v2 and Python v3 code.
o Adding Raw Cursors: The data will be returned to the application as
returned from MySQL. No conversion is done from MySQL data types to
Python types. This allows to get data faster, and do conversion
elsewhere. One can use the 'raw'-parameter when connecting, but
also when instantiating a cursor, e.g. cnx.cursor(raw=True)
o INSERT-statements now use multiple row syntax to optimize inserting lots
of rows. It does this transparently.
o Removed mysql.connector.mysql, moving MySQL to mysql.connector.mysql and
renamed it MySQLConnection.
o MySQLConnection objects have now properties which will directly query MySQL
to get values. Properties are named: autocommit, database, charset,
collation, connection_id, time_zone, sql_mode.
o mysql.connector.connection got a few changes raising a better
exception for socket timeouts, passing when the deque() is empty,
removing some obsolete code, ..
o MySQLConnection.connect() now supports time_zone argument to set the session
time_zone variable when connecting.
o MySQLConnection.connect() now supports the sql_mode argument to set the
session sql_mode variable when connecting. It is good to set this to
'TRADITIONAL', e.g. to have warnings raised as errors.
o It is now possible to set client_flags as a list when connecting.
The list must contain members of constants.ClientFlag and can be made
negative to unset them. E.g. to set FOUND_ROWS and unset PROTOCOL_41
(which gives Handshake Error), you can do following:
connect(client_flags=[ClientFlag.FOUND_ROWS,-ClientFlag.PROTOCOL_41]))
o cursor.MySQLCursor as a property column_names which returns a tuple of
the column names.
o Unit tests now run their own MySQL server instance. It bootstraps a
MySQL datadir, runs the server and stops it, removing all files when
done. See `python unittests.py --help` for options. This makes it
possible to easily tests different MySQL versions pointing to a
different base directory.
o Copyright change to Oracle.
Bugs fixed:
o It was impossible to retrieve big result sets. (bug lp:551533
and lp:586003)
o Some overhead was removed when reading packets send by MySQL.
(Bug lp:584518)
o Config.dbinfo() did not return the port number (Bug lp:598706)
o Alias connect_timeout for connection_timeout (Bug lp:627448)