D.6.2.2. Changes in MySQL Connector/J 5.0.7 (20 July 2007)

Functionality added or changed:

  • The driver will now automatically set useServerPrepStmts to true when useCursorFetch has been set to true, since the feature requires server-side prepared statements to function.

  • tcpKeepAlive - Should the driver set SO_KEEPALIVE (default true)?

  • Give more information in EOFExceptions thrown out of MysqlIO (how many bytes the driver expected to read, how many it actually read, say that communications with the server were unexpectedly lost).

  • Driver detects when it is running in a ColdFusion MX server (tested with version 7), and uses the configuration bundle coldFusion, which sets useDynamicCharsetInfo to false (see previous entry), and sets useLocalSessionState and autoReconnect to true.

  • tcpNoDelay - Should the driver set SO_TCP_NODELAY (disabling the Nagle Algorithm, default true)?

  • Added configuration property slowQueryThresholdNanos - if useNanosForElapsedTime is set to true, and this property is set to a nonzero value the driver will use this threshold (in nanosecond units) to determine if a query was slow, instead of using millisecond units.

  • tcpRcvBuf - Should the driver set SO_RCV_BUF to the given value? The default value of '0', means use the platform default value for this property.

  • Setting useDynamicCharsetInfo to false now causes driver to use static lookups for collations as well (makes ResultSetMetadata.isCaseSensitive() much more efficient, which leads to performance increase for ColdFusion, which calls this method for every column on every table it sees, it appears).

  • Added configuration properties to enable tuning of TCP/IP socket parameters:

    • tcpNoDelay - Should the driver set SO_TCP_NODELAY (disabling the Nagle Algorithm, default true)?

    • tcpKeepAlive - Should the driver set SO_KEEPALIVE (default true)?

    • tcpRcvBuf - Should the driver set SO_RCV_BUF to the given value? The default value of '0', means use the platform default value for this property.

    • tcpSndBuf - Should the driver set SO_SND_BUF to the given value? The default value of '0', means use the platform default value for this property.

    • tcpTrafficClass - Should the driver set traffic class or type-of-service fields? See the documentation for java.net.Socket.setTrafficClass() for more information.

  • Setting the configuration parameter useCursorFetch to true for MySQL-5.0+ enables the use of cursors that enable Connector/J to save memory by fetching result set rows in chunks (where the chunk size is set by calling setFetchSize() on a Statement or ResultSet) by using fully-materialized cursors on the server.

  • tcpSndBuf - Should the driver set SO_SND_BUF to the given value? The default value of '0', means use the platform default value for this property.

  • tcpTrafficClass - Should the driver set traffic class or type-of-service fields? See the documentation for java.net.Socket.setTrafficClass() for more information.

  • Added new debugging functionality - Setting configuration property includeInnodbStatusInDeadlockExceptions to true will cause the driver to append the output of SHOW ENGINE INNODB STATUS to deadlock-related exceptions, which will enumerate the current locks held inside InnoDB.

  • Added configuration property useNanosForElapsedTime - for profiling/debugging functionality that measures elapsed time, should the driver try to use nanoseconds resolution if available (requires JDK >= 1.5)?

    Note

    If useNanosForElapsedTime is set to true, and this property is set to "0" (or left default), then elapsed times will still be measured in nanoseconds (if possible), but the slow query threshold will be converted from milliseconds to nanoseconds, and thus have an upper bound of approximately 2000 milliseconds (as that threshold is represented as an integer, not a long).

Bugs fixed:

  • Don't send any file data in response to LOAD DATA LOCAL INFILE if the feature is disabled at the client side. This is to prevent a malicious server or man-in-the-middle from asking the client for data that the client is not expecting. Thanks to Jan Kneschke for discovering the exploit and Andrey "Poohie" Hristov, Konstantin Osipov and Sergei Golubchik for discussions about implications and possible fixes. (Bug#29605)

  • Parser in client-side prepared statements runs to end of statement, rather than end-of-line for '#' comments. Also added support for '--' single-line comments. (Bug#28956)

  • Parser in client-side prepared statements eats character following '/' if it is not a multi-line comment. (Bug#28851)

  • PreparedStatement.getMetaData() for statements containing leading one-line comments is not returned correctly.

    As part of this fix, we also overhauled detection of DML for executeQuery() and SELECTs for executeUpdate() in plain and prepared statements to be aware of the same types of comments. (Bug#28469)

Copyright © 2010-2024 Platon Technologies, s.r.o.           Index | Man stránky | tLDP | Dokumenty | Utilitky | O projekte
Design by styleshout