Documentation Home
MySQL Connector/J Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 482.1Kb
PDF (A4) - 482.3Kb
EPUB - 127.7Kb

MySQL Connector/J Release Notes  /  Changes in MySQL Connector/J 5.1  /  Changes in MySQL Connector/J 5.1.22 (2012-09-11)

Changes in MySQL Connector/J 5.1.22 (2012-09-11)

Fixes bugs found since release 5.1.21.

Bugs Fixed

  • Performance: The com.mysql.jdbc.getCharsetNameForIndex() method was made more efficient, resulting in better performance for queries against tables containing many columns with string data types. (Bug #14236302, Bug #65508)

  • The LoadBalancingConnectionProxy.pickNewConnection() method could incorrectly flag the current connection as invalid after testing another connection. The selection process could choose another (potentially offline) host, leading to a connection is closed error when trying to use a connection after re-balancing:

    No operations allowed after connection closed.
    Connection closed after inability to pick valid new connection
    during fail-over.

    (Bug #14563127)

  • With profileSQL=true and useNanosForElapsedTime=true specified in the connection URL, query and fetch duration were not reported correctly. The com.mysql.jdbc.MysqlIO.sqlQueryDirect() method always measured times in milliseconds rather than switching between milliseconds and nanoseconds. (Bug #14273046, Bug #57662)

  • ResultSet objects created by the getGeneratedKeys() method were not being automatically closed, leading to potential memory leaks if the application did not explicitly close the ResultSet objects. (Bug #14192873, Bug #65503)

  • Implemented the getVersionColumns() method, which formerly always returned an empty result set. Now this method returns the timestamp columns that are updated every time a row is changed. (Bug #13636546, Bug #63800)

  • Connecting to a server that used a UCS2 character set would throw an exception:

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error 
    in your SQL syntax; check the manual that corresponds to your MySQL server 
    version for the right syntax to use near '??' at line 1 

    Now, Connector/J sets characterEncoding implicitly to UTF-8 when the server character set is UCS2. Because the Connector/J UTF-8 implementation does not cover all UCS-2 characters, note that truncation might occur in some cases. (Bug #11751035, Bug #41752)

  • Connector/J now avoids synchronization issues in terms of locking order and prepared statements.

Download these Release Notes
PDF (US Ltr) - 482.1Kb
PDF (A4) - 482.3Kb
EPUB - 127.7Kb