オリジナル版:http://lists.mysql.com/java/9197
バージョン5.1版での製品版保守リリースであるMySQL Connector/J 5.1.6が リリースされました。Connector/Jは、MySQL用のタイプ4のpure-Java JDBCドライバです。
バージョン5.1.6は、MySQL-4.1、MySQL-5.0、MySQL-5.1 RC、MySQL-6.0開発リリースを含んだいくつかのMySQLのバージョンでの使用にふさわしいリリースです。
バージョン5.1.6は、http://dev.mysql.com/downloads/connector/j/5.1.htmlおよびミラーサイトのConnector/Jダウンロードページからソースおよびバイナリ形式で入手可能です。(すべてのミラーサイトが現在において最新であるとは限らないかもしれないことに注意してください。あるミラーサイトでこのバージョンを見つけることができない場合は、再度確認を行うか、あるいは別のダウンロード・サイトを選択してください。)
いつものことですが、アプリケーションに影響を及ぼす動作変更を把握するには、アップグレードの前に、マニュアルの変更ログ(http://dev.mysql.com/doc/refman/5.0/en/cj-news.html)と"Upgrading"の節(http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html)をチェックするようお勧めします。
バグレポート、バグ修正、パッチ等の情報をお待ちしておりますので、以下のページをご利用ください。
http://forge.mysql.com/wiki/Contributing
- JDBC-4.0-ized XAConnections and datasources.
- FixedBUG#31790MysqlValidConnectionChecker doesn't properly handle ReplicationConnection
- FixedBug#20491- DatabaseMetadata.getColumns() doesn't return correct column names if connection character set isn't UTF-8. (There was server-side component of this that was fixed late in the 5.0 development cycle, it seems, this is the last piece that fixes some loose ends in the JDBC driver). This fix touches *all* metadata information coming from the MySQL server itself. - Fixed MysqlIO.nextRowFast() to only attempt to read server warning counts and status if talking to a 4.1 or newer server (fixes a hang when reading data from 4.0 servers). - Made profiler event handling extensible via the "profilerEventHandler" connection property. - FixedBug#31823- CallableStatement.setNull() on a stored function would throw an ArrayIndexOutOfBounds when setting the last parameter to null when calling setNull(). - Added SSL-related configuration property "verifyServerCertificate". If set to "false", the driver won't verify the server's certificate when "useSSL" is set to "true". When using this feature, the keystore parameters should be secified by the "clientCertificateKeyStore*" properties, rather than system properties, as the JSSE doesn't make it straightforward to have a non-verifying trust store and the "default" key store. - Fixed ResultSetMetadata.getColumnName() for result sets returned from Statement.getGeneratedKeys() - it was returning null instead of "GENERATED_KEY" as in 5.0.x. - More applicable fix for the "random" load balance strategy in the face of node non-responsive, it re-tries a *different* random node, rather than waiting for the node to recover (forBUG#31053) -FixedBUG#32577- no way to store two timestamp/datetime values that happens over the DST switchover, as the hours end up being the same when sent as the literal that MySQL requires. Note that to get this scenario to work with MySQL (since it doesn't support per-value timezones), you need to configure your server (or session) to be in UTC, and tell the driver not to use the legacy date/time code by setting "useLegacyDatetimeCode" to "false". This will cause the driver to always convert to/from the server and client timezone consistently. This bug fix also fixesBUG#15604, by adding entirely new date/time handling code that can be switched on by "useLegacyDatetimeCode" being set to "false" as a JDBC configuration property. For Connector/J 5.1.x, the default is "true", in trunk and beyond it will be "false" (i.e. the old date/time handling code, warts and all will be deprecated). - FixedBUG#32877- Load balancing connection using best response time would incorrectly "stick" to hosts that were down when the connection was first created. We solve this problem with a black list that is used during the picking of new hosts. If the black list ends up including all configured hosts, the driver will retry for a configurable number of times (the "retriesAllDown" configuration property, with a default of 120 times), sleeping 250ms between attempts to pick a new connection. We've also went ahead and made the balancing strategy extensible. To create a new strategy, implement the interface com.mysql.jdbc.BalanceStrategy (which also includes our standard "extension" interface), and tell the driver to use it by passing in the class name via the "loadBalanceStrategy" configuration property. -FixedBUG#30508- ResultSet returned by Statement.getGeneratedKeys() is not closed automatically when statement that created it is closed. -Added two new connection properties, "selfDestructOnPingSecondsLifetime" and "selfDestructOnPingMaxOperations" designed to control overall connection lifetime (useful to reclaim resources on the server side) for connection pools that don't have such a facility. The driver will consult the values of these properties when a ping is sent, either through calling Connection.ping(), issuing the "ping marker" query (any query that starts with "/* ping */"), or when using JDBC-4.0, calling Connection.isValid(). If the connection has issued too many operations, or is too old, the driver will throw a SQLException with the SQLState of "08S01" at the time of the ping, which will cause the connection to be invalidated with most pools in use today. - Fixed issue where driver could send invalid server-side prepared statement IDs to the server when the driver was setup to do auto-reconnect as the connection could get set up enough to start sending queries on one thread, while the thread that "noticed" the connection was down hasn't completed re-preparing all of the server-side prepared statements that were open when the connection died. Potentially fixes cause for bug 28934. Potentially fixes other possible race conditions where one thread that has created a connection "shares" it with other threads if the connection is reconnected due to auto-reconnect functionality. - FixedBUG#33823- Public interface ResultSetInternalMethods with reference to non-public class com.mysql.jdbc.CachedResultSetMetaData. -For any SQLException caused by another Throwable, besides dumping the message or stack trace as a string into the message, set the underlying Throwable as the cause for the SQLException, making it accessible via getCause(). - FixedBUG#34093- Statements with batched values do not return correct values for getGeneratedKeys() when "rewriteBatchedStatements" is set to "true", and the statement has an "ON DUPLICATE KEY UPDATE" clause. - FixedBUG#31192- Encoding Issue retrieving serverVersion in MysqlIO in the method doHandshake when encoding doesn't contain ASCII characters in the "standard" place (i.e. ebcdic). -Fixed issue where META-INF in the binary .jar file wasn't packed correctly, leading to failure of the JDBC-4.0 SPI mechanism. - CallableStatements that aren't really stored procedure or stored function calls can now be used, for tools such as Oracle JDeveloper ADF that issue statements such as DDL through CallableStatements. - FixedBUG#34518- Statements using cursor fetch leaked internal prepared statements until connection was closed. The internal prepared statement is now held open while the result set is open, and closed by the result set itself being closed. - FixedBUG#34677- Blob.truncate() wouldn't take "0" as an argument.
- CommunicationExceptions now carry information about the last time a packet was received from the MySQL server, as well as when the last packet was sent to one, in an effort to make it easier to debug communications errors caused by network timeouts. - Reverted a change to DatabaseMetadata.getColumns() from 5.0, where getColumns() would report NULL for COLUMN_SIZE for TIME, DATE, DATETIME and TIMESTAMP types. It now reports the column size, in the DatabaseMetadata implementations that use "SHOW" commands, and the INFORMATION_SCHEMA. - FixedBug#34762- RowDataStatic does't always set the metadata in ResultSetRow, which can lead to failures when unpacking DATE, TIME, DATETIME and TIMESTAMP types when using absolute, relative, and previous result set navigation methods. - FixedBUG#34703- Connection.isValid() invalidates connection after timeout, even if connection is actually valid. - FixedBUG#34194- ResultSetMetaData.getColumnTypeName() returns "UNKNOWN" for GEOMETRY type. - FixedBUG#33162- NullPointerException instead of SQLException thrown for ResultSet.getTimestamp() when not positioned on a row. - The ConnectionLifecycleInterceptor interface now has callback methods for transaction initiation (transactionBegun()), and completion (transactionCompleted()), as reported by the *server* (i.e. calling Connection.setAutoCommit(false) will not trigger transactionBegun() being called, however the first statement which causes a transaction to start on the server will cause transactionBegun() to be called *after* the statement has been processed on the server). - FixedBug#34913- ResultSet.getTimestamp() returns incorrect values for month/day of TIMESTAMPs when using server-side prepared statements (not enabled by default). - FixedBUG#34937- MysqlConnectionPoolDataSource does not support ReplicationConnection. Notice that we implemented com.mysql.jdbc.Connection for ReplicationConnection, however, only accessors from ConnectionProperties are implemented (not the mutators), and they return values from the currently active connection. All other methods from com.mysql.jdbc.Connection are implemented, and operate on the currently active connection, with the exception of resetServerState() and changeUser(), which operate on all connections held by the replication connection.
- Connections created with jdbc:mysql:replication:// URLs now force roundRobinLoadBalance=true on the slaves, and round-robin load balancing now uses a "random" choice to more evenly distribute load across slave servers, especially in connection pools. Connections that are configured with "roundRobinLoadBalance=true" no longer set the failover state, as it's assumed that we're not attempting to fall-back to a master server. This fixesBUG#34963.