From: Date: October 5 2007 8:53pm Subject: Connector/J commit: r6621 - in branches/branch_5_1: . connector-j connector-j/src/com/mysql/jdbc List-Archive: http://lists.mysql.com/commits/35011 X-Bug: 28085, 28469, 28851, 28596, 29106, 30664, 28972, 29852, 27867, 28689, 27182, 27915, 21116, 30851, 30892, 27412, 27916, 28256, 31053 Message-Id: <200710051853.l95IrA7B032545@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: branches/branch_5_1/ branches/branch_5_1/connector-j/CHANGES branches/branch_5_1/connector-j/src/com/mysql/jdbc/LoadBalancingConnectionProxy.java Log: Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6601,6603-6604,6606-6607,6610-6616 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ............... r6612 | mmatthews | 2007-10-03 13:58:43 -0500 (Wed, 03 Oct 2007) | 1333 lines Merged revisions 6585-6586,6593-6597,6599-6602,6605,6607-6611 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ................ r6610 | mmatthews | 2007-10-03 11:46:01 -0500 (Wed, 03 Oct 2007) | 1318 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6601,6603-6609 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6605 | mmatthews | 2007-10-03 10:13:16 -0500 (Wed, 03 Oct 2007) | 1 line Post merge fixup, putting back removed properties. ................ r6608 | mmatthews | 2007-10-03 11:33:16 -0500 (Wed, 03 Oct 2007) | 9 lines Merged revisions 6602-6607 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6607 | mmatthews | 2007-10-03 11:21:54 -0500 (Wed, 03 Oct 2007) | 1 line Type name for "integer" changed to "int" with fix for bug 27916, adjusting tests accordingly. ........ ................ r6609 | mmatthews | 2007-10-03 11:41:22 -0500 (Wed, 03 Oct 2007) | 1296 lines Merged revisions 6567-6575,6578-6582,6585-6608 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ................ r6574 | mmatthews | 2007-09-07 09:03:45 -0500 (Fri, 07 Sep 2007) | 1066 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566-6571 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6567 | mmatthews | 2007-09-06 10:12:14 -0500 (Thu, 06 Sep 2007) | 1032 lines Merged revisions 6518-6543,6545-6566 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ................ r6518 | mmatthews | 2007-08-29 11:21:16 -0500 (Wed, 29 Aug 2007) | 1 line Updated changelogs for bug 30550. ................ r6524 | mmatthews | 2007-08-29 12:01:19 -0500 (Wed, 29 Aug 2007) | 1 line Updated/added copyright headers. ................ r6526 | mmatthews | 2007-08-29 12:49:17 -0500 (Wed, 29 Aug 2007) | 45 lines Merged revisions 6523-6525 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6523 | mmatthews | 2007-08-29 12:00:31 -0500 (Wed, 29 Aug 2007) | 27 lines Merged revisions 6512-6521 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6521 | mmatthews | 2007-08-29 11:36:56 -0500 (Wed, 29 Aug 2007) | 10 lines - Added two configuration parameters (both default to "false") * blobsAreStrings - Should the driver always treat BLOBs as Strings specifically to work around dubious metadata returned by the server for GROUP BY clauses? * functionsNeverReturnBlobs - Should the driver always treat data from functions returning BLOBs as Strings - specifically to work around dubious metadata returned by the server for GROUP BY clauses? ........ ................ r6525 | mmatthews | 2007-08-29 12:08:25 -0500 (Wed, 29 Aug 2007) | 9 lines Merged revisions 6522-6524 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6522 | mmatthews | 2007-08-29 11:59:18 -0500 (Wed, 29 Aug 2007) | 1 line Make functionsNeverReturnBlobs accessors public. ........ ................ ................ r6527 | mmatthews | 2007-08-29 12:54:37 -0500 (Wed, 29 Aug 2007) | 683 lines Blocked revisions 6397,6403-6404,6408-6413,6474,6476,6478-6479,6481-6482,6487-6488,6493-6495,6501-6508,6512,6514-6516,6519-6520 via svnmerge ................ r6397 | mmatthews | 2007-04-11 00:11:41 -0500 (Wed, 11 Apr 2007) | 1 line Bumped version #. ................ r6403 | mmatthews | 2007-04-20 16:02:26 -0500 (Fri, 20 Apr 2007) | 1 line Share project 'jdbc-4-0-examples' into 'svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j' ................ r6404 | mmatthews | 2007-04-20 16:03:18 -0500 (Fri, 20 Apr 2007) | 1 line Imported into SVN. ................ r6408 | mmatthews | 2007-04-23 16:54:31 -0500 (Mon, 23 Apr 2007) | 1 line Added copyright notices, more comments. ................ r6409 | mmatthews | 2007-04-23 18:38:32 -0500 (Mon, 23 Apr 2007) | 1 line Write out the "planet" as an HTML page, added BareBonesBrowserLaunch to automatically launch the resultant page in a browser. ................ r6410 | mmatthews | 2007-04-23 18:41:29 -0500 (Mon, 23 Apr 2007) | 1 line Changed formatting for display on projection screens. ................ r6411 | mmatthews | 2007-04-24 13:32:36 -0500 (Tue, 24 Apr 2007) | 1 line Removed tests (not examples) that didn't belong in this project. ................ r6412 | mmatthews | 2007-04-24 13:35:02 -0500 (Tue, 24 Apr 2007) | 1 line Removed empty directory. ................ r6413 | mmatthews | 2007-04-24 16:03:27 -0500 (Tue, 24 Apr 2007) | 1 line (should've switched to resource view in Eclipse to delete the parent directory) ................ r6474 | mmatthews | 2007-07-03 20:18:25 -0500 (Tue, 03 Jul 2007) | 1 line Merged 5.1 back into trunk, new development for 6.0 starts here. ................ r6476 | mmatthews | 2007-07-03 20:28:06 -0500 (Tue, 03 Jul 2007) | 1 line Setup svnmerge properties ................ r6478 | mmatthews | 2007-07-03 20:58:07 -0500 (Tue, 03 Jul 2007) | 1 line svnmerge init for merge-back from 5.1 branch ................ r6479 | mmatthews | 2007-07-03 20:59:06 -0500 (Tue, 03 Jul 2007) | 1 line svnmerge init for merge-back from 5.0 branch ................ r6481 | mmatthews | 2007-07-04 01:05:29 -0500 (Wed, 04 Jul 2007) | 1 line Syncing pre-merge data ................ r6482 | mmatthews | 2007-07-05 14:01:07 -0500 (Thu, 05 Jul 2007) | 1 line Merged from 5.1. ................ r6487 | mmatthews | 2007-07-17 22:34:57 -0500 (Tue, 17 Jul 2007) | 1 line Merges from 5.0. ................ r6488 | mmatthews | 2007-07-17 22:40:05 -0500 (Tue, 17 Jul 2007) | 1 line Fixed typo in bug#. ................ r6493 | mmatthews | 2007-07-18 16:17:46 -0500 (Wed, 18 Jul 2007) | 1 line Don't create Maven bundles for commercial builds. They're not needed. ................ r6494 | mmatthews | 2007-08-08 20:59:55 -0500 (Wed, 08 Aug 2007) | 23 lines New methods on com.mysql.jdbc.Statement: setLocalInfileInputStream() and getLocalInfileInputStream(). setLocalInfileInputStream() sets an InputStream instance that will be used to send data to the MySQL server for a "LOAD DATA LOCAL INFILE" statement rather than a FileInputStream or URLInputStream that represents the path given as an argument to the statement. This stream will be read to completion upon execution of a "LOAD DATA LOCAL INFILE" statement, and will automatically be closed by the driver, so it needs to be reset before each call to execute*() that would cause the MySQL server to request data to fulfill the request for "LOAD DATA LOCAL INFILE". If this value is set to NULL, the driver will revert to using a FileInputStream or URLInputStream as required. getLocalInfileInputStream() returns the InputStream instance that will be used to send data in response to a "LOAD DATA LOCAL INFILE" statement. This method returns NULL if no such stream has been set via setLocalInfileInputStream(). ................ r6495 | mmatthews | 2007-08-13 15:22:27 -0500 (Mon, 13 Aug 2007) | 4 lines - The driver now connects with an initial character set of "utf-8" solely for the purposes of authentication to allow usernames and database names in any character set to be used in the JDBC URL. ................ r6501 | mmatthews | 2007-08-29 09:51:56 -0500 (Wed, 29 Aug 2007) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-6500" from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1/connector-j ................ r6502 | mmatthews | 2007-08-29 09:52:40 -0500 (Wed, 29 Aug 2007) | 1 line Shouldn't check-in svnmerge-commit-message.txt. ................ r6503 | mmatthews | 2007-08-29 09:56:14 -0500 (Wed, 29 Aug 2007) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-6392" from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ................ r6504 | mmatthews | 2007-08-29 09:56:48 -0500 (Wed, 29 Aug 2007) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-6503" from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ................ r6505 | mmatthews | 2007-08-29 10:02:40 -0500 (Wed, 29 Aug 2007) | 3 lines Removed merge tracking for "svnmerge" for svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ................ r6506 | mmatthews | 2007-08-29 10:03:00 -0500 (Wed, 29 Aug 2007) | 3 lines Removed merge tracking for "svnmerge" for svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ................ r6507 | mmatthews | 2007-08-29 10:03:25 -0500 (Wed, 29 Aug 2007) | 3 lines Removed merge tracking for "svnmerge" for svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1/connector-j ................ r6508 | mmatthews | 2007-08-29 10:03:56 -0500 (Wed, 29 Aug 2007) | 3 lines Removed merge tracking for "svnmerge" for svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0/connector-j ................ r6512 | mmatthews | 2007-08-29 10:15:22 -0500 (Wed, 29 Aug 2007) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-6511" from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ................ r6514 | mmatthews | 2007-08-29 10:25:22 -0500 (Wed, 29 Aug 2007) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-6393" from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ................ r6515 | mmatthews | 2007-08-29 10:55:57 -0500 (Wed, 29 Aug 2007) | 501 lines Merged revisions 6394-6514 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ........ r6394 | mmatthews | 2007-04-10 15:45:03 -0500 (Tue, 10 Apr 2007) | 3 lines - Fixed issue where calling getGeneratedKeys() on a prepared statement after calling execute() didn't always return the generated keys (executeUpdate() worked fine however). ........ r6396 | mmatthews | 2007-04-11 00:10:44 -0500 (Wed, 11 Apr 2007) | 1 line Bumped version #. ........ r6398 | mmatthews | 2007-04-17 14:28:20 -0500 (Tue, 17 Apr 2007) | 16 lines Pulled vendor-extension methods of Connection implementation out into an interface to support java.sql.Wrapper functionality from ConnectionPoolDataSource. The vendor extensions are javadoc'd in the com.mysql.jdbc.Connection interface. For those looking further into the driver implementation, it is not an API that is used for plugability of implementations inside our driver (which is why there are still references to ConnectionImpl throughout the code). Incompatible change: Connection.serverPrepare(String) has been re-named to Connection.serverPrepareStatement() for consistency with Connection.clientPrepareStatement(). We've also added server and client prepareStatement() methods that cover all of the variants in the JDBC API. ........ r6399 | mmatthews | 2007-04-17 14:31:27 -0500 (Tue, 17 Apr 2007) | 1 line Sync'd up with repository. ........ r6400 | mmatthews | 2007-04-17 15:40:31 -0500 (Tue, 17 Apr 2007) | 1 line Switch to ConnectionImpl in a couple of places. Character sets for some DBMD is busted in 5.0 too, so put the check for server > 5.2. ........ r6401 | mmatthews | 2007-04-18 14:23:16 -0500 (Wed, 18 Apr 2007) | 4 lines - Fixed issue where a failed-over connection would let an application call setReadOnly(false), when that call should be ignored until the connection is reconnected to a writable master unless "failoverReadOnly" had been set to "false". ........ r6402 | mmatthews | 2007-04-18 14:38:48 -0500 (Wed, 18 Apr 2007) | 7 lines Similar to Connection, we pulled out vendor extensions to Statement into an interface named "com.mysql.Statement", and moved the Statement class into com.mysql.StatementImpl. The two methods (javadoc'd in "com.mysql.Statement" are enableStreamingResults(), which already existed, and disableStreamingResults() which sets the statement instance back to the fetch size and result set type it had before enableStreamingResults() was called. ........ r6406 | mmatthews | 2007-04-21 21:14:34 -0500 (Sat, 21 Apr 2007) | 1 line Support for unwrapping on statements, prepared statements. ........ r6407 | mmatthews | 2007-04-23 16:40:24 -0500 (Mon, 23 Apr 2007) | 1 line Refactored wrapper.unwrap() and some various isWrapperFor() classes for clarity. ........ r6414 | mmatthews | 2007-05-02 13:55:06 -0500 (Wed, 02 May 2007) | 16 lines - Fixed BUG#28085 - Generate more useful error messages for diagnostics when the driver thinks a result set isn't updatable. (Thanks to Ashley Martens for the patch -- contributed under CLA#43). - Driver will now use INSERT INTO ... VALUES (DEFAULT) form of statement for updatable result sets for ResultSet.insertRow(), rather than pre-populating the insert row with values from DatabaseMetaData.getColumns() (which results in a "SHOW FULL COLUMNS" on the server for every result set). If an application requires access to the default values before insertRow() has been called, the JDBC URL should be configured with "populateInsertRowWithDefaultValues" set to "true". This fix specifically targets performance issues with ColdFusion and the fact that it seems to ask for updatable result sets no matter what the application does with them. ........ r6415 | mmatthews | 2007-05-03 21:18:33 -0500 (Thu, 03 May 2007) | 37 lines - com.mysql.jdbc.[NonRegistering]Driver now understands URLs of the format "jdbc:mysql:replication://" and "jdbc:mysql:loadbalance://" which will create a ReplicationConnection (exactly like when using [NonRegistering]ReplicationDriver) and an experimenal load-balanced connection designed for use with SQL nodes in a MySQL Cluster/NDB environment, respectively. - Added an experimental load-balanced connection designed for use with SQL nodes in a MySQL Cluster/NDB environment (This is not for master-slave replication. For that, we suggest you look at ReplicationConnection or "lbpool"). If the JDBC URL starts with "jdbc:mysql:loadbalance://host-1,host-2,...host-n", the driver will create an implementation of java.sql.Connection that load balances requests across a series of MySQL JDBC connections to the given hosts, where the balancing takes place after transaction commit. Therefore, for this to work (at all), you must use transactions, even if only reading data. Physical connections to the given hosts will not be created until needed. The driver will invalidate connections that it detects have had communication errors when processing a request. A new connection to the problematic host will be attempted the next time it is selected by the load balancing algorithm. There are two choices for load balancing algorithms, which may be specified by the "loadBalanceStrategy" JDBC URL configuration property: * "random" - the driver will pick a random host for each request. This tends to work better than round-robin, as the randomness will somewhat account for spreading loads where requests vary in response time, while round-robin can sometimes lead to overloaded nodes if there are variations in response times across the workload. * "bestResponseTime" - the driver will route the request to the host that had the best response time for the previous transaction. ........ r6416 | mmatthews | 2007-05-04 12:38:32 -0500 (Fri, 04 May 2007) | 1 line "beginningOfSlashes" used to mean "end", now it really means "beginning", so we have to adjust where we look for the hostname. ........ r6417 | mmatthews | 2007-05-04 13:41:42 -0500 (Fri, 04 May 2007) | 8 lines - When "useLocalSessionState" is set to "true" and connected to a MySQL-5.0 or later server, the JDBC driver will now determine whether an actual "commit" or "rollback" statement needs to be sent to the database when Connection.commit() or Connection.rollback() is called. This is especially helpful for high-load situations with connection pools that always call Connection.rollback() on connection check-in/check-out because it avoids a round-trip to the server. ........ r6418 | mmatthews | 2007-05-09 18:12:08 -0500 (Wed, 09 May 2007) | 1 line Remove JDK-1.5+-only constructs. ........ r6420 | mmatthews | 2007-05-09 19:53:29 -0500 (Wed, 09 May 2007) | 1 line Remove auto-added import (by Eclipse), removed JDK-1.5+-only constructs. ........ r6422 | mmatthews | 2007-05-10 15:32:52 -0500 (Thu, 10 May 2007) | 1 line Updated release date for 5.0.6. ........ r6424 | mmatthews | 2007-05-11 16:20:14 -0500 (Fri, 11 May 2007) | 1 line Implement some missing JDBC-4.0 functionality, push non-Java-6-specific code back into DatabaseMetadata. ........ r6425 | mmatthews | 2007-05-11 18:23:05 -0500 (Fri, 11 May 2007) | 1 line Fleshed out serializeAsCharacterStream() and serializeAsString() methods to support all result implementations (SAX, StAX, DOM and Stream) ........ r6426 | mmatthews | 2007-05-14 14:08:11 -0500 (Mon, 14 May 2007) | 1 line Use testsuite statement instance for "KILL"s, makes testFailoverReadonly more robust, less influence by timing factors. ........ r6427 | mmatthews | 2007-05-14 14:33:48 -0500 (Mon, 14 May 2007) | 1 line JDK-1.3.1 doesn't have DST patches, so don't try testBug3620() in that environment. ........ r6429 | mmatthews | 2007-05-15 22:31:15 -0500 (Tue, 15 May 2007) | 9 lines nn-nn-07 - Version 5.0.7 - The configuration "useCursorFetch" (for MySQL-5.0+, which enables the use of cursors that allow Connector/J to save memory by fetching result set rows in chunks, set by Statement.setFetchSize() by using fully-materialized cursors on the server) will now automatically set "useServerPrepStmts" to "true" when it has been set to "true", since it requires server-side prepared statements in order to function correctly. ........ r6430 | mmatthews | 2007-05-16 16:33:00 -0500 (Wed, 16 May 2007) | 4 lines Fixed BUG#28469 - 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. ........ r6431 | mmatthews | 2007-05-16 16:40:02 -0500 (Wed, 16 May 2007) | 1 line Implemented free(). ........ r6433 | mmatthews | 2007-05-18 13:38:56 -0500 (Fri, 18 May 2007) | 17 lines - 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)? - Added configuration property "slowQueryThresholdNanos" - if "useNanosForElapsedTime" is set to "true", and this property is set to a non-zero value the driver will use this threshold (in nanosecond units) to determine if a query was slow, instead of using millisecond units. Note, that 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 millesconds (as that threshold is represented as an integer, not a long). ........ r6434 | mmatthews | 2007-05-18 13:48:07 -0500 (Fri, 18 May 2007) | 19 lines - Added configuration properties to allow 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. ........ r6435 | mmatthews | 2007-05-18 13:56:46 -0500 (Fri, 18 May 2007) | 1 line First cut at statement interceptors, need to make them pluggable, and provide something other than a "null" example (caching, "SHOW profile" or "SHOW STATUS" diffs perhaps?) ........ r6436 | mmatthews | 2007-05-23 17:43:02 -0500 (Wed, 23 May 2007) | 1 line Append space after table name if whereClause is specified or non-null in getSingleValue(). ........ r6437 | mmatthews | 2007-05-24 15:17:01 -0500 (Thu, 24 May 2007) | 7 lines Added experimental support for statement "interceptors" via the com.mysql.jdbc.StatementInterceptor interface, examples are in com/mysql/jdbc/interceptors. Implement this interface to be placed "in between" query execution, so that you can influence it. (currently experimental, the API is still open to being modified). StatementInterceptors are "chainable" when configured by the user, the results returned by the "current" interceptor will be passed on to the next on in the chain, from left-to-right order, as specified by the user in the JDBC configuration property "statementInterceptors". See the sources (fully javadoc'd) for com.mysql.jdbc.StatementInterceptor for more details until we iron out the API and get it documented in the manual. ........ r6438 | mmatthews | 2007-05-25 15:16:06 -0500 (Fri, 25 May 2007) | 1 line Fix issue with parsing /* ... */ comments that occur at end-of-line. ........ r6439 | mmatthews | 2007-05-25 15:39:18 -0500 (Fri, 25 May 2007) | 4 lines 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). Removed a couple of extra byte[] allocations when reading the packet header for split packets (we can reuse the existing buffer for these). ........ r6440 | mmatthews | 2007-05-30 12:27:36 -0500 (Wed, 30 May 2007) | 1 line Pickup the thread ID immediately after successful handshake, rather than waiting for initialization of server variables (to make debugging/tracing more correct). ........ r6441 | mmatthews | 2007-06-04 14:18:23 -0500 (Mon, 04 Jun 2007) | 5 lines - 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). ........ r6442 | mmatthews | 2007-06-05 12:56:41 -0500 (Tue, 05 Jun 2007) | 1 line Externalized the descriptions of connection properties. ........ r6443 | mmatthews | 2007-06-06 11:23:46 -0500 (Wed, 06 Jun 2007) | 1 line Added target to generate error mapping and connection properties docs in one go. ........ r6444 | mmatthews | 2007-06-06 14:16:30 -0500 (Wed, 06 Jun 2007) | 4 lines C3P0 >= version 0.9.1 passes non-proxied connections to MysqlConnectionTester, thus it began throwing ClassCastExceptions. MysqlConnectionTester now checks if it has a plain Connection and uses that if possible. Thanks to Brian Skrab for the fix. ........ r6445 | mmatthews | 2007-06-07 10:25:59 -0500 (Thu, 07 Jun 2007) | 5 lines The data (and how it's stored) for ResultSet rows are now behind an interface which allows us (in some cases) to allocate less memory per row, in that for "streaming" result sets, we re-use the packet used to read rows, since only one row at a time is ever active. (tbd: deal with dates/times efficiently, timestamps already covered). ........ r6446 | mmatthews | 2007-06-07 10:30:07 -0500 (Thu, 07 Jun 2007) | 1 line Made it possible to retrieve prepared statement parameter bindings (to be used in StatementInterceptors, primarily). ........ r6447 | mmatthews | 2007-06-07 10:37:52 -0500 (Thu, 07 Jun 2007) | 1 line Tests for PreparedStatementBindings ........ r6448 | mmatthews | 2007-06-07 10:40:36 -0500 (Thu, 07 Jun 2007) | 1 line Updated changelog to reflect RowHolder refactoring, and PreparedStatementBindings implementation. ........ r6449 | mmatthews | 2007-06-14 11:11:19 -0500 (Thu, 14 Jun 2007) | 3 lines Implementations of all "complex" types for result sets now represented in RowHolders. Added "direct" row unpack (bypassing packet code) in MysqlIO.nextRow(), 2x speedup for this method (doesn't equate to 2x speedup in the driver, but there is a performance increase of around 5-10% for most use cases). ........ r6450 | mmatthews | 2007-06-14 20:10:23 -0500 (Thu, 14 Jun 2007) | 3 lines Setting "rewriteBatchedStatements" to "true" now causes CallableStatements with batched arguments to be re-written in the form "CALL (...); CALL (...); ..." to send the batch in as few client-server round trips as possible. ........ r6451 | mmatthews | 2007-06-14 20:24:27 -0500 (Thu, 14 Jun 2007) | 5 lines Some renames around the Row(Holder) classes. Row navigation now causes any streams/readers open on the result set to be closed, as in some cases we're reading directly from a shared network packet and it will be overwritten by the "next" row. ........ r6452 | mmatthews | 2007-06-14 20:25:41 -0500 (Thu, 14 Jun 2007) | 1 line Updated to reflect streams and row navigation, and notice of rewriteBatch for CallableStatement. ........ r6453 | mmatthews | 2007-06-21 11:56:08 -0500 (Thu, 21 Jun 2007) | 4 lines 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". ........ r6454 | mmatthews | 2007-06-21 12:03:53 -0500 (Thu, 21 Jun 2007) | 7 lines Driver now picks appropriate internal row representation (whole row in one buffer, or individual byte[]s for each column value) depending on heuristics, including whether or not the row has BLOB or TEXT types and the overall row-size. The threshold for row size that will cause the driver to use a buffer rather than individual byte[]s is configured by the configuration property "largeRowSizeThreshold", which has a default value of 2KB. ........ r6455 | mmatthews | 2007-06-21 12:06:17 -0500 (Thu, 21 Jun 2007) | 1 line Removed spurious printStackTrace(). ........ r6456 | mmatthews | 2007-06-21 12:07:10 -0500 (Thu, 21 Jun 2007) | 1 line Added "alpha" flag to version. ........ r6457 | mmatthews | 2007-06-21 13:47:21 -0500 (Thu, 21 Jun 2007) | 1 line 5.0 server required for this test. ........ r6458 | mmatthews | 2007-06-21 14:09:42 -0500 (Thu, 21 Jun 2007) | 1 line Removed non-bug test. ........ r6459 | mmatthews | 2007-06-22 08:53:18 -0500 (Fri, 22 Jun 2007) | 1 line Added 5.1.1 release date. Updated changelog notes. ........ r6464 | mmatthews | 2007-06-22 09:41:18 -0500 (Fri, 22 Jun 2007) | 1 line Fixed up substitutions in connection properties messages. ........ r6466 | mmatthews | 2007-06-22 10:53:55 -0500 (Fri, 22 Jun 2007) | 1 line Fixed alpha specifier. ........ r6469 | mmatthews | 2007-06-24 20:39:41 -0500 (Sun, 24 Jun 2007) | 1 line bumped version # and release status. ........ r6471 | mmatthews | 2007-06-28 11:18:10 -0500 (Thu, 28 Jun 2007) | 7 lines - Fixed BUG#28851 - parser in client-side prepared statements eats character following '/' if it's not a multi-line comment. - Fixed BUG#28596 - 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. ........ r6472 | mmatthews | 2007-06-28 15:01:19 -0500 (Thu, 28 Jun 2007) | 6 lines Setting the configuration property "rewriteBatchedStatements" to "true" will now cause the driver to rewrite batched prepared statements with more than 3 parameter sets in a batch into multi-statements (separated by ";") if they are not plain (i.e. without SELECT or ON DUPLICATE KEY UPDATE clauses) INSERT or REPLACE statements. ........ r6475 | mmatthews | 2007-07-03 20:21:38 -0500 (Tue, 03 Jul 2007) | 1 line Bumped version # for next release. ........ r6477 | mmatthews | 2007-07-03 20:37:38 -0500 (Tue, 03 Jul 2007) | 1 line Set properties for svnmerge ........ r6480 | mmatthews | 2007-07-04 00:47:23 -0500 (Wed, 04 Jul 2007) | 15 lines - Setting "useBlobToStoreUTF8OutsideBMP" to "true" tells the driver to treat [MEDIUM/LONG]BLOB columns as [LONG]VARCHAR columns holding text encoded in UTF-8 that has characters outside the BMP (4-byte encodings), which MySQL server can't handle natively. Set "utf8OutsideBmpExcludedColumnNamePattern" to a regex so that column names matching the given regex will still be treated as BLOBs The regex must follow the patterns used for the java.util.regex package. The default is to exclude no columns, and include all columns. Set "utf8OutsideBmpIncludedColumnNamePattern" to specify exclusion rules to "utf8OutsideBmpExcludedColumnNamePattern". The regex must follow the patterns used for the java.util.regex package. ........ r6487 | mmatthews | 2007-07-17 22:34:57 -0500 (Tue, 17 Jul 2007) | 1 line Merges from 5.0. ........ r6488 | mmatthews | 2007-07-17 22:40:05 -0500 (Tue, 17 Jul 2007) | 1 line Fixed typo in bug#. ........ r6492 | mmatthews | 2007-07-18 15:51:25 -0500 (Wed, 18 Jul 2007) | 1 line Fix broken import...Eclipse didn't complain about compiling it or running tests earlier!? ........ r6493 | mmatthews | 2007-07-18 16:17:46 -0500 (Wed, 18 Jul 2007) | 1 line Don't create Maven bundles for commercial builds. They're not needed. ........ r6494 | mmatthews | 2007-08-08 20:59:55 -0500 (Wed, 08 Aug 2007) | 23 lines New methods on com.mysql.jdbc.Statement: setLocalInfileInputStream() and getLocalInfileInputStream(). setLocalInfileInputStream() sets an InputStream instance that will be used to send data to the MySQL server for a "LOAD DATA LOCAL INFILE" statement rather than a FileInputStream or URLInputStream that represents the path given as an argument to the statement. This stream will be read to completion upon execution of a "LOAD DATA LOCAL INFILE" statement, and will automatically be closed by the driver, so it needs to be reset before each call to execute*() that would cause the MySQL server to request data to fulfill the request for "LOAD DATA LOCAL INFILE". If this value is set to NULL, the driver will revert to using a FileInputStream or URLInputStream as required. getLocalInfileInputStream() returns the InputStream instance that will be used to send data in response to a "LOAD DATA LOCAL INFILE" statement. This method returns NULL if no such stream has been set via setLocalInfileInputStream(). ........ r6496 | mmatthews | 2007-08-13 15:22:33 -0500 (Mon, 13 Aug 2007) | 4 lines - The driver now connects with an initial character set of "utf-8" solely for the purposes of authentication to allow usernames and database names in any character set to be used in the JDBC URL. ........ r6497 | mmatthews | 2007-08-20 16:27:49 -0500 (Mon, 20 Aug 2007) | 1 line Some work to support multiple table updatable result sets. None of this is exposed to the enduser (yet), just the scaffolding to hold it up. ........ r6499 | mcbrown | 2007-08-29 09:11:48 -0500 (Wed, 29 Aug 2007) | 3 lines Correcting some typos in descriptions ........ r6509 | mmatthews | 2007-08-29 10:04:49 -0500 (Wed, 29 Aug 2007) | 3 lines Removed merge tracking for "svnmerge" for svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk/connector-j ........ r6510 | mmatthews | 2007-08-29 10:05:32 -0500 (Wed, 29 Aug 2007) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-6392" from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ........ r6513 | mmatthews | 2007-08-29 10:23:58 -0500 (Wed, 29 Aug 2007) | 1 line Merges from 5.0. ........ ................ r6516 | mmatthews | 2007-08-29 11:05:32 -0500 (Wed, 29 Aug 2007) | 1 line Post-merge fixups. ................ r6519 | mmatthews | 2007-08-29 11:21:21 -0500 (Wed, 29 Aug 2007) | 1 line Updated changelogs for bug 30550. ................ r6520 | mmatthews | 2007-08-29 11:27:40 -0500 (Wed, 29 Aug 2007) | 9 lines Merged revisions 6515-6517 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ........ r6517 | mmatthews | 2007-08-29 11:14:04 -0500 (Wed, 29 Aug 2007) | 1 line Merge of fix for Bug 30550. ........ ................ ................ r6530 | mmatthews | 2007-08-29 14:42:13 -0500 (Wed, 29 Aug 2007) | 18 lines Merged revisions 6393-6396,6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6529 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6529 | mmatthews | 2007-08-29 14:31:44 -0500 (Wed, 29 Aug 2007) | 11 lines Merged revisions 6525-6528 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6528 | mmatthews | 2007-08-29 14:27:12 -0500 (Wed, 29 Aug 2007) | 2 lines Fixed BUG#29106 - Connection checker for JBoss didn't use same method parameters via reflection, causing connections to always seem "bad". ........ ................ ................ r6533 | mmatthews | 2007-08-30 10:52:01 -0500 (Thu, 30 Aug 2007) | 24 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6532 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6532 | mmatthews | 2007-08-30 10:32:10 -0500 (Thu, 30 Aug 2007) | 17 lines Merged revisions 6531 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6531 | mmatthews | 2007-08-30 10:21:06 -0500 (Thu, 30 Aug 2007) | 5 lines Fixed BUG#30664. Note that this fix only works for MySQL server versions 5.0.25 and newer, since earlier versions didn't consistently return correct metadata for functions, and thus results from subqueries and functions were indistinguishable from each other, leading to type-related bugs. ........ ................ ................ r6536 | mmatthews | 2007-08-30 15:56:36 -0500 (Thu, 30 Aug 2007) | 20 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6535 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6535 | mmatthews | 2007-08-30 15:52:15 -0500 (Thu, 30 Aug 2007) | 13 lines Merged revisions 6529-6530,6532-6534 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6534 | mmatthews | 2007-08-30 15:46:47 -0500 (Thu, 30 Aug 2007) | 3 lines Fixed BUG#28972, DatabaseMetaData.getTypeInfo() for the types DECIMAL and NUMERIC will return a precision of 254 for server versions older than 5.0.3, 64 for versions 5.0.3-5.0.5 and 65 for versions newer than 5.0.5. ........ ................ ................ r6539 | mmatthews | 2007-08-30 16:49:56 -0500 (Thu, 30 Aug 2007) | 20 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6538 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6538 | mmatthews | 2007-08-30 16:39:03 -0500 (Thu, 30 Aug 2007) | 13 lines Merged revisions 6535-6537 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6537 | mmatthews | 2007-08-30 16:26:34 -0500 (Thu, 30 Aug 2007) | 3 lines Fixed BUG#29852 - Closing a load-balanced connection would cause a ClassCastException. ........ ................ ................ r6543 | mmatthews | 2007-08-30 20:22:50 -0500 (Thu, 30 Aug 2007) | 24 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6542 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6541 | mmatthews | 2007-08-30 20:15:59 -0500 (Thu, 30 Aug 2007) | 13 lines Merged revisions 6538-6540 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6540 | mmatthews | 2007-08-30 19:50:39 -0500 (Thu, 30 Aug 2007) | 3 lines Fixed BUG#27867 - Schema objects with identifiers other than the connection character aren't retrieved correctly in ResultSetMetadata. ........ ................ r6542 | mmatthews | 2007-08-30 20:17:04 -0500 (Thu, 30 Aug 2007) | 1 line Post-merge fixups. ................ ................ r6547 | mmatthews | 2007-09-04 12:34:45 -0500 (Tue, 04 Sep 2007) | 28 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6546 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6546 | mmatthews | 2007-09-04 12:31:26 -0500 (Tue, 04 Sep 2007) | 21 lines Merged revisions 6545 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6545 | mmatthews | 2007-09-04 11:54:36 -0500 (Tue, 04 Sep 2007) | 7 lines Fixed BUG#28689 - CallableStatement.executeBatch() doesn't work when connection property "noAccessToProcedureBodies" has been set to "true". The fix involves changing the behavior of "noAccessToProcedureBodies",in that the driver will now report all paramters as "IN" paramters but allow callers to call registerOutParameter() on them without throwing an exception. ........ ................ ................ r6552 | mmatthews | 2007-09-04 13:40:35 -0500 (Tue, 04 Sep 2007) | 35 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547-6551 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6548 | mmatthews | 2007-09-04 12:41:10 -0500 (Tue, 04 Sep 2007) | 9 lines Merged revisions 6544 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ........ r6544 | mcbrown | 2007-08-31 01:14:57 -0500 (Fri, 31 Aug 2007) | 3 lines Updating the XSL transform for the errors table ........ ................ r6551 | mmatthews | 2007-09-04 13:36:20 -0500 (Tue, 04 Sep 2007) | 17 lines Merged revisions 6541-6544,6546-6550 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6549 | mmatthews | 2007-09-04 12:48:14 -0500 (Tue, 04 Sep 2007) | 2 lines Fixed BUG#27182 - Connection.getServerCharacterEncoding() doesn't work for servers with version >= 4.1. ........ r6550 | mmatthews | 2007-09-04 13:28:45 -0500 (Tue, 04 Sep 2007) | 2 lines Fixed BUG#27915 - DatabaseMetaData.getColumns() doesn't contain SCOPE_* or IS_AUTOINCREMENT columns. ........ ................ ................ r6553 | mmatthews | 2007-09-04 13:48:51 -0500 (Tue, 04 Sep 2007) | 1 line Preparing for release of 5.1.3 RC. ................ r6557 | mmatthews | 2007-09-04 16:50:39 -0500 (Tue, 04 Sep 2007) | 20 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6556 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6556 | mmatthews | 2007-09-04 16:39:47 -0500 (Tue, 04 Sep 2007) | 13 lines Merged revisions 6551-6555 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6554 | mmatthews | 2007-09-04 16:17:57 -0500 (Tue, 04 Sep 2007) | 1 line Fixed BUG#21116, revision not updated in DBMD.getDriverVersion() when released (we now stuff in the svn revision of the directory). ........ r6555 | mmatthews | 2007-09-04 16:19:51 -0500 (Tue, 04 Sep 2007) | 1 line Allow source builds to work, even if not checked out from SVN. ........ ................ ................ r6558 | mmatthews | 2007-09-04 18:27:09 -0500 (Tue, 04 Sep 2007) | 1 line Post-merge fixups. ................ r6559 | mmatthews | 2007-09-04 18:27:34 -0500 (Tue, 04 Sep 2007) | 1 line Fixups for 5.1. ................ r6560 | mmatthews | 2007-09-04 18:31:01 -0500 (Tue, 04 Sep 2007) | 1 line A nicer toString(). ................ r6561 | mmatthews | 2007-09-05 10:59:46 -0500 (Wed, 05 Sep 2007) | 19 lines Errors encountered during Statement/PreparedStatement/CallableStatement.executeBatch() when "rewriteBatchStatements" has been set to "true" now return BatchUpdateExceptions according to the setting of "continueBatchOnError". If "continueBatchOnError" is set to "true", the update counts for the "chunk" that were sent as one unit will all be set to EXECUTE_FAILED, but the driver will attempt to process the remainder of the batch. You can determine which "chunk" failed by looking at the update counts returned in the BatchUpdateException. If "continueBatchOnError" is set to "false", the update counts returned will contain the failed "chunk", and stop with the failed chunk, with all counts for the failed "chunk" set to EXECUTE_FAILED. Since MySQL doesn't return multiple error codes for multiple-statements, or for multi-value INSERT/REPLACE, it is the application's responsibility to handle determining which item(s) in the "chunk" actually failed. - Statement.setQueryTimeout()s now affect the entire batch for batched statements, rather than the individual statements that make up the batch. ................ r6562 | mmatthews | 2007-09-05 11:02:17 -0500 (Wed, 05 Sep 2007) | 1 line After some refactorings of the character set handling code, changeUser() wasn't resetting the character set after the server cleared it. ................ r6566 | mmatthews | 2007-09-06 09:14:17 -0500 (Thu, 06 Sep 2007) | 20 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6565 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6565 | mmatthews | 2007-09-06 09:07:15 -0500 (Thu, 06 Sep 2007) | 13 lines Merged revisions 6556-6564 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6563 | mmatthews | 2007-09-06 09:02:01 -0500 (Thu, 06 Sep 2007) | 1 line Fixed BUG#30851, NPE with null column values when "padCharsWithSpace" is set to "true". ........ r6564 | mmatthews | 2007-09-06 09:03:59 -0500 (Thu, 06 Sep 2007) | 1 line Tags for inserting revision created. ........ ................ ................ ................ r6568 | mmatthews | 2007-09-06 10:42:38 -0500 (Thu, 06 Sep 2007) | 1 line Post-merge fixups (don't trust tortoise merge again!) ................ r6570 | mmatthews | 2007-09-06 14:01:57 -0500 (Thu, 06 Sep 2007) | 17 lines Merged revisions 6565-6569 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6569 | mmatthews | 2007-09-06 13:42:19 -0500 (Thu, 06 Sep 2007) | 5 lines Specifying a "validation query" in your connection pool that starts with "/* ping */" _exactly_ will cause the driver to instead send a ping to the server and return a fake result set (much lighter weight), and when using a ReplicationConnection or a LoadBalancedConnection, will send the ping across all active connections. ........ ................ r6571 | mmatthews | 2007-09-06 14:28:31 -0500 (Thu, 06 Sep 2007) | 1 line Post-merge fixups. Too bad svnmerge requires pristine trees, doesn't play well with an Eclipse workspace :( ................ ................ r6575 | mmatthews | 2007-09-07 09:12:54 -0500 (Fri, 07 Sep 2007) | 18 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572-6574 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6573 | mmatthews | 2007-09-07 09:01:45 -0500 (Fri, 07 Sep 2007) | 11 lines Merged revisions 6570-6572 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6572 | mmatthews | 2007-09-07 08:48:19 -0500 (Fri, 07 Sep 2007) | 2 lines - Fixed Bug#30892 setObject(int, Object, int, int) delegate in PreparedStatmentWrapper delegates to wrong method. ........ ................ ................ r6587 | mmatthews | 2007-09-15 15:58:27 -0500 (Sat, 15 Sep 2007) | 6 lines Added "autoSlowLog" configuration property, overrides "slowQueryThreshold*" properties, driver determines slow queries by those that are slower than 5 * stddev of the mean query time (outside the 96% percentile). Externalized some utf-8 related connection property descriptions. ................ r6588 | mmatthews | 2007-09-15 16:01:29 -0500 (Sat, 15 Sep 2007) | 3 lines Only update row "validity" on navigation, reduces time spent in value retrieval when seeing if we're on a valid row or not. Moved a hot method call (to get a configuration that stays the same for the lifetime of a connection) to a field that is set during instantiation. ................ r6589 | mmatthews | 2007-09-15 21:05:52 -0500 (Sat, 15 Sep 2007) | 1 line Added mapings for new 4-byte utf8, utf16 and utf32 collations/charsets for 5.2/6.0 server. ................ r6590 | mmatthews | 2007-09-26 05:28:04 -0500 (Wed, 26 Sep 2007) | 1 line Added ability to hook into connection lifecycle events via an extension interface. ................ r6591 | mmatthews | 2007-09-26 05:30:30 -0500 (Wed, 26 Sep 2007) | 1 line Added actual interface you need to _implement_ for StatementInterceptors. ................ r6592 | mmatthews | 2007-09-26 06:44:41 -0500 (Wed, 26 Sep 2007) | 1 line Clarification of utf-8 blob mappings for the TINYBLOB type. ................ r6598 | mmatthews | 2007-10-02 14:55:49 -0500 (Tue, 02 Oct 2007) | 115 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6597 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6578 | mmatthews | 2007-09-07 11:36:32 -0500 (Fri, 07 Sep 2007) | 13 lines Merged revisions 6576-6577 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ........ r6576 | mmatthews | 2007-09-07 11:11:05 -0500 (Fri, 07 Sep 2007) | 1 line Deal with stored procedures using user variables, and thus calling byteArrayToBoolean() when we're really dealing with an ASCII string but can't tell (so look for '1' and '0' first). ........ r6577 | mmatthews | 2007-09-07 11:12:04 -0500 (Fri, 07 Sep 2007) | 1 line Added charset information to .toString() output. ........ ................ r6585 | mmatthews | 2007-09-11 23:02:40 -0500 (Tue, 11 Sep 2007) | 9 lines Merged revisions 6584 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ........ r6584 | mcbrown | 2007-09-11 09:28:15 -0500 (Tue, 11 Sep 2007) | 3 lines Fixing the description of jdbcCompliantTruncation ........ ................ r6586 | mmatthews | 2007-09-11 23:03:37 -0500 (Tue, 11 Sep 2007) | 8 lines Blocked revisions 6583 via svnmerge ........ r6583 | mmatthews | 2007-09-10 12:47:08 -0500 (Mon, 10 Sep 2007) | 1 line Bumped version #. ........ ................ r6593 | mmatthews | 2007-09-26 07:02:47 -0500 (Wed, 26 Sep 2007) | 43 lines Merged revisions 6587-6592 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ........ r6587 | mmatthews | 2007-09-15 15:58:27 -0500 (Sat, 15 Sep 2007) | 6 lines Added "autoSlowLog" configuration property, overrides "slowQueryThreshold*" properties, driver determines slow queries by those that are slower than 5 * stddev of the mean query time (outside the 96% percentile). Externalized some utf-8 related connection property descriptions. ........ r6588 | mmatthews | 2007-09-15 16:01:29 -0500 (Sat, 15 Sep 2007) | 3 lines Only update row "validity" on navigation, reduces time spent in value retrieval when seeing if we're on a valid row or not. Moved a hot method call (to get a configuration that stays the same for the lifetime of a connection) to a field that is set during instantiation. ........ r6589 | mmatthews | 2007-09-15 21:05:52 -0500 (Sat, 15 Sep 2007) | 1 line Added mapings for new 4-byte utf8, utf16 and utf32 collations/charsets for 5.2/6.0 server. ........ r6590 | mmatthews | 2007-09-26 05:28:04 -0500 (Wed, 26 Sep 2007) | 1 line Added ability to hook into connection lifecycle events via an extension interface. ........ r6591 | mmatthews | 2007-09-26 05:30:30 -0500 (Wed, 26 Sep 2007) | 1 line Added actual interface you need to _implement_ for StatementInterceptors. ........ r6592 | mmatthews | 2007-09-26 06:44:41 -0500 (Wed, 26 Sep 2007) | 1 line Clarification of utf-8 blob mappings for the TINYBLOB type. ........ ................ r6596 | mmatthews | 2007-10-02 14:46:56 -0500 (Tue, 02 Oct 2007) | 9 lines Merged revisions 6594 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6594 | mmatthews | 2007-10-01 10:14:53 -0500 (Mon, 01 Oct 2007) | 1 line XAConnections now start in auto-commit mode (as per JDBC-4.0 specification clarification). ........ ................ r6597 | mmatthews | 2007-10-02 14:49:47 -0500 (Tue, 02 Oct 2007) | 16 lines Merged revisions 6573-6593,6595-6596 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6579 | mmatthews | 2007-09-07 12:31:06 -0500 (Fri, 07 Sep 2007) | 2 lines Blocked revisions 3986-3990,4009-4020,4024,4046,4050,4053-4058,4067,4095,4097-4098,4122-4130,4135,4159-4160,4162,4164-4165,4178,4209,4243-4245,4256-4258,4265,4287,4291,4296-4297,4307-4308,4336,4354-4358,4374,4378,4388-4389,4420,4471,4500,4503,4505,4523,4533,4553,4558-4559,4564-4565,4567,4580,4586-4587,4590,4592-4593,4595-4596,4601,4618-4619,4621,4623,4626-4627,4637,4662-4663,4680,4705,4707,4709,4715,4717-4718,4720,4722-4723,4773,4815,4819-4822,4873,4887,4906,4945,4971,4983-4984,5024,5034-5037,5040,5044,5052,5120-5125,5127-5129,5184-5185,5187-5188,5207,5247,5312-5323,5327,5332,5335,5389,5391-5393,5400-5401,5403,5446,5511,5524,5526,5530-5531,5554-5555,5639,5682,5833,5850,5852-5853,5866,5888-5892,5898-5900,5907,5917,5935,6035,6083,6095-6096,6132,6307,6348,6371,6427,6436,6444,6493 via svnmerge [removed log messages to not trip up the bugs system] ........ r6595 | mmatthews | 2007-10-02 14:36:55 -0500 (Tue, 02 Oct 2007) | 2 lines Fixed Bug#27412 - cached metadata with PreparedStatement.execute() throws NullPointerException. ........ ................ ................ r6603 | mmatthews | 2007-10-03 09:58:39 -0500 (Wed, 03 Oct 2007) | 38 lines Merged revisions 6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6602 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk ................ r6602 | mmatthews | 2007-10-03 09:51:58 -0500 (Wed, 03 Oct 2007) | 31 lines Merged revisions 6597-6601 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6599 | mmatthews | 2007-10-02 17:34:20 -0500 (Tue, 02 Oct 2007) | 3 lines Driver will now fall back to sane defaults for max_allowed_packet and net_buffer_length if the server reports them incorrectly (and will log this situation at WARN level, since it's actually an error condition). ........ r6600 | mmatthews | 2007-10-02 17:35:59 -0500 (Tue, 02 Oct 2007) | 1 line Off by one error in error message indexing. ........ r6601 | mmatthews | 2007-10-03 09:24:12 -0500 (Wed, 03 Oct 2007) | 6 lines Fixed BUG#27916 - UNSIGNED types not reported via DBMD.getTypeInfo(), and capitalization of type names is not consistent between DBMD.getColumns(), RSMD.getColumnTypeName() and DBMD.getTypeInfo(). This fix also ensures that the precision of UNSIGNED MEDIUMINT and UNSIGNED BIGINT is reported correctly via DBMD.getColumns(). ........ ................ ................ r6604 | mmatthews | 2007-10-03 10:13:11 -0500 (Wed, 03 Oct 2007) | 1 line Post merge fixup, putting back removed properties. ................ r6606 | mmatthews | 2007-10-03 11:10:51 -0500 (Wed, 03 Oct 2007) | 1 line Convert to using RowHolders for getTypeInfo() - missed in merge. ................ ................ ................ r6611 | mmatthews | 2007-10-03 13:53:55 -0500 (Wed, 03 Oct 2007) | 3 lines Fixed BUG#28256 - When connection is in read-only mode, queries that are wrapped in parentheses incorrectly identified as DML. ................ ............... r6615 | mmatthews | 2007-10-04 14:50:37 -0500 (Thu, 04 Oct 2007) | 25 lines Merged revisions 6608-6614 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0 ........ r6614 | mmatthews | 2007-10-04 14:31:52 -0500 (Thu, 04 Oct 2007) | 9 lines Fixed BUG#31053 - Connections established using URLs of the form "jdbc:mysql:loadbalance://" weren't doing failover if they tried to connect to a MySQL server that was down. The driver now attempts connections to the next "best" (depending on the load balance strategy in use) server, and continues to attempt connecting to the next "best" server every 250 milliseconds until one is found that is up and running or 5 minutes has passed. If the driver gives up, it will throw the last-received SQLException. ........ ............... r6616 | mmatthews | 2007-10-04 14:57:22 -0500 (Thu, 04 Oct 2007) | 11 lines Merged revisions 6585-6586,6593-6597,6599-6602,6605,6607-6609,6612-6615 via svnmerge from svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1 ........ r6613 | mmatthews | 2007-10-04 11:56:05 -0500 (Thu, 04 Oct 2007) | 2 lines JDBC-4.0-ize the wrappers for ConnectionPoolDataSource, and add a interface implementation test...Oddly enough the Java compiler doesn't re-check already compiled classes to make sure they implement all methods in an interface. Our JDBC-4.0 implementations extend classes that were compiled with a compiler that only knows JDBC-3.0, and thus any missing methods show up at runtime, not compile time. ........ ............... Property changes on: branches/branch_5_1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk:1-6396,6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6609 + /trunk:1-6396,6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6616 Modified: branches/branch_5_1/connector-j/CHANGES =================================================================== --- branches/branch_5_1/connector-j/CHANGES 2007-10-04 20:59:51 UTC (rev 6620) +++ branches/branch_5_1/connector-j/CHANGES 2007-10-05 18:53:09 UTC (rev 6621) @@ -289,6 +289,16 @@ This fix also ensures that the precision of UNSIGNED MEDIUMINT and UNSIGNED BIGINT is reported correctly via DBMD.getColumns(). + - Fixed BUG#31053 - Connections established using URLs of the form + "jdbc:mysql:loadbalance://" weren't doing failover if they tried to + connect to a MySQL server that was down. The driver now attempts + connections to the next "best" (depending on the load balance strategy + in use) server, and continues to attempt connecting to the next "best" + server every 250 milliseconds until one is found that is up and running + or 5 minutes has passed. + + If the driver gives up, it will throw the last-received SQLException. + 07-19-07 - Version 5.0.7 - Setting the configuration parameter "useCursorFetch" to "true" for Modified: branches/branch_5_1/connector-j/src/com/mysql/jdbc/LoadBalancingConnectionProxy.java =================================================================== --- branches/branch_5_1/connector-j/src/com/mysql/jdbc/LoadBalancingConnectionProxy.java 2007-10-04 20:59:51 UTC (rev 6620) +++ branches/branch_5_1/connector-j/src/com/mysql/jdbc/LoadBalancingConnectionProxy.java 2007-10-05 18:53:09 UTC (rev 6621) @@ -80,30 +80,73 @@ int bestHostIndex = 0; - for (int i = 0; i < responseTimes.length; i++) { - long candidateResponseTime = responseTimes[i]; - - if (candidateResponseTime < minResponseTime) { - if (candidateResponseTime == 0) { + long[] localResponseTimes = new long[responseTimes.length]; + + synchronized (responseTimes) { + System.arraycopy(responseTimes, 0, localResponseTimes, 0, responseTimes.length); + } + + SQLException ex = null; + + for (int attempts = 0; attempts < 1200 /* 5 minutes */; attempts++) { + for (int i = 0; i < localResponseTimes.length; i++) { + long candidateResponseTime = localResponseTimes[i]; + + if (candidateResponseTime < minResponseTime) { + if (candidateResponseTime == 0) { + bestHostIndex = i; + + break; + } + bestHostIndex = i; - - break; + minResponseTime = candidateResponseTime; } - - bestHostIndex = i; - minResponseTime = candidateResponseTime; } + + if (bestHostIndex == localResponseTimes.length - 1) { + // try again, assuming that the previous list was mostly + // correct as far as distribution of response times went + + synchronized (responseTimes) { + System.arraycopy(responseTimes, 0, localResponseTimes, 0, responseTimes.length); + } + + continue; + } + String bestHost = (String) hostList.get(bestHostIndex); + + Connection conn = (Connection) liveConnections.get(bestHost); + + if (conn == null) { + try { + conn = createConnectionForHost(bestHost); + } catch (SQLException sqlEx) { + ex = sqlEx; + + if (sqlEx instanceof CommunicationsException || "08S01".equals(sqlEx.getSQLState())) { + localResponseTimes[bestHostIndex] = Long.MAX_VALUE; + + try { + Thread.sleep(250); + } catch (InterruptedException e) { + } + + continue; + } else { + throw sqlEx; + } + } + } + + return conn; } - - String bestHost = (String) hostList.get(bestHostIndex); - - Connection conn = (Connection) liveConnections.get(bestHost); - - if (conn == null) { - conn = createConnectionForHost(bestHost); + + if (ex != null) { + throw ex; } - - return conn; + + return null; // we won't get here, compiler can't tell } } @@ -146,14 +189,41 @@ String hostPortSpec = (String) hostList.get(random); - Connection conn = (Connection) liveConnections.get(hostPortSpec); - - if (conn == null) { - conn = createConnectionForHost(hostPortSpec); + SQLException ex = null; + + for (int attempts = 0; attempts < 1200 /* 5 minutes */; attempts++) { + Connection conn = (Connection) liveConnections.get(hostPortSpec); + + if (conn == null) { + try { + conn = createConnectionForHost(hostPortSpec); + } catch (SQLException sqlEx) { + ex = sqlEx; + + if (sqlEx instanceof CommunicationsException || "08S01".equals(sqlEx.getSQLState())) { + + try { + Thread.sleep(250); + } catch (InterruptedException e) { + } + + continue; + } else { + throw sqlEx; + } + } + } + + return conn; } + + if (ex != null) { + throw ex; + } + + return null; // we won't get here, compiler can't tell + } - return conn; - } } private Connection currentConn; @@ -247,7 +317,7 @@ connProps.setProperty(NonRegisteringDriver.PORT_PROPERTY_KEY, hostPortPair[1]); - Connection conn = new ConnectionImpl(hostPortSpec, Integer + Connection conn = ConnectionImpl.getInstance(hostPortSpec, Integer .parseInt(hostPortPair[1]), connProps, connProps .getProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY), "jdbc:mysql://" + hostPortPair[0] + ":" + hostPortPair[1] + "/"); @@ -370,8 +440,10 @@ .get(this.connectionsToHostsMap.get(this.currentConn))) .intValue(); - this.responseTimes[hostIndex] = getLocalTimeBestResolution() - - this.transactionStartTime; + synchronized (this.responseTimes) { + this.responseTimes[hostIndex] = getLocalTimeBestResolution() + - this.transactionStartTime; + } pickNewConnection(); }