MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:mmatthews Date:September 6 2007 3:12pm
Subject:Connector/J commit: r6567 - in trunk: . connector-j connector-j/src/com/mysql/jdbc connector-j/src/com/mysql/jdbc/exceptions connector-j/src/testsuite...
View as plain text  
Added:
   trunk/connector-j/src/com/mysql/jdbc/exceptions/MySQLStatementCancelledException.java
Modified:
   trunk/
   trunk/connector-j/CHANGES
   trunk/connector-j/src/com/mysql/jdbc/CallableStatement.java
   trunk/connector-j/src/com/mysql/jdbc/ConnectionImpl.java
   trunk/connector-j/src/com/mysql/jdbc/ConnectionProperties.java
   trunk/connector-j/src/com/mysql/jdbc/ConnectionPropertiesImpl.java
   trunk/connector-j/src/com/mysql/jdbc/Field.java
   trunk/connector-j/src/com/mysql/jdbc/PreparedStatement.java
   trunk/connector-j/src/com/mysql/jdbc/ServerPreparedStatement.java
   trunk/connector-j/src/com/mysql/jdbc/StatementImpl.java
   trunk/connector-j/src/com/mysql/jdbc/UpdatableResultSet.java
   trunk/connector-j/src/testsuite/regression/CallableStatementRegressionTest.java
   trunk/connector-j/src/testsuite/regression/MetaDataRegressionTest.java
   trunk/connector-j/src/testsuite/regression/ResultSetRegressionTest.java
   trunk/connector-j/src/testsuite/simple/CallableStatementTest.java
   trunk/connector-j/src/testsuite/simple/DataSourceTest.java
   trunk/connector-j/src/testsuite/simple/StatementsTest.java
Log:
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.
    ........
  ................
...............



Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/branch_5_0:1-6564 /branches/branch_5_1:1-6517,6544
   + /branches/branch_5_0:1-6564 /branches/branch_5_1:1-6566

Modified: trunk/connector-j/CHANGES
===================================================================
--- trunk/connector-j/CHANGES	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/CHANGES	2007-09-06 15:12:14 UTC (rev 6567)
@@ -1,28 +1,28 @@
 # Changelog
 # $Id$
 
-nn-nn-07 - Version 5.1.3 RC
+09-07-07 - Version 5.1.3 RC
 
-    - 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.
+	- 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 "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.
+	  Set "utf8OutsideBmpIncludedColumnNamePattern" to specify exclusion
+	  rules to "utf8OutsideBmpExcludedColumnNamePattern". The regex must
+	  follow the patterns used for the java.util.regex package.
 
-    - New methods on com.mysql.jdbc.Statement: setLocalInfileInputStream()
-      and getLocalInfileInputStream().
+	- New methods on com.mysql.jdbc.Statement: setLocalInfileInputStream()
+	  and getLocalInfileInputStream().
 
-      setLocalInfileInputStream() sets an InputStream instance that will be used to send data
+	  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.
@@ -48,6 +48,26 @@
       allow usernames and database names in any character set to
       be used in the JDBC URL.
 
+    - 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.
+      
 06-29-07 - Version 5.1.2 Beta
 
     - Setting the configuration property "rewriteBatchedStatements"
@@ -128,56 +148,56 @@
 
 04-11-07 - Version 5.1.0 Alpha
 
-    - Bumped JDBC Specification version number in jar-file manifest.
+	- Bumped JDBC Specification version number in jar-file manifest.
 
-    - Re-worked Ant buildfile to build JDBC-4.0 classes separately, as well
-      as support building under Eclipse (since Eclipse can't mix/match JDKs).
+	- Re-worked Ant buildfile to build JDBC-4.0 classes separately, as well
+	  as support building under Eclipse (since Eclipse can't mix/match JDKs).
 
-      To build, you must set JAVA_HOME to J2SDK-1.4.2 or Java-5, and set
-      the following properties on your Ant commandline:
+	  To build, you must set JAVA_HOME to J2SDK-1.4.2 or Java-5, and set
+	  the following properties on your Ant commandline:
 
-      com.mysql.jdbc.java6.javac - full path to your Java-6 javac executable
-      com.mysql.jdbc.java6.rtjar - full path to your Java-6 rt.jar file
+	  com.mysql.jdbc.java6.javac - full path to your Java-6 javac executable
+	  com.mysql.jdbc.java6.rtjar - full path to your Java-6 rt.jar file
 
-    - New feature - driver will automatically adjust session variable
-      "net_write_timeout" when it determines its been asked for a "streaming"
-      result, and resets it to the previous value when the result set
-      has been consumed. (configuration property is named
-      "netTimeoutForStreamingResults", value has unit of seconds,
-      the value '0' means the driver will not try and adjust this value).
+	- New feature - driver will automatically adjust session variable
+	  "net_write_timeout" when it determines its been asked for a "streaming"
+	  result, and resets it to the previous value when the result set
+	  has been consumed. (configuration property is named
+	  "netTimeoutForStreamingResults", value has unit of seconds,
+	  the value '0' means the driver will not try and adjust this value).
 
     - Added support for JDBC-4.0 categorized SQLExceptions.
 
-    - Refactored CommunicationsException into a JDBC3 version, and a JDBC4
-      version (which extends SQLRecoverableException, now that it exists).
+	- Refactored CommunicationsException into a JDBC3 version, and a JDBC4
+	  version (which extends SQLRecoverableException, now that it exists).
 
-      This change means that if you were catching
-      com.mysql.jdbc.CommunicationsException in your applications instead
-      of looking at the SQLState class of "08", and are moving to Java 6
-      (or newer), you need to change your imports to that exception
-      to be com.mysql.jdbc.exceptions.jdbc4.CommunicationsException, as
-      the old class will not be instantiated for communications link-related
-      errors under Java 6.
+	  This change means that if you were catching
+	  com.mysql.jdbc.CommunicationsException in your applications instead
+	  of looking at the SQLState class of "08", and are moving to Java 6
+	  (or newer), you need to change your imports to that exception
+	  to be com.mysql.jdbc.exceptions.jdbc4.CommunicationsException, as
+	  the old class will not be instantiated for communications link-related
+	  errors under Java 6.
 
-    - Added support for JDBC-4.0's client information. The backend storage
-      of information provided via Connection.setClientInfo() and retrieved
-      by Connection.getClientInfo() is pluggable by any class that implements
-      the com.mysql.jdbc.JDBC4ClientInfoProvider interface and has a no-args
-      constructor.
+	- Added support for JDBC-4.0's client information. The backend storage
+	  of information provided via Connection.setClientInfo() and retrieved
+	  by Connection.getClientInfo() is pluggable by any class that implements
+	  the com.mysql.jdbc.JDBC4ClientInfoProvider interface and has a no-args
+	  constructor.
 
-      The implementation used by the driver is configured using the
-      "clientInfoProvider" configuration property (with a default of value
-      of "com.mysql.jdbc.JDBC4CommentClientInfoProvider", an implementation
-      which lists the client info as a comment prepended to every query
-      sent to the server).
+	  The implementation used by the driver is configured using the
+	  "clientInfoProvider" configuration property (with a default of value
+	  of "com.mysql.jdbc.JDBC4CommentClientInfoProvider", an implementation
+	  which lists the client info as a comment prepended to every query
+	  sent to the server).
 
-      This functionality is only available when using Java-6 or newer.
+	  This functionality is only available when using Java-6 or newer.
 
-    - Added support for JDBC-4.0's SQLXML interfaces.
+	- Added support for JDBC-4.0's SQLXML interfaces.
 
-    - Added support for JDBC-4.0's Wrapper interface.
+	- Added support for JDBC-4.0's Wrapper interface.
 
-    - Added support for JDBC-4.0's NCLOB, and NCHAR/NVARCHAR types.
+	- Added support for JDBC-4.0's NCLOB, and NCHAR/NVARCHAR types.
 
 nn-nn-07 - Version 5.0.8
 
@@ -230,9 +250,6 @@
     - Fixed BUG#27915 - DatabaseMetaData.getColumns() doesn't
       contain SCOPE_* or IS_AUTOINCREMENT columns.
 
-    - Fixed BUG#30851, NPE with null column values when
-      "padCharsWithSpace" is set to "true".
-      
 07-19-07 - Version 5.0.7
 
     - Setting the configuration parameter "useCursorFetch" to "true" for
@@ -245,12 +262,12 @@
       "true" when "useCursorFetch" has been set to "true", since the feature
       requires server-side prepared statements in order to function.
 
-    - Fixed BUG#28469 - PreparedStatement.getMetaData() for statements
-      containing leading one-line comments is not returned correctly.
+	- 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.
+	  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.
 
     - Added configuration property "useNanosForElapsedTime" - for
       profiling/debugging functionality that measures elapsed time,
@@ -270,198 +287,198 @@
       have an upper bound of approximately 2000 millesconds (as that threshold
       is represented as an integer, not a long).
 
-    - Added configuration properties to allow tuning of TCP/IP socket
-      parameters:
+	- 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")?
+	  	"tcpNoDelay" - Should the driver set SO_TCP_NODELAY (disabling the
+	  	               Nagle Algorithm, default "true")?
 
-        "tcpKeepAlive" - Should the driver set SO_KEEPALIVE (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.
+		"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.
+		"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.
+		"tcpTrafficClass" - Should the driver set traffic class or
+		                    type-of-service fields? See the documentation
+		                    for java.net.Socket.setTrafficClass() for more
+		                    information.
 
-    - 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).
+	- 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).
 
-    - 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).
+	- 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).
 
-    - 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".
+	- 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".
 
-    - Fixed BUG#28851 - parser in client-side prepared statements
-      eats character following '/' if it's not a multi-line comment.
+	- Fixed BUG#28851 - parser in client-side prepared statements
+	  eats character following '/' if it's not a multi-line comment.
 
-    - Fixed BUG#28956 - parser in client-side prepared statements
-      runs to end of statement, rather than end-of-line for '#' comments.
+	- Fixed BUG#28956 - 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.
+	  Also added support for '--' single-line comments.
 
-    - 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. This fixes BUG 29605 for JDBC.
+	- 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. This fixes BUG 29605 for JDBC.
 
-    - 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 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.
 
 05-15-07 - Version 5.0.6
 
-    - Fixed BUG#25545 - Client options not sent correctly when using SSL,
-      leading to stored procedures not being able to return results. Thanks
-      to Don Cohen for the bug report, testcase and patch.
+	- Fixed BUG#25545 - Client options not sent correctly when using SSL,
+	  leading to stored procedures not being able to return results. Thanks
+	  to Don Cohen for the bug report, testcase and patch.
 
-    - Fixed BUG#26592 - PreparedStatement is not closed in
-      BlobFromLocator.getBytes().
+	- Fixed BUG#26592 - PreparedStatement is not closed in
+	  BlobFromLocator.getBytes().
 
-    - Fixed BUG#25624 - Whitespace surrounding storage/size specifiers in
-      stored procedure parameters declaration causes NumberFormatException to
-      be thrown when calling stored procedure on JDK-1.5 or newer, as the Number
-      classes in JDK-1.5+ are whitespace intolerant.
+	- Fixed BUG#25624 - Whitespace surrounding storage/size specifiers in
+	  stored procedure parameters declaration causes NumberFormatException to
+	  be thrown when calling stored procedure on JDK-1.5 or newer, as the Number
+	  classes in JDK-1.5+ are whitespace intolerant.
 
-    - Fixed BUG#26173 - When useCursorFetch=true, sometimes server would return
-      new, more exact metadata during the execution of the server-side prepared
-      statement that enables this functionality, which the driver ignored (using
-      the original metadata returned during prepare()), causing corrupt reading
-      of data due to type mismatch when the actual rows were returned.
+	- Fixed BUG#26173 - When useCursorFetch=true, sometimes server would return
+	  new, more exact metadata during the execution of the server-side prepared
+	  statement that enables this functionality, which the driver ignored (using
+	  the original metadata returned during prepare()), causing corrupt reading
+	  of data due to type mismatch when the actual rows were returned.
 
-    - Fixed BUG#26959 - comments in DDL of stored procedures/functions confuse
-      procedure parser, and thus metadata about them can not be created, leading to
-      inability to retrieve said metadata, or execute procedures that have certain
-      comments in them.
+	- Fixed BUG#26959 - comments in DDL of stored procedures/functions confuse
+	  procedure parser, and thus metadata about them can not be created, leading to
+	  inability to retrieve said metadata, or execute procedures that have certain
+	  comments in them.
 
-    - Give better error message when "streaming" result sets, and the connection
-      gets clobbered because of exceeding net_write_timeout on the server. (which is
-      basically what the error message says too).
+	- Give better error message when "streaming" result sets, and the connection
+	  gets clobbered because of exceeding net_write_timeout on the server. (which is
+	  basically what the error message says too).
 
-    - Fixed BUG#26789 - fast date/time parsing doesn't take into
-      account 00:00:00 as a legal value.
+	- Fixed BUG#26789 - fast date/time parsing doesn't take into
+	  account 00:00:00 as a legal value.
 
-    - Fixed BUG#27317 - ResultSet.get*() with a column index < 1 returns
-      misleading error message.
+	- Fixed BUG#27317 - ResultSet.get*() with a column index < 1 returns
+	  misleading error message.
 
-    - Fixed BUG#25517 - Statement.setMaxRows() is not effective on result
-      sets materialized from cursors.
+	- Fixed BUG#25517 - Statement.setMaxRows() is not effective on result
+	  sets materialized from cursors.
 
-    - New configuration property, "enableQueryTimeouts" (default "true").
-      When enabled, query timeouts set via Statement.setQueryTimeout() use a
-      shared java.util.Timer instance for scheduling. Even if the timeout
-      doesn't expire before the query is processed, there will be
-      memory used by the TimerTask for the given timeout which won't be
-      reclaimed until the time the timeout would have expired if it
-      hadn't been cancelled by the driver. High-load environments
-      might want to consider disabling this functionality. (this configuration
-      property is part of the "maxPerformance" configuration bundle).
+	- New configuration property, "enableQueryTimeouts" (default "true").
+	  When enabled, query timeouts set via Statement.setQueryTimeout() use a
+	  shared java.util.Timer instance for scheduling. Even if the timeout
+	  doesn't expire before the query is processed, there will be
+	  memory used by the TimerTask for the given timeout which won't be
+	  reclaimed until the time the timeout would have expired if it
+	  hadn't been cancelled by the driver. High-load environments
+	  might want to consider disabling this functionality. (this configuration
+	  property is part of the "maxPerformance" configuration bundle).
 
-    - Fixed BUG#27400 - CALL /* ... */ some_proc() doesn't work. As a side effect
-      of this fix, you can now use /* */ and # comments when preparing statements using
-      client-side prepared statement emulation.
+	- Fixed BUG#27400 - CALL /* ... */ some_proc() doesn't work. As a side effect
+	  of this fix, you can now use /* */ and # comments when preparing statements using
+	  client-side prepared statement emulation.
 
-      If the comments happen to contain parameter markers '?', they will be treated
-      as belonging to the comment (i.e. not recognized) rather than being a parameter
-      of the statement.
+	  If the comments happen to contain parameter markers '?', they will be treated
+	  as belonging to the comment (i.e. not recognized) rather than being a parameter
+	  of the statement.
 
-      Note that the statement when sent to the server will contain the comments
-      as-is, they're not stripped during the process of preparing the PreparedStatement
-      or CallableStatement.
+	  Note that the statement when sent to the server will contain the comments
+	  as-is, they're not stripped during the process of preparing the PreparedStatement
+	  or CallableStatement.
 
-    - Fixed BUG#25328 - BIT(> 1) is returned as java.lang.String from ResultSet.getObject()
-      rather than byte[].
+	- Fixed BUG#25328 - BIT(> 1) is returned as java.lang.String from ResultSet.getObject()
+	  rather than byte[].
 
-    - Fixed BUG#25715 - CallableStatements with OUT/INOUT parameters that
-      are "binary" (blobs, bits, (var)binary, java_object) have extra 7 bytes
-      (which happens to be the _binary introducer!)
+	- Fixed BUG#25715 - CallableStatements with OUT/INOUT parameters that
+	  are "binary" (blobs, bits, (var)binary, java_object) have extra 7 bytes
+	  (which happens to be the _binary introducer!)
 
-    - Added configuration property "padCharsWithSpace" (defaults to "false"). If set
-      to "true", and a result set column has the CHAR type and the value does not
-      fill the amount of characters specified in the DDL for the column, the driver
-      will pad the remaining characters with space (for ANSI compliance).
+	- Added configuration property "padCharsWithSpace" (defaults to "false"). If set
+	  to "true", and a result set column has the CHAR type and the value does not
+	  fill the amount of characters specified in the DDL for the column, the driver
+	  will pad the remaining characters with space (for ANSI compliance).
 
-    - Fixed BUG#27655 - Connection.getTransactionIsolation() uses
-      "SHOW VARIABLES LIKE" which is very inefficient on MySQL-5.0+
+	- Fixed BUG#27655 - Connection.getTransactionIsolation() uses
+	  "SHOW VARIABLES LIKE" which is very inefficient on MySQL-5.0+
 
-    - Added configuration property "useDynamicCharsetInfo". If set to "false"
-      (the default), the driver will use a per-connection cache of character set
-      information queried from the server when necessary, or when set to "true",
-      use a built-in static mapping that is more efficient, but isn't aware of
-      custom character sets or character sets implemented after the release of
-      the JDBC driver.
+	- Added configuration property "useDynamicCharsetInfo". If set to "false"
+	  (the default), the driver will use a per-connection cache of character set
+	  information queried from the server when necessary, or when set to "true",
+	  use a built-in static mapping that is more efficient, but isn't aware of
+	  custom character sets or character sets implemented after the release of
+	  the JDBC driver.
 
-      Note: this only affects the "padCharsWithSpace" configuration property and the
+	  Note: this only affects the "padCharsWithSpace" configuration property and the
             ResultSetMetaData.getColumnDisplayWidth() method.
 
-    - More intelligent initial packet sizes for the "shared" packets are used
-      (512 bytes, rather than 16K), and initial packets used during handshake are
-      now sized appropriately as to not require reallocation.
+	- More intelligent initial packet sizes for the "shared" packets are used
+	  (512 bytes, rather than 16K), and initial packets used during handshake are
+	  now sized appropriately as to not require reallocation.
 
-    - Fixed issue where calling getGeneratedKeys() on a prepared statement after
-      calling execute() didn't always return the generated keys (executeUpdate()
-      worked fine however).
+	- Fixed issue where calling getGeneratedKeys() on a prepared statement after
+	  calling execute() didn't always return the generated keys (executeUpdate()
+	  worked fine however).
 
-    - 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".
+	- 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".
 
-    - 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).
+	- 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).
 
-    - 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".
+	- 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.
+	  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.
 
-    - 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.
+	- 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.
 
-      In an effort to simplify things, we're working on deprecating multiple
-      drivers, and instead specifying different core behavior based upon JDBC URL
-      prefixes, so watch for [NonRegistering]ReplicationDriver to eventually
-      disappear, to be replaced with com.mysql.jdbc[NonRegistering]Driver with
-      the new URL prefix.
+	  In an effort to simplify things, we're working on deprecating multiple
+	  drivers, and instead specifying different core behavior based upon JDBC URL
+	  prefixes, so watch for [NonRegistering]ReplicationDriver to eventually
+	  disappear, to be replaced with com.mysql.jdbc[NonRegistering]Driver with
+	  the new URL prefix.
 
-    - Added an experimental load-balanced connection designed for use with SQL nodes
+	- 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.
+	  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.
@@ -497,10 +514,10 @@
 03-01-07 - Version 5.0.5
 
     - Fixed BUG#23645 - Some collations/character sets reported as "unknown"
-      (specifically cias variants of existing character sets), and inability to override
-      the detected server character set.
+	  (specifically cias variants of existing character sets), and inability to override
+	  the detected server character set.
 
-    - Performance enhancement of initial character set configuration, driver
+	- Performance enhancement of initial character set configuration, driver
       will only send commands required to configure connection character set
       session variables if the current values on the server do not match
       what is required.
@@ -508,12 +525,12 @@
     - Fixed BUG#24360 .setFetchSize() breaks prepared SHOW and other commands.
 
     - Fixed BUG#24344 - useJDBCCompliantTimezoneShift with server-side prepared
-      statements gives different behavior than when using client-side prepared
-      statements. (this is now fixed if moving from server-side prepared statements
-      to client-side prepared statements by setting "useSSPSCompatibleTimezoneShift" to
-      true", as the driver can't tell if this is a new deployment that never used
-      server-side prepared statements, or if it is an existing deployment that is
-      switching to client-side prepared statements from server-side prepared statements.
+	  statements gives different behavior than when using client-side prepared
+	  statements. (this is now fixed if moving from server-side prepared statements
+	  to client-side prepared statements by setting "useSSPSCompatibleTimezoneShift" to
+	  true", as the driver can't tell if this is a new deployment that never used
+	  server-side prepared statements, or if it is an existing deployment that is
+	  switching to client-side prepared statements from server-side prepared statements.
 
     - Fixed BUG#23304 - DBMD using "show" and DBMD using information_schema do
       not return results consistent with each other. (note this fix only
@@ -522,206 +539,206 @@
       this behavior when there is full support for schemas in MySQL).
 
     - Fixed BUG#25073 - rewriting batched statements leaks internal statement
-      instances, and causes a memory leak.
+	  instances, and causes a memory leak.
 
-    - Fixed issue where field-level for metadata from DatabaseMetaData when using
-      INFORMATION_SCHEMA didn't have references to current connections,
-      sometimes leading to NullPointerExceptions when intropsecting them via
-      ResultSetMetaData.
+	- Fixed issue where field-level for metadata from DatabaseMetaData when using
+	  INFORMATION_SCHEMA didn't have references to current connections,
+	  sometimes leading to NullPointerExceptions when intropsecting them via
+	  ResultSetMetaData.
 
-    - Fixed BUG#25025 - Client-side prepared statement parser gets confused by
-      in-line (/* ... */) comments and therefore can't rewrite batched statements
-      or reliably detect type of statements when they're used.
+	- Fixed BUG#25025 - Client-side prepared statement parser gets confused by
+	  in-line (/* ... */) comments and therefore can't rewrite batched statements
+	  or reliably detect type of statements when they're used.
 
-    - Fixed BUG#24065 - Better error message when server doesn't return enough
-      information to determine stored procedure/function parameter types.
+	- Fixed BUG#24065 - Better error message when server doesn't return enough
+	  information to determine stored procedure/function parameter types.
 
-    - Fixed BUG#21438 - Driver sending nanoseconds to server for timestamps when
-      using server-side prepared statements, when server expects microseconds.
+	- Fixed BUG#21438 - Driver sending nanoseconds to server for timestamps when
+	  using server-side prepared statements, when server expects microseconds.
 
-    - Fixed BUG#25514 - Timer instance used for Statement.setQueryTimeout()
-      created per-connection, rather than per-VM, causing memory leak
+	- Fixed BUG#25514 - Timer instance used for Statement.setQueryTimeout()
+	  created per-connection, rather than per-VM, causing memory leak
 
-    - Fixed BUG#25009 - Results from updates not handled correctly in
-      multi-statement queries, leading to erroneous "Result is from UPDATE"
-      exceptions.
+	- Fixed BUG#25009 - Results from updates not handled correctly in
+	  multi-statement queries, leading to erroneous "Result is from UPDATE"
+	  exceptions.
 
-    - Fixed BUG#25047 - StringUtils.indexOfIgnoreCaseRespectQuotes() isn't
-      case-insensitive on the first character of the target. This bug broke
-      rewriteBatchedStatements functionality when prepared statements don't
-      use upper-case for the VALUES clause in their statements.
+	- Fixed BUG#25047 - StringUtils.indexOfIgnoreCaseRespectQuotes() isn't
+	  case-insensitive on the first character of the target. This bug broke
+	  rewriteBatchedStatements functionality when prepared statements don't
+	  use upper-case for the VALUES clause in their statements.
 
-    - Fixed BUG#21480 - Some exceptions thrown out of StandardSocketFactory
-      were needlessly wrapped, obscurring their true cause, especially when
-      using socket timeouts.
+	- Fixed BUG#21480 - Some exceptions thrown out of StandardSocketFactory
+	  were needlessly wrapped, obscurring their true cause, especially when
+	  using socket timeouts.
 
-    - Fixed BUG#23303 - DatabaseMetaData.getSchemas() doesn't return a
-      TABLE_CATALOG column.
+	- Fixed BUG#23303 - DatabaseMetaData.getSchemas() doesn't return a
+	  TABLE_CATALOG column.
 
     - Fixed BUG#25399 - EscapeProcessor gets confused by multiple
       backslashes. We now push the responsibility of syntax errors back
       on to the server for most escape sequences.
 
-    - Fixed BUG#25379 - INOUT parameters in CallableStatements get
-      doubly-escaped.
+	- Fixed BUG#25379 - INOUT parameters in CallableStatements get
+	  doubly-escaped.
 
-    - Removed non-short-circuited logical ORs from "if" statements.
+	- Removed non-short-circuited logical ORs from "if" statements.
 
-    - Re-worked stored procedure parameter parser to be more robust. Driver no
-      longer requires "BEGIN" in stored procedure definition, but does have
-      requirement that if a stored function begins with a label directly after the
-      "returns" clause, that the label is not a quoted identifier.
+	- Re-worked stored procedure parameter parser to be more robust. Driver no
+	  longer requires "BEGIN" in stored procedure definition, but does have
+	  requirement that if a stored function begins with a label directly after the
+	  "returns" clause, that the label is not a quoted identifier.
     - Reverted back to internal character conversion routines for single-byte
       character sets, as the ones internal to the JVM are using much more CPU
       time than our internal implementation.
 
-    - Changed cached result set metadata (when using
-      "cacheResultSetMetadata=true") to be cached per-connection rather
-      than per-statement as previously implemented.
+	- Changed cached result set metadata (when using
+	  "cacheResultSetMetadata=true") to be cached per-connection rather
+	  than per-statement as previously implemented.
 
-    - Use a java.util.TreeMap to map column names to ordinal indexes for
-      ResultSet.findColumn() instead of a HashMap. This allows us to have
-      case-insensitive lookups (required by the JDBC specification) without
-      resorting to the many transient object instances needed to support this
-      requirement with a normal HashMap with either case-adjusted keys, or
-      case-insensitive keys. (In the worst case scenario for lookups of a 1000
-      column result set, TreeMaps are about half as fast wall-clock time as
-      a HashMap, however in normal applications their use gives many orders
-      of magnitude reduction in transient object instance creation which pays
-      off later for CPU usage in garbage collection).
+	- Use a java.util.TreeMap to map column names to ordinal indexes for
+	  ResultSet.findColumn() instead of a HashMap. This allows us to have
+	  case-insensitive lookups (required by the JDBC specification) without
+	  resorting to the many transient object instances needed to support this
+	  requirement with a normal HashMap with either case-adjusted keys, or
+	  case-insensitive keys. (In the worst case scenario for lookups of a 1000
+	  column result set, TreeMaps are about half as fast wall-clock time as
+	  a HashMap, however in normal applications their use gives many orders
+	  of magnitude reduction in transient object instance creation which pays
+	  off later for CPU usage in garbage collection).
 
-    - Avoid static synchronized code in JVM class libraries for dealing with
-      default timezones.
+	- Avoid static synchronized code in JVM class libraries for dealing with
+	  default timezones.
 
-    - Fixed cases where ServerPreparedStatements weren't using cached metadata
-      when "cacheResultSetMetadata=true" was configured.
+	- Fixed cases where ServerPreparedStatements weren't using cached metadata
+	  when "cacheResultSetMetadata=true" was configured.
 
-    - Use faster datetime parsing for ResultSets that come from plain or
-      non-server-side prepared statements. (Enable old implementation with
-      "useFastDateParsing=false" as a configuration parameter).
+	- Use faster datetime parsing for ResultSets that come from plain or
+	  non-server-side prepared statements. (Enable old implementation with
+	  "useFastDateParsing=false" as a configuration parameter).
 
-    - Fixed BUG#24794 - DatabaseMetaData.getSQLKeywords() doesn't return
-      all reserved words for current MySQL version. The current fix/implementation
-      returns keywords for MySQL-5.1, and doesn't distinguish between different
-      versions of the server.
+	- Fixed BUG#24794 - DatabaseMetaData.getSQLKeywords() doesn't return
+	  all reserved words for current MySQL version. The current fix/implementation
+	  returns keywords for MySQL-5.1, and doesn't distinguish between different
+	  versions of the server.
 
-    - When using cached metadata, skip field-level metadata packets coming from
-      the server, rather than reading them and discarding them without creating
-      com.mysql.jdbc.Field instances.
+	- When using cached metadata, skip field-level metadata packets coming from
+	  the server, rather than reading them and discarding them without creating
+	  com.mysql.jdbc.Field instances.
 
-    - Fixed BUG#25836 - Statement execution which timed out doesn't always
-      throw MySQLTimeoutException.
+	- Fixed BUG#25836 - Statement execution which timed out doesn't always
+	  throw MySQLTimeoutException.
 
-    - Throw exceptions encountered during timeout to thread
-      calling Statement.execute*(), rather than RuntimeException.
+	- Throw exceptions encountered during timeout to thread
+	  calling Statement.execute*(), rather than RuntimeException.
 
-    - Added configuration property "localSocketAddress",which is the hostname or
-      IP address given to explicitly configure the interface that the driver will
-      bind the client side of the TCP/IP connection to when connecting.
+	- Added configuration property "localSocketAddress",which is the hostname or
+	  IP address given to explicitly configure the interface that the driver will
+	  bind the client side of the TCP/IP connection to when connecting.
 
-    - Take "localSocketAddress" property into account when creating instances
-      of CommunicationsException when the underyling exception is a
-      java.net.BindException, so that a friendlier error message is given with
-      a little internal diagnostics.
+	- Take "localSocketAddress" property into account when creating instances
+	  of CommunicationsException when the underyling exception is a
+	  java.net.BindException, so that a friendlier error message is given with
+	  a little internal diagnostics.
 
-    - Fixed some NPEs when cached metadata was used with UpdatableResultSets.
+	- Fixed some NPEs when cached metadata was used with UpdatableResultSets.
 
-    - The "rewriteBatchedStatements" feature can now be used with server-side
-      prepared statements.
+	- The "rewriteBatchedStatements" feature can now be used with server-side
+	  prepared statements.
 
-    - Fixed BUG#26326 - Connection property "socketFactory" wasn't exposed via
-      correctly named mutator/accessor, causing data source implementations that
-      use JavaBean naming conventions to set properties to fail to set the property
-      (and in the case of SJAS, fail silently when trying to set this parameter).
+	- Fixed BUG#26326 - Connection property "socketFactory" wasn't exposed via
+	  correctly named mutator/accessor, causing data source implementations that
+	  use JavaBean naming conventions to set properties to fail to set the property
+	  (and in the case of SJAS, fail silently when trying to set this parameter).
 
-    - Fixed BUG#25787 - java.util.Date should be serialized for
-      PreparedStatement.setObject().
+	- Fixed BUG#25787 - java.util.Date should be serialized for
+	  PreparedStatement.setObject().
 
-      We've added a new configuration option "treatUtilDateAsTimestamp", which is
-      false by default, as (1) We already had specific behavior to treat
-      java.util.Date as a java.sql.Timestamp because it's useful to many folks,
-      and (2) that behavior will very likely be required for drivers JDBC-post-4.0.
+	  We've added a new configuration option "treatUtilDateAsTimestamp", which is
+	  false by default, as (1) We already had specific behavior to treat
+	  java.util.Date as a java.sql.Timestamp because it's useful to many folks,
+	  and (2) that behavior will very likely be required for drivers JDBC-post-4.0.
 
     - Fixed BUG#22628 - Driver.getPropertyInfo() throws NullPointerException for
       URL that only specifies host and/or port.
 
-    - Fixed BUG#21267, ParameterMetaData throws NullPointerException when
-      prepared SQL actually has a syntax error. Added
-      "generateSimpleParameterMetadata" configuration property, which when set
-      to "true" will generate metadata reflecting VARCHAR for every parameter
-      (the default is "false", which will cause an exception to be thrown if no
-      parameter metadata for the statement is actually available).
+	- Fixed BUG#21267, ParameterMetaData throws NullPointerException when
+	  prepared SQL actually has a syntax error. Added
+	  "generateSimpleParameterMetadata" configuration property, which when set
+	  to "true" will generate metadata reflecting VARCHAR for every parameter
+	  (the default is "false", which will cause an exception to be thrown if no
+	  parameter metadata for the statement is actually available).
 
-    - When extracting foreign key information from "SHOW CREATE TABLE " in
-      DatabaseMetaData, ignore exceptions relating to tables being missing
-      (which could happen for cross-reference or imported-key requests, as
-      the list of tables is generated first, then iterated).
+	- When extracting foreign key information from "SHOW CREATE TABLE " in
+	  DatabaseMetaData, ignore exceptions relating to tables being missing
+	  (which could happen for cross-reference or imported-key requests, as
+	  the list of tables is generated first, then iterated).
 
-    - Fixed logging of XA commands sent to server, it's now configurable
-      via "logXaCommands" property (defaults to "false").
+	- Fixed logging of XA commands sent to server, it's now configurable
+	  via "logXaCommands" property (defaults to "false").
 
-    - Fixed issue where XADataSources couldn't be bound into JNDI,
-      as the DataSourceFactory didn't know how to create instances
-      of them.
+	- Fixed issue where XADataSources couldn't be bound into JNDI,
+	  as the DataSourceFactory didn't know how to create instances
+	  of them.
 
-    - Fixed issue where XADataSources couldn't be bound into JNDI,
-      as the DataSourceFactory didn't know how to create instances
-      of them.
+	- Fixed issue where XADataSources couldn't be bound into JNDI,
+	  as the DataSourceFactory didn't know how to create instances
+	  of them.
 
-    - Usage advisor will now issue warnings for result sets with large numbers
-      of rows (size configured by "resultSetSizeThreshold" property, default
-      value is 100).
+	- Usage advisor will now issue warnings for result sets with large numbers
+	  of rows (size configured by "resultSetSizeThreshold" property, default
+	  value is 100).
 
 10-20-06 - Version 5.0.4
 
     - Fixed BUG#21379 - column names don't match metadata in cases
       where server doesn't return original column names (column functions)
-      thus breaking compatibility with applications that expect 1-1 mappings
-      between findColumn() and rsmd.getColumnName(), usually manifests itself
-      as "Can't find column ('')" exceptions.
+	  thus breaking compatibility with applications that expect 1-1 mappings
+	  between findColumn() and rsmd.getColumnName(), usually manifests itself
+	  as "Can't find column ('')" exceptions.
 
     - Fixed BUG#21544 - When using information_schema for metadata,
-      COLUMN_SIZE for getColumns() is not clamped to range of
-      java.lang.Integer as is the case when not using
-      information_schema, thus leading to a truncation exception that
-      isn't present when not using information_schema.
+	  COLUMN_SIZE for getColumns() is not clamped to range of
+	  java.lang.Integer as is the case when not using
+	  information_schema, thus leading to a truncation exception that
+	  isn't present when not using information_schema.
 
     - Fixed configuration property "jdbcCompliantTruncation" was not
       being used for reads of result set values.
 
     - Fixed BUG#22024 - Newlines causing whitespace to span confuse
-      procedure parser when getting parameter metadata for stored
-      procedures.
+	  procedure parser when getting parameter metadata for stored
+	  procedures.
 
-    - Driver now supports {call sp} (without "()" if procedure has no
-      arguments).
+	- Driver now supports {call sp} (without "()" if procedure has no
+	  arguments).
 
-    - Fixed BUG#22359 - Driver was using milliseconds for
-      Statement.setQueryTimeout() when specification says argument is
-      to be in seconds.
+	- Fixed BUG#22359 - Driver was using milliseconds for
+	  Statement.setQueryTimeout() when specification says argument is
+	  to be in seconds.
 
-    - Workaround for server crash when calling stored procedures
-      via a server-side prepared statement (driver now detects
-      prepare(stored procedure) and substitutes client-side prepared
-      statement), addresses BUG#22297.
+	- Workaround for server crash when calling stored procedures
+	  via a server-side prepared statement (driver now detects
+	  prepare(stored procedure) and substitutes client-side prepared
+	  statement), addresses BUG#22297.
 
-    - Added new _ci collations to CharsetMapping, fixing
-      Bug#22456 - utf8_unicode_ci not working.
+	- Added new _ci collations to CharsetMapping, fixing
+	  Bug#22456 - utf8_unicode_ci not working.
 
-    - Fixed BUG#22290 - Driver issues truncation on write exception when
-      it shouldn't (due to sending big decimal incorrectly to server with
-      server-side prepared statement).
+	- Fixed BUG#22290 - Driver issues truncation on write exception when
+	  it shouldn't (due to sending big decimal incorrectly to server with
+	  server-side prepared statement).
 
-    - Fixed BUG#22613 - DBMD.getColumns() does not return expected
-      COLUMN_SIZE for the SET type, now returns length of largest possible
-      set disregarding whitespace or the "," delimitters to be consistent
-      with the ODBC driver.
+	- Fixed BUG#22613 - DBMD.getColumns() does not return expected
+	  COLUMN_SIZE for the SET type, now returns length of largest possible
+	  set disregarding whitespace or the "," delimitters to be consistent
+	  with the ODBC driver.
 
-    - Driver now sends numeric 1 or 0 for client-prepared statement
-      setBoolean() calls instead of '1' or '0'.
+	- Driver now sends numeric 1 or 0 for client-prepared statement
+	  setBoolean() calls instead of '1' or '0'.
 
-    - DatabaseMetaData correctly reports true for supportsCatalog*()
-      methods.
+	- DatabaseMetaData correctly reports true for supportsCatalog*()
+	  methods.
 
 07-26-06 - Version 5.0.3
 
@@ -749,30 +766,30 @@
       is used for error messages.
 
     - Fixed BUG#19169 - ConnectionProperties (and thus some
-      subclasses) are not serializable, even though some J2EE containers
-      expect them to be.
+	  subclasses) are not serializable, even though some J2EE containers
+	  expect them to be.
 
-    - Fixed BUG#20242 - MysqlValidConnectionChecker for JBoss doesn't
-      work with MySQLXADataSources.
+	- Fixed BUG#20242 - MysqlValidConnectionChecker for JBoss doesn't
+	  work with MySQLXADataSources.
 
-    - Better caching of character set converters (per-connection)
-      to remove a bottleneck for multibyte character sets.
+	- Better caching of character set converters (per-connection)
+	  to remove a bottleneck for multibyte character sets.
 
-    - Added connection/datasource property  "pinGlobalTxToPhysicalConnection"
-      (defaults to "false"). When set to "true", when using XAConnections, the
-      driver ensures that operations on a given XID are always routed to the
-      same physical connection. This allows the XAConnection to support
-      "XA START ... JOIN" after "XA END" has been called, and is also a
-      workaround for transaction managers that don't maintain thread affinity
-      for a global transaction (most either always maintain thread affinity,
-      or have it as a configuration option).
+	- Added connection/datasource property  "pinGlobalTxToPhysicalConnection"
+	  (defaults to "false"). When set to "true", when using XAConnections, the
+	  driver ensures that operations on a given XID are always routed to the
+	  same physical connection. This allows the XAConnection to support
+	  "XA START ... JOIN" after "XA END" has been called, and is also a
+	  workaround for transaction managers that don't maintain thread affinity
+	  for a global transaction (most either always maintain thread affinity,
+	  or have it as a configuration option).
 
-    - MysqlXaConnection.recover(int flags) now allows combinations of
-      XAResource.TMSTARTRSCAN and TMENDRSCAN. To simulate the "scanning"
-      nature of the interface, we return all prepared XIDs for TMSTARTRSCAN,
-      and no new XIDs for calls with TMNOFLAGS, or TMENDRSCAN when not in
-      combination with TMSTARTRSCAN. This change was made for API compliance,
-      as well as integration with IBM WebSphere's transaction manager.
+	- MysqlXaConnection.recover(int flags) now allows combinations of
+	  XAResource.TMSTARTRSCAN and TMENDRSCAN. To simulate the "scanning"
+	  nature of the interface, we return all prepared XIDs for TMSTARTRSCAN,
+	  and no new XIDs for calls with TMNOFLAGS, or TMENDRSCAN when not in
+	  combination with TMSTARTRSCAN. This change was made for API compliance,
+	  as well as integration with IBM WebSphere's transaction manager.
 
 12-23-05 - Version 5.0.0-beta
 
@@ -899,86 +916,86 @@
 
 nn-nn-07 - Version 3.1.15
 
-    - Fixed BUG#23281 - Downed slave caused round-robin load balance to
-      not cycle back to first host in list.
+	- Fixed BUG#23281 - Downed slave caused round-robin load balance to
+	  not cycle back to first host in list.
 
-    - Disabled use of server-side prepared statements by default.
+	- Disabled use of server-side prepared statements by default.
 
-    - Handle YYYY-MM-DD hh:mm:ss format of timestamp in
-      ResultSet.getTimeFromString().
+	- Handle YYYY-MM-DD hh:mm:ss format of timestamp in
+	  ResultSet.getTimeFromString().
 
-    - Fixed BUG#24840 - character encoding of "US-ASCII" doesn't map correctly
-      for 4.1 or newer
+	- Fixed BUG#24840 - character encoding of "US-ASCII" doesn't map correctly
+	  for 4.1 or newer
 
-    - Added Implementation-Vendor-Id attribute to jar manifest per request
-      in BUG#15641.
+	- Added Implementation-Vendor-Id attribute to jar manifest per request
+	  in BUG#15641.
 
-    - 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.
+	- 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.
 
 10-19-06 - Version 3.1.14
 
     - Fixed BUG#20479 - Updatable result set throws ClassCastException
-      when there is row data and moveToInsertRow() is called.
+	  when there is row data and moveToInsertRow() is called.
 
-    - Fixed BUG#20485 - Updatable result set that contains
-      a BIT column fails when server-side prepared statements are used.
+	- Fixed BUG#20485 - Updatable result set that contains
+	  a BIT column fails when server-side prepared statements are used.
 
-    - Fixed BUG#16987 - Memory leak with profileSQL=true.
+	- Fixed BUG#16987 - Memory leak with profileSQL=true.
 
-    - Fixed BUG#19726 - Connection fails to localhost when using
-      timeout and IPv6 is configured.
+	- Fixed BUG#19726 - Connection fails to localhost when using
+	  timeout and IPv6 is configured.
 
-    - Fixed BUG#16791 - NullPointerException in MysqlDataSourceFactory
-      due to Reference containing RefAddrs with null content.
+	- Fixed BUG#16791 - NullPointerException in MysqlDataSourceFactory
+	  due to Reference containing RefAddrs with null content.
 
-    - Fixed BUG#20306 - ResultSet.getShort() for UNSIGNED TINYINT
-      returns incorrect values when using server-side prepared statements.
+	- Fixed BUG#20306 - ResultSet.getShort() for UNSIGNED TINYINT
+	  returns incorrect values when using server-side prepared statements.
 
-    - Fixed BUG#20687 - Can't pool server-side prepared statements, exception
-      raised when re-using them.
+	- Fixed BUG#20687 - Can't pool server-side prepared statements, exception
+	  raised when re-using them.
 
-    - Fixed BUG#21062 - ResultSet.getSomeInteger() doesn't work for BIT(>1).
+	- Fixed BUG#21062 - ResultSet.getSomeInteger() doesn't work for BIT(>1).
 
-    - Fixed BUG#18880 - ResultSet.getFloatFromString() can't retrieve
-      values near Float.MIN/MAX_VALUE.
+	- Fixed BUG#18880 - ResultSet.getFloatFromString() can't retrieve
+	  values near Float.MIN/MAX_VALUE.
 
-    - Fixed BUG#20888 - escape of quotes in client-side prepared
-      statements parsing not respected. Patch covers more than bug report,
-      including NO_BACKSLASH_ESCAPES being set, and stacked quote characters
-      forms of escaping (i.e. '' or "").
+	- Fixed BUG#20888 - escape of quotes in client-side prepared
+	  statements parsing not respected. Patch covers more than bug report,
+	  including NO_BACKSLASH_ESCAPES being set, and stacked quote characters
+	  forms of escaping (i.e. '' or "").
 
-    - Fixed BUG#19993 - ReplicationDriver does not always round-robin load
-      balance depending on URL used for slaves list.
+	- Fixed BUG#19993 - ReplicationDriver does not always round-robin load
+	  balance depending on URL used for slaves list.
 
-    - Fixed calling toString() on ResultSetMetaData for driver-generated
-      (i.e. from DatabaseMetaData method calls, or from getGeneratedKeys())
-      result sets would raise a NullPointerException.
+	- Fixed calling toString() on ResultSetMetaData for driver-generated
+	  (i.e. from DatabaseMetaData method calls, or from getGeneratedKeys())
+	  result sets would raise a NullPointerException.
 
-    - Fixed Bug#21207 - Driver throws NPE when tracing prepared statements that
-      have been closed (in asSQL()).
+	- Fixed Bug#21207 - Driver throws NPE when tracing prepared statements that
+	  have been closed (in asSQL()).
 
-    - Removed logger autodectection altogether, must now specify logger
-      explitly if you want to use a logger other than one that logs
-      to STDERR.
+	- Removed logger autodectection altogether, must now specify logger
+	  explitly if you want to use a logger other than one that logs
+	  to STDERR.
 
-    - Fixed BUG#22290 - Driver issues truncation on write exception when
-      it shouldn't (due to sending big decimal incorrectly to server with
-      server-side prepared statement).
+	- Fixed BUG#22290 - Driver issues truncation on write exception when
+	  it shouldn't (due to sending big decimal incorrectly to server with
+	  server-side prepared statement).
 
-    - Driver now sends numeric 1 or 0 for client-prepared statement
-      setBoolean() calls instead of '1' or '0'.
+	- Driver now sends numeric 1 or 0 for client-prepared statement
+	  setBoolean() calls instead of '1' or '0'.
 
-    - Fixed bug where driver would not advance to next host if
-      roundRobinLoadBalance=true and the last host in the list is down.
+	- Fixed bug where driver would not advance to next host if
+	  roundRobinLoadBalance=true and the last host in the list is down.
 
-    - Fixed BUG#18258 - DatabaseMetaData.getTables(), columns() with bad
-      catalog parameter threw exception rather than return empty result
-      set (as required by spec).
+	- Fixed BUG#18258 - DatabaseMetaData.getTables(), columns() with bad
+	  catalog parameter threw exception rather than return empty result
+	  set (as required by spec).
 
-    - Check and store value for continueBatchOnError property in constructor
+	- Check and store value for continueBatchOnError property in constructor
       of Statements, rather than when executing batches, so that Connections
       closed out from underneath statements don't cause NullPointerExceptions
       when it's required to check this property.
@@ -987,7 +1004,7 @@
       numbered correctly (first parameter is now the return value, subsequent
       parameters if specified start at index "2").
 
-    - Fixed BUG#21814 - time values outside valid range silently wrap.
+	- Fixed BUG#21814 - time values outside valid range silently wrap.
 
 05-26-06 - Version 3.1.13
 
@@ -1046,60 +1063,60 @@
       "logger=com.mysql.jdbc.log.CommonsLogger".
 
     - Fixed BUG#15570 - ReplicationConnection incorrectly copies state,
-      doesn't transfer connection context correctly when transitioning between
-      the same read-only states.
+	  doesn't transfer connection context correctly when transitioning between
+	  the same read-only states.
 
-    - Fixed BUG#18041 - Server-side prepared statements don't cause
-      truncation exceptions to be thrown when truncation happens.
+	- Fixed BUG#18041 - Server-side prepared statements don't cause
+	  truncation exceptions to be thrown when truncation happens.
 
-    - Added performance feature, re-writing of batched executes for
-      Statement.executeBatch() (for all DML statements) and
-      PreparedStatement.executeBatch() (for INSERTs with VALUE clauses
-      only). Enable by using "rewriteBatchedStatements=true" in your JDBC URL.
+	- Added performance feature, re-writing of batched executes for
+	  Statement.executeBatch() (for all DML statements) and
+	  PreparedStatement.executeBatch() (for INSERTs with VALUE clauses
+	  only). Enable by using "rewriteBatchedStatements=true" in your JDBC URL.
 
-    - Fixed BUG#17898 - registerOutParameter not working when some
-      parameters pre-populated. Still waiting for feedback from JDBC experts
-      group to determine what correct parameter count from getMetaData()
-      should be, however.
+	- Fixed BUG#17898 - registerOutParameter not working when some
+	  parameters pre-populated. Still waiting for feedback from JDBC experts
+	  group to determine what correct parameter count from getMetaData()
+	  should be, however.
 
-    - Fixed BUG#17587 - clearParameters() on a closed prepared statement
-      causes NPE.
+	- Fixed BUG#17587 - clearParameters() on a closed prepared statement
+	  causes NPE.
 
-    - Map "latin1" on MySQL server to CP1252 for MySQL > 4.1.0.
+	- Map "latin1" on MySQL server to CP1252 for MySQL > 4.1.0.
 
-    - Added additional accessor and mutator methods on ConnectionProperties
-      so that DataSource users can use same naming as regular URL properties.
+	- Added additional accessor and mutator methods on ConnectionProperties
+	  so that DataSource users can use same naming as regular URL properties.
 
-    - Fixed BUG#18740 - Data truncation and getWarnings() only returns last
-      warning in set.
+	- Fixed BUG#18740 - Data truncation and getWarnings() only returns last
+	  warning in set.
 
-    - Improved performance of retrieving BigDecimal, Time, Timestamp and Date
-      values from server-side prepared statements by creating fewer short-lived
-      instances of Strings when the native type is not an exact match for
-      the requested type. Fixes BUG#18496 for BigDecimals.
+	- Improved performance of retrieving BigDecimal, Time, Timestamp and Date
+	  values from server-side prepared statements by creating fewer short-lived
+	  instances of Strings when the native type is not an exact match for
+	  the requested type. Fixes BUG#18496 for BigDecimals.
 
-    - Fixed BUG#18554 - Aliased column names where length of name > 251
-      are corrupted.
+	- Fixed BUG#18554 - Aliased column names where length of name > 251
+	  are corrupted.
 
-    - Fixed BUG#17450 - ResultSet.wasNull() not always reset
-      correctly for booleans when done via conversion for server-side
-      prepared statements.
+	- Fixed BUG#17450 - ResultSet.wasNull() not always reset
+	  correctly for booleans when done via conversion for server-side
+	  prepared statements.
 
-    - Fixed BUG#16277 - Invalid classname returned for
-      RSMD.getColumnClassName() for BIGINT type.
+	- Fixed BUG#16277 - Invalid classname returned for
+	  RSMD.getColumnClassName() for BIGINT type.
 
-    - Fixed case where driver wasn't reading server status correctly when
-      fetching server-side prepared statement rows, which in some cases
-      could cause warning counts to be off, or multiple result sets to not
-      be read off the wire.
+	- Fixed case where driver wasn't reading server status correctly when
+	  fetching server-side prepared statement rows, which in some cases
+	  could cause warning counts to be off, or multiple result sets to not
+	  be read off the wire.
 
-    - Driver now aware of fix for BIT type metadata that went into
-      MySQL-5.0.21 for server not reporting length consistently (bug
-      number 13601).
+	- Driver now aware of fix for BIT type metadata that went into
+	  MySQL-5.0.21 for server not reporting length consistently (bug
+	  number 13601).
 
-    - Fixed BUG#19282 - ResultSet.wasNull() returns incorrect value
-      when extracting native string from server-side prepared statement
-      generated result set.
+	- Fixed BUG#19282 - ResultSet.wasNull() returns incorrect value
+	  when extracting native string from server-side prepared statement
+	  generated result set.
 
 11-30-05 - Version 3.1.12
 
@@ -1153,45 +1170,45 @@
       DBMD.supportsIntegrityEnhancementFacility() to return "true"
       if foreign keys are supported by the datasource, even though
       this method also covers support for check constraints,
-      which MySQL _doesn't_ have. Setting the configuration property
-      "overrideSupportsIntegrityEnhancementFacility" to "true" causes
-      the driver to return "true" for this method.
+	  which MySQL _doesn't_ have. Setting the configuration property
+	  "overrideSupportsIntegrityEnhancementFacility" to "true" causes
+	  the driver to return "true" for this method.
 
     - Added "com.mysql.jdbc.testsuite.url.default" system property to
-      set default JDBC url for testsuite (to speed up bug resolution
-      when I'm working in Eclipse).
+	  set default JDBC url for testsuite (to speed up bug resolution
+	  when I'm working in Eclipse).
 
-    - Fixed BUG#14938 - Unable to initialize character set mapping
-      tables (due to J2EE classloader differences).
+	- Fixed BUG#14938 - Unable to initialize character set mapping
+	  tables (due to J2EE classloader differences).
 
-    - Fixed BUG#14972 - Deadlock while closing server-side prepared
-      statements from multiple threads sharing one connection.
+	- Fixed BUG#14972 - Deadlock while closing server-side prepared
+	  statements from multiple threads sharing one connection.
 
-    - Fixed BUG#12230 - logSlowQueries should give better info.
+	- Fixed BUG#12230 -	logSlowQueries should give better info.
 
-    - Fixed BUG#13775 - Extraneous sleep on autoReconnect.
+	- Fixed BUG#13775 - Extraneous sleep on autoReconnect.
 
-    - Fixed BUG#15024 - Driver incorrectly closes streams passed as
-      arguments to PreparedStatements. Reverts to legacy behavior by
-      setting the JDBC configuration property "autoClosePStmtStreams"
-      to "true" (also included in the 3-0-Compat configuration "bundle").
+	- Fixed BUG#15024 - Driver incorrectly closes streams passed as
+	  arguments to PreparedStatements. Reverts to legacy behavior by
+	  setting the JDBC configuration property "autoClosePStmtStreams"
+	  to "true" (also included in the 3-0-Compat configuration "bundle").
 
-    - Fixed BUG#13048 - maxQuerySizeToLog is not respected. Added logging of
-      bound values for execute() phase of server-side prepared statements
-      when profileSQL=true as well.
+	- Fixed BUG#13048 - maxQuerySizeToLog is not respected. Added logging of
+	  bound values for execute() phase of server-side prepared statements
+	  when profileSQL=true as well.
 
-    - Fixed BUG#15065 - Usage advisor complains about unreferenced
-      columns, even though they've been referenced.
+	- Fixed BUG#15065 - Usage advisor complains about unreferenced
+	  columns, even though they've been referenced.
 
-    - Don't increase timeout for failover/reconnect (BUG#6577)
+	- Don't increase timeout for failover/reconnect (BUG#6577)
 
-    - Process escape tokens in Connection.prepareStatement(...), fix
-      for BUG#15141. You can disable this behavior by setting
-      the JDBC URL configuration property "processEscapeCodesForPrepStmts"
-      to "false".
+	- Process escape tokens in Connection.prepareStatement(...), fix
+	  for BUG#15141. You can disable this behavior by setting
+	  the JDBC URL configuration property "processEscapeCodesForPrepStmts"
+	  to "false".
 
-    - Fixed BUG#13255 - Reconnect during middle of executeBatch()
-      should not occur if autoReconnect is enabled.
+	- Fixed BUG#13255 - Reconnect during middle of executeBatch()
+	  should not occur if autoReconnect is enabled.
 
 10-07-05 - Version 3.1.11
 
@@ -1211,9 +1228,9 @@
     - Moved source code to svn repo.
 
     - Fixed BUG#11797 - Escape tokenizer doesn't respect stacked single quotes
-      for escapes.
+	  for escapes.
 
-    - GEOMETRY type not recognized when using server-side prepared statements.
+	- GEOMETRY type not recognized when using server-side prepared statements.
 
     - Fixed BUG#11879 -- ReplicationConnection won't switch to slave, throws
       "Catalog can't be null" exception.
@@ -1236,65 +1253,65 @@
     - Fixed BUG#11798 - Pstmt.setObject(...., Types.BOOLEAN) throws exception.
 
     - Fixed BUG#11976 - maxPerformance.properties mis-spells
-      "elideSetAutoCommits".
+	  "elideSetAutoCommits".
 
-    - Fixed BUG#11575 -- DBMD.storesLower/Mixed/UpperIdentifiers()
-      reports incorrect values for servers deployed on Windows.
+	- Fixed BUG#11575 -- DBMD.storesLower/Mixed/UpperIdentifiers()
+	  reports incorrect values for servers deployed on Windows.
 
-    - Fixed BUG#11190 - ResultSet.moveToCurrentRow() fails to work when
-      preceeded by a call to ResultSet.moveToInsertRow().
+	- Fixed BUG#11190 - ResultSet.moveToCurrentRow() fails to work when
+	  preceeded by a call to ResultSet.moveToInsertRow().
 
-    - Fixed BUG#11115, VARBINARY data corrupted when using server-side
-      prepared statements and .setBytes().
+	- Fixed BUG#11115, VARBINARY data corrupted when using server-side
+	  prepared statements and .setBytes().
 
-    - Fixed BUG#12229 - explainSlowQueries hangs with server-side
-      prepared statements.
+	- Fixed BUG#12229 - explainSlowQueries hangs with server-side
+	  prepared statements.
 
-    - Fixed BUG#11498 - Escape processor didn't honor strings demarcated
-      with double quotes.
+	- Fixed BUG#11498 - Escape processor didn't honor strings demarcated
+	  with double quotes.
 
-    - Lifted restriction of changing streaming parameters with server-side
-      prepared statements. As long as _all_ streaming parameters were set
-      before execution, .clearParameters() does not have to be called.
-      (due to limitation of client/server protocol, prepared statements
-       can not reset _individual_ stream data on the server side).
+	- Lifted restriction of changing streaming parameters with server-side
+	  prepared statements. As long as _all_ streaming parameters were set
+	  before execution, .clearParameters() does not have to be called.
+	  (due to limitation of client/server protocol, prepared statements
+	   can not reset _individual_ stream data on the server side).
 
-    - Reworked Field class, *Buffer, and MysqlIO to be aware of field
-      lengths > Integer.MAX_VALUE.
+	- Reworked Field class, *Buffer, and MysqlIO to be aware of field
+	  lengths > Integer.MAX_VALUE.
 
-    - Updated DBMD.supportsCorrelatedQueries() to return true for versions >
-      4.1, supportsGroupByUnrelated() to return true and
-      getResultSetHoldability() to return HOLD_CURSORS_OVER_COMMIT.
+	- Updated DBMD.supportsCorrelatedQueries() to return true for versions >
+	  4.1, supportsGroupByUnrelated() to return true and
+	  getResultSetHoldability() to return HOLD_CURSORS_OVER_COMMIT.
 
-    - Fixed BUG#12541 - Handling of catalog argument in
-      DatabaseMetaData.getIndexInfo(), which also means changes to the following
-      methods in DatabaseMetaData:
+	- Fixed BUG#12541 - Handling of catalog argument in
+	  DatabaseMetaData.getIndexInfo(), which also means changes to the following
+	  methods in DatabaseMetaData:
 
-        - getBestRowIdentifier()
-        - getColumns()
-        - getCrossReference()
-        - getExportedKeys()
-        - getImportedKeys()
-        - getIndexInfo()
-        - getPrimaryKeys()
-        - getProcedures() (and thus indirectly getProcedureColumns())
-        - getTables()
+	    - getBestRowIdentifier()
+	    - getColumns()
+	    - getCrossReference()
+	    - getExportedKeys()
+	    - getImportedKeys()
+	    - getIndexInfo()
+	    - getPrimaryKeys()
+	    - getProcedures() (and thus indirectly getProcedureColumns())
+	    - getTables()
 
-      The "catalog" argument in all of these methods now behaves in the following
-      way:
+	  The "catalog" argument in all of these methods now behaves in the following
+	  way:
 
-        - Specifying NULL means that catalog will not be used to filter the
-          results (thus all databases will be searched), unless you've
-          set "nullCatalogMeansCurrent=true" in your JDBC URL properties.
+	    - Specifying NULL means that catalog will not be used to filter the
+	      results (thus all databases will be searched), unless you've
+	      set "nullCatalogMeansCurrent=true" in your JDBC URL properties.
 
-        - Specifying "" means "current" catalog, even though this isn't quite
-          JDBC spec compliant, it's there for legacy users.
+	    - Specifying "" means "current" catalog, even though this isn't quite
+	      JDBC spec compliant, it's there for legacy users.
 
-        - Specifying a catalog works as stated in the API docs.
+	    - Specifying a catalog works as stated in the API docs.
 
-    - Made Connection.clientPrepare() available from "wrapped" connections
-      in the jdbc2.optional package (connections built by
-      ConnectionPoolDataSource instances).
+	- Made Connection.clientPrepare() available from "wrapped" connections
+	  in the jdbc2.optional package (connections built by
+	  ConnectionPoolDataSource instances).
 
     - Added Connection.isMasterConnection() for clients to be able to determine
       if a multi-host master/slave connection is connected to the first host
@@ -1322,12 +1339,12 @@
       servers newer than 4.0.x.
 
     - Fixed BUG#12970 - java.sql.Types.OTHER returned for
-      BINARY and VARBINARY columns when using
-      DatabaseMetaData.getColumns().
+	  BINARY and VARBINARY columns when using
+	  DatabaseMetaData.getColumns().
 
-    - ServerPreparedStatement.getBinding() now checks if the statement
-      is closed before attempting to reference the list of parameter
-      bindings, to avoid throwing a NullPointerException.
+	- ServerPreparedStatement.getBinding() now checks if the statement
+	  is closed before attempting to reference the list of parameter
+	  bindings, to avoid throwing a NullPointerException.
 
     - Fixed BUG#13277 - ResultSetMetaData from
       Statement.getGeneratedKeys() caused NullPointerExceptions to be
@@ -1340,179 +1357,179 @@
 
 06-23-05 - Version 3.1.10-stable
 
-    - Fixed connecting without a database specified raised an exception
-      in MysqlIO.changeDatabaseTo().
+	- Fixed connecting without a database specified raised an exception
+	  in MysqlIO.changeDatabaseTo().
 
-    - Initial implemention of ParameterMetadata for
-      PreparedStatement.getParameterMetadata(). Only works fully
-      for CallableStatements, as current server-side prepared statements
-      return every parameter as a VARCHAR type.
+	- Initial implemention of ParameterMetadata for
+	  PreparedStatement.getParameterMetadata(). Only works fully
+	  for CallableStatements, as current server-side prepared statements
+	  return every parameter as a VARCHAR type.
 
-    - Fixed BUG#11552 - Server-side prepared statements return incorrect
-      values for unsigned TINYINT, SMALLINT, INT and Long.
+	- Fixed BUG#11552 - Server-side prepared statements return incorrect
+	  values for unsigned TINYINT, SMALLINT, INT and Long.
 
-    - Fixed BUG#11540 - Incorrect year conversion in setDate(..) for
-      system that use B.E. year in default locale.
+	- Fixed BUG#11540 - Incorrect year conversion in setDate(..) for
+	  system that use B.E. year in default locale.
 
 06-22-05 - Version 3.1.9-stable
 
-    - Overhaul of character set configuration, everything now
-      lives in a properties file.
+	- Overhaul of character set configuration, everything now
+	  lives in a properties file.
 
-    - Driver now correctly uses CP932 if available on the server
-      for Windows-31J, CP932 and MS932 java encoding names,
-      otherwise it resorts to SJIS, which is only a close
-      approximation. Currently only MySQL-5.0.3 and newer (and
-      MySQL-4.1.12 or .13, depending on when the character set
-      gets backported) can reliably support any variant of CP932.
+	- Driver now correctly uses CP932 if available on the server
+	  for Windows-31J, CP932 and MS932 java encoding names,
+	  otherwise it resorts to SJIS, which is only a close
+	  approximation. Currently only MySQL-5.0.3 and newer (and
+	  MySQL-4.1.12 or .13, depending on when the character set
+	  gets backported) can reliably support any variant of CP932.
 
-    - Fixed BUG#9064 - com.mysql.jdbc.PreparedStatement.ParseInfo
-      does unnecessary call to toCharArray().
+	- Fixed BUG#9064 - com.mysql.jdbc.PreparedStatement.ParseInfo
+	  does unnecessary call to toCharArray().
 
-    - Fixed Bug#10144 - Memory leak in ServerPreparedStatement if
-      serverPrepare() fails.
+	- Fixed Bug#10144 - Memory leak in ServerPreparedStatement if
+	  serverPrepare() fails.
 
-    - Actually write manifest file to correct place so it ends up
-      in the binary jar file.
+	- Actually write manifest file to correct place so it ends up
+	  in the binary jar file.
 
-    - Added "createDatabaseIfNotExist" property (default is "false"),
-      which will cause the driver to ask the server to create the
-      database specified in the URL if it doesn't exist. You must have
-      the appropriate privileges for database creation for this to
-      work.
+	- Added "createDatabaseIfNotExist" property (default is "false"),
+	  which will cause the driver to ask the server to create the
+	  database specified in the URL if it doesn't exist. You must have
+	  the appropriate privileges for database creation for this to
+	  work.
 
-    - Fixed BUG#10156 - Unsigned SMALLINT treated as signed for ResultSet.getInt(),
-      fixed all cases for UNSIGNED integer values and server-side prepared statements,
-      as well as ResultSet.getObject() for UNSIGNED TINYINT.
+	- Fixed BUG#10156 - Unsigned SMALLINT treated as signed for ResultSet.getInt(),
+	  fixed all cases for UNSIGNED integer values and server-side prepared statements,
+	  as well as ResultSet.getObject() for UNSIGNED TINYINT.
 
-    - Fixed BUG#10155, double quotes not recognized when parsing
-      client-side prepared statements.
+	- Fixed BUG#10155, double quotes not recognized when parsing
+	  client-side prepared statements.
 
-    - Made enableStreamingResults() visible on
-      com.mysql.jdbc.jdbc2.optional.StatementWrapper.
+	- Made enableStreamingResults() visible on
+	  com.mysql.jdbc.jdbc2.optional.StatementWrapper.
 
-    - Made ServerPreparedStatement.asSql() work correctly so auto-explain
-      functionality would work with server-side prepared statements.
+	- Made ServerPreparedStatement.asSql() work correctly so auto-explain
+	  functionality would work with server-side prepared statements.
 
-    - Made JDBC2-compliant wrappers public in order to allow access to
-      vendor extensions.
+	- Made JDBC2-compliant wrappers public in order to allow access to
+	  vendor extensions.
 
-    - Cleaned up logging of profiler events, moved code to dump a profiler
-      event as a string to com.mysql.jdbc.log.LogUtils so that third
-      parties can use it.
+	- Cleaned up logging of profiler events, moved code to dump a profiler
+	  event as a string to com.mysql.jdbc.log.LogUtils so that third
+	  parties can use it.
 
-    - DatabaseMetaData.supportsMultipleOpenResults() now returns true. The
-      driver has supported this for some time, DBMD just missed that fact.
+	- DatabaseMetaData.supportsMultipleOpenResults() now returns true. The
+	  driver has supported this for some time, DBMD just missed that fact.
 
-    - Fixed BUG#10310 - Driver doesn't support {?=CALL(...)} for calling
-      stored functions. This involved adding support for function retrieval
-      to DatabaseMetaData.getProcedures() and getProcedureColumns() as well.
+	- Fixed BUG#10310 - Driver doesn't support {?=CALL(...)} for calling
+	  stored functions. This involved adding support for function retrieval
+	  to DatabaseMetaData.getProcedures() and getProcedureColumns() as well.
 
-    - Fixed BUG#10485, SQLException thrown when retrieving YEAR(2)
-      with ResultSet.getString(). The driver will now always treat YEAR types
-      as java.sql.Dates and return the correct values for getString().
-      Alternatively, the "yearIsDateType" connection property can be set to
-      "false" and the values will be treated as SHORTs.
+	- Fixed BUG#10485, SQLException thrown when retrieving YEAR(2)
+	  with ResultSet.getString(). The driver will now always treat YEAR types
+	  as java.sql.Dates and return the correct values for getString().
+	  Alternatively, the "yearIsDateType" connection property can be set to
+	  "false" and the values will be treated as SHORTs.
 
-    - The datatype returned for TINYINT(1) columns when "tinyInt1isBit=true"
-      (the default) can be switched between Types.BOOLEAN and Types.BIT
-      using the new configuration property "transformedBitIsBoolean", which
-      defaults to "false". If set to "false" (the default),
-      DatabaseMetaData.getColumns() and ResultSetMetaData.getColumnType()
-      will return Types.BOOLEAN for TINYINT(1) columns. If "true",
-      Types.BOOLEAN will be returned instead. Irregardless of this configuration
-      property, if "tinyInt1isBit" is enabled, columns with the type TINYINT(1)
-      will be returned as java.lang.Boolean instances from
-      ResultSet.getObject(..), and ResultSetMetaData.getColumnClassName()
-      will return "java.lang.Boolean".
+	- The datatype returned for TINYINT(1) columns when "tinyInt1isBit=true"
+	  (the default) can be switched between Types.BOOLEAN and Types.BIT
+	  using the new configuration property "transformedBitIsBoolean", which
+	  defaults to "false". If set to "false" (the default),
+	  DatabaseMetaData.getColumns() and ResultSetMetaData.getColumnType()
+	  will return Types.BOOLEAN for TINYINT(1) columns. If "true",
+	  Types.BOOLEAN will be returned instead. Irregardless of this configuration
+	  property, if "tinyInt1isBit" is enabled, columns with the type TINYINT(1)
+	  will be returned as java.lang.Boolean instances from
+	  ResultSet.getObject(..), and ResultSetMetaData.getColumnClassName()
+	  will return "java.lang.Boolean".
 
-    - Fixed BUG#10496 - SQLException is thrown when using property
-      "characterSetResults" with cp932 or eucjpms.
+	- Fixed BUG#10496 - SQLException is thrown when using property
+	  "characterSetResults" with cp932 or eucjpms.
 
-    - Reorganized directory layout, sources now in "src" folder,
-      don't pollute parent directory when building, now output goes
-      to "./build", distribution goes to "./dist".
+	- Reorganized directory layout, sources now in "src" folder,
+	  don't pollute parent directory when building, now output goes
+	  to "./build", distribution goes to "./dist".
 
-    - Added support/bug hunting feature that generates .sql test
-      scripts to STDERR when "autoGenerateTestcaseScript" is set
-      to "true".
+	- Added support/bug hunting feature that generates .sql test
+	  scripts to STDERR when "autoGenerateTestcaseScript" is set
+	  to "true".
 
-    - Fixed BUG#10850 - 0-length streams not sent to server when
-      using server-side prepared statements.
+	- Fixed BUG#10850 - 0-length streams not sent to server when
+	  using server-side prepared statements.
 
-    - Setting "cachePrepStmts=true" now causes the Connection to also
-      cache the check the driver performs to determine if a prepared
-      statement can be server-side or not, as well as caches server-side
-      prepared statements for the lifetime of a connection. As before,
-      the "prepStmtCacheSize" parameter controls the size of these
-      caches.
+	- Setting "cachePrepStmts=true" now causes the Connection to also
+	  cache the check the driver performs to determine if a prepared
+	  statement can be server-side or not, as well as caches server-side
+	  prepared statements for the lifetime of a connection. As before,
+	  the "prepStmtCacheSize" parameter controls the size of these
+	  caches.
 
-    - Try to handle OutOfMemoryErrors more gracefully. Although not
-      much can be done, they will in most cases close the connection
-      they happened on so that further operations don't run into
-      a connection in some unknown state. When an OOM has happened,
-      any further operations on the connection will fail with a
-      "Connection closed" exception that will also list the OOM exception
-      as the reason for the implicit connection close event.
+	- Try to handle OutOfMemoryErrors more gracefully. Although not
+	  much can be done, they will in most cases close the connection
+	  they happened on so that further operations don't run into
+	  a connection in some unknown state. When an OOM has happened,
+	  any further operations on the connection will fail with a
+	  "Connection closed" exception that will also list the OOM exception
+	  as the reason for the implicit connection close event.
 
-    - Don't send COM_RESET_STMT for each execution of a server-side
-      prepared statement if it isn't required.
+	- Don't send COM_RESET_STMT for each execution of a server-side
+	  prepared statement if it isn't required.
 
-    - Driver detects if you're running MySQL-5.0.7 or later, and does
-      not scan for "LIMIT ?[,?]" in statements being prepared, as the
-      server supports those types of queries now.
+	- Driver detects if you're running MySQL-5.0.7 or later, and does
+	  not scan for "LIMIT ?[,?]" in statements being prepared, as the
+	  server supports those types of queries now.
 
-    - Fixed BUG#11115, Varbinary data corrupted when using server-side
-      prepared statements and ResultSet.getBytes().
+	- Fixed BUG#11115, Varbinary data corrupted when using server-side
+	  prepared statements and ResultSet.getBytes().
 
-    - Connection.setCatalog() is now aware of the "useLocalSessionState"
-      configuration property, which when set to true will prevent
-      the driver from sending "USE ..." to the server if the requested
-      catalog is the same as the current catalog.
+	- Connection.setCatalog() is now aware of the "useLocalSessionState"
+	  configuration property, which when set to true will prevent
+	  the driver from sending "USE ..." to the server if the requested
+	  catalog is the same as the current catalog.
 
-    - Added the following configuration bundles, use one or many via
-      the "useConfigs" configuration property:
+	- Added the following configuration bundles, use one or many via
+	  the "useConfigs" configuration property:
 
-        * maxPerformance -- maximum performance without being reckless
-        * solarisMaxPerformance -- maximum performance for Solaris,
-                                   avoids syscalls where it can
-        * 3-0-Compat -- Compatibility with Connector/J 3.0.x functionality
+	    * maxPerformance -- maximum performance without being reckless
+	    * solarisMaxPerformance -- maximum performance for Solaris,
+	                               avoids syscalls where it can
+	    * 3-0-Compat -- Compatibility with Connector/J 3.0.x functionality
 
-    - Added "maintainTimeStats" configuration property (defaults to "true"),
-      which tells the driver whether or not to keep track of the last query time
-      and the last successful packet sent to the server's time. If set to
-      false, removes two syscalls per query.
+	- Added "maintainTimeStats" configuration property (defaults to "true"),
+	  which tells the driver whether or not to keep track of the last query time
+	  and the last successful packet sent to the server's time. If set to
+	  false, removes two syscalls per query.
 
-    - Fixed BUG#11259, autoReconnect ping causes exception on connection
-      startup.
+	- Fixed BUG#11259, autoReconnect ping causes exception on connection
+	  startup.
 
-    - Fixed BUG#11360 Connector/J dumping query into SQLException twice
+	- Fixed BUG#11360 Connector/J dumping query into SQLException twice
 
-    - Fixed PreparedStatement.setClob() not accepting null as a parameter.
+	- Fixed PreparedStatement.setClob() not accepting null as a parameter.
 
-    - Fixed BUG#11411 - Production package doesn't include JBoss integration
-      classes.
+	- Fixed BUG#11411 - Production package doesn't include JBoss integration
+	  classes.
 
-    - Removed nonsensical "costly type conversion" warnings when using
-      usage advisor.
+	- Removed nonsensical "costly type conversion" warnings when using
+	  usage advisor.
 
 04-14-05 - Version 3.1.8-stable
 
-    - Fixed DatabaseMetaData.getTables() returning views when they were
-      not asked for as one of the requested table types.
+	- Fixed DatabaseMetaData.getTables() returning views when they were
+	  not asked for as one of the requested table types.
 
-    - Added support for new precision-math DECIMAL type in MySQL >= 5.0.3.
+	- Added support for new precision-math DECIMAL type in MySQL >= 5.0.3.
 
-    - Fixed ResultSet.getTime() on a NULL value for server-side prepared
-      statements throws NPE.
+	- Fixed ResultSet.getTime() on a NULL value for server-side prepared
+	  statements throws NPE.
 
-    - Made Connection.ping() a public method.
+	- Made Connection.ping() a public method.
 
-    - Fixed Bug#8868, DATE_FORMAT() queries returned as BLOBs from getObject().
+	- Fixed Bug#8868, DATE_FORMAT() queries returned as BLOBs from getObject().
 
-    - ServerPreparedStatements now correctly 'stream' BLOB/CLOB data to the
-      server. You can configure the threshold chunk size using the
-      JDBC URL property 'blobSendChunkSize' (the default is one megabyte).
+	- ServerPreparedStatements now correctly 'stream' BLOB/CLOB data to the
+	  server. You can configure the threshold chunk size using the
+	  JDBC URL property 'blobSendChunkSize' (the default is one megabyte).
 
     - BlobFromLocator now uses correct identifier quoting when generating
       prepared statements.
@@ -1521,15 +1538,15 @@
       passing them as a comma-delimited list for the connection property
       'sessionVariables'.
 
-    - Fixed regression in ping() for users using autoReconnect=true.
+	- Fixed regression in ping() for users using autoReconnect=true.
 
-    - Fixed BUG#9040 - PreparedStatement.addBatch() doesn't work with server-side
-      prepared statements and streaming BINARY data.
+	- Fixed BUG#9040 - PreparedStatement.addBatch() doesn't work with server-side
+	  prepared statements and streaming BINARY data.
 
-    - Fixed BUG#8800 - DBMD.supportsMixedCase*Identifiers() returns wrong
-      value on servers running on case-sensitive filesystems.
+	- Fixed BUG#8800 - DBMD.supportsMixedCase*Identifiers() returns wrong
+	  value on servers running on case-sensitive filesystems.
 
-    - Fixed BUG#9206, can not use 'UTF-8' for characterSetResults
+	- Fixed BUG#9206, can not use 'UTF-8' for characterSetResults
       configuration property.
 
     - Fixed BUG#9236, a continuation of BUG#8868, where functions used in queries
@@ -1539,88 +1556,88 @@
       classes for RSMD.getColumnClassName() and ResultSet.getObject().
 
     - Fixed BUG#8792 - DBMD.supportsResultSetConcurrency() not returning
-      true for forward-only/read-only result sets (we obviously support this).
+	  true for forward-only/read-only result sets (we obviously support this).
 
-    - Fixed BUG#8803, 'DATA_TYPE' column from DBMD.getBestRowIdentifier()
-      causes ArrayIndexOutOfBoundsException when accessed (and in fact, didn't
-      return any value).
+	- Fixed BUG#8803, 'DATA_TYPE' column from DBMD.getBestRowIdentifier()
+	  causes ArrayIndexOutOfBoundsException when accessed (and in fact, didn't
+	  return any value).
 
-    - Check for empty strings ('') when converting char/varchar column data to numbers,
-      throw exception if 'emptyStringsConvertToZero' configuration property is set
-      to 'false' (for backwards-compatibility with 3.0, it is now set to 'true'
-      by default, but will most likely default to 'false' in 3.2).
+	- Check for empty strings ('') when converting char/varchar column data to numbers,
+	  throw exception if 'emptyStringsConvertToZero' configuration property is set
+	  to 'false' (for backwards-compatibility with 3.0, it is now set to 'true'
+	  by default, but will most likely default to 'false' in 3.2).
 
-    - Fixed BUG#9320 - PreparedStatement.getMetaData() inserts blank row in database
-      under certain conditions when not using server-side prepared statements.
+	- Fixed BUG#9320 - PreparedStatement.getMetaData() inserts blank row in database
+	  under certain conditions when not using server-side prepared statements.
 
-    - Connection.canHandleAsPreparedStatement() now makes 'best effort' to distinguish
-      LIMIT clauses with placeholders in them from ones without in order to have fewer
-      false positives when generating work-arounds for statements the server cannot
-      currently handle as server-side prepared statements.
+	- Connection.canHandleAsPreparedStatement() now makes 'best effort' to distinguish
+	  LIMIT clauses with placeholders in them from ones without in order to have fewer
+	  false positives when generating work-arounds for statements the server cannot
+	  currently handle as server-side prepared statements.
 
-    - Fixed build.xml to not compile log4j logging if log4j not available.
+	- Fixed build.xml to not compile log4j logging if log4j not available.
 
-    - Added support for the c3p0 connection pool's (http://c3p0.sf.net/)
-      validation/connection checker interface which uses the lightweight
-      'COM_PING' call to the server if available. To use it, configure your
-      c3p0 connection pool's 'connectionTesterClassName' property to use
-      'com.mysql.jdbc.integration.c3p0.MysqlConnectionTester'.
+	- Added support for the c3p0 connection pool's (http://c3p0.sf.net/)
+	  validation/connection checker interface which uses the lightweight
+	  'COM_PING' call to the server if available. To use it, configure your
+	  c3p0 connection pool's 'connectionTesterClassName' property to use
+	  'com.mysql.jdbc.integration.c3p0.MysqlConnectionTester'.
 
-    - Better detection of LIMIT inside/outside of quoted strings so that
-      the driver can more correctly determine whether a prepared statement
-      can be prepared on the server or not.
+	- Better detection of LIMIT inside/outside of quoted strings so that
+	  the driver can more correctly determine whether a prepared statement
+	  can be prepared on the server or not.
 
-    - Fixed BUG#9319 - Stored procedures with same name in
-      different databases confuse the driver when it tries to determine
-      parameter counts/types.
+	- Fixed BUG#9319 - Stored procedures with same name in
+	  different databases confuse the driver when it tries to determine
+	  parameter counts/types.
 
     - Added finalizers to ResultSet and Statement implementations to be JDBC
       spec-compliant, which requires that if not explicitly closed, these
       resources should be closed upon garbage collection.
 
     - Fixed BUG#9682 - Stored procedures with DECIMAL parameters with
-      storage specifications that contained "," in them would fail.
+	  storage specifications that contained "," in them would fail.
 
-    - PreparedStatement.setObject(int, Object, int type, int scale) now
-      uses scale value for BigDecimal instances.
+	- PreparedStatement.setObject(int, Object, int type, int scale) now
+	  uses scale value for BigDecimal instances.
 
-    - Fixed BUG#9704 - Statement.getMoreResults() could throw NPE when
-      existing result set was .close()d.
+	- Fixed BUG#9704 - Statement.getMoreResults() could throw NPE when
+	  existing result set was .close()d.
 
-    - The performance metrics feature now gathers information about
-      number of tables referenced in a SELECT.
+	- The performance metrics feature now gathers information about
+	  number of tables referenced in a SELECT.
 
-    - The logging system is now automatically configured. If the value has
-      been set by the user, via the URL property "logger" or the system
-      property "com.mysql.jdbc.logger", then use that, otherwise, autodetect
-      it using the following steps:
+	- The logging system is now automatically configured. If the value has
+	  been set by the user, via the URL property "logger" or the system
+	  property "com.mysql.jdbc.logger", then use that, otherwise, autodetect
+	  it using the following steps:
 
-         Log4j, if it's available,
-         Then JDK1.4 logging,
-         Then fallback to our STDERR logging.
+    	 Log4j, if it's available,
+    	 Then JDK1.4 logging,
+    	 Then fallback to our STDERR logging.
 
-    - Fixed BUG#9778, DBMD.getTables() shouldn't return tables if views
-      are asked for, even if the database version doesn't support views.
+   	- Fixed BUG#9778, DBMD.getTables() shouldn't return tables if views
+	  are asked for, even if the database version doesn't support views.
 
-    - Fixed driver not returning 'true' for '-1' when ResultSet.getBoolean()
-      was called on result sets returned from server-side prepared statements.
+	- Fixed driver not returning 'true' for '-1' when ResultSet.getBoolean()
+	  was called on result sets returned from server-side prepared statements.
 
-    - Added a Manifest.MF file with implementation information to the .jar
-      file.
+	- Added a Manifest.MF file with implementation information to the .jar
+	  file.
 
-    - More tests in Field.isOpaqueBinary() to distinguish opaque binary (i.e.
-      fields with type CHAR(n) and CHARACTER SET BINARY) from output of
-      various scalar and aggregate functions that return strings.
+	- More tests in Field.isOpaqueBinary() to distinguish opaque binary (i.e.
+	  fields with type CHAR(n) and CHARACTER SET BINARY) from output of
+	  various scalar and aggregate functions that return strings.
 
-    - Fixed BUG#9917 - Should accept null for catalog (meaning use current)
-      in DBMD methods, even though it's not JDBC-compliant for legacy's sake.
-      Disable by setting connection property "nullCatalogMeansCurrent" to "false"
-      (which will be the default value in C/J 3.2.x).
+	- Fixed BUG#9917 - Should accept null for catalog (meaning use current)
+	  in DBMD methods, even though it's not JDBC-compliant for legacy's sake.
+	  Disable by setting connection property "nullCatalogMeansCurrent" to "false"
+	  (which will be the default value in C/J 3.2.x).
 
-    - Fixed BUG#9769 - Should accept null for name patterns in DBMD (meaning "%"),
-      even though it isn't JDBC compliant, for legacy's sake. Disable by setting
-      connection property "nullNamePatternMatchesAll" to "false" (which will be
-      the default value in C/J 3.2.x).
+	- Fixed BUG#9769 - Should accept null for name patterns in DBMD (meaning "%"),
+	  even though it isn't JDBC compliant, for legacy's sake. Disable by setting
+	  connection property "nullNamePatternMatchesAll" to "false" (which will be
+	  the default value in C/J 3.2.x).
 
 02-18-05 - Version 3.1.7-stable
 
@@ -1738,13 +1755,13 @@
 
 12-02-04 - Version 3.1.5-gamma
 
-    - Fix comparisons made between string constants and dynamic strings that
-      are either toUpperCase()d or toLowerCase()d to use Locale.ENGLISH, as
-      some locales 'override' case rules for English. Also use
-      StringUtils.indexOfIgnoreCase() instead of .toUpperCase().indexOf(),
-      avoids creating a very short-lived transient String instance.
+	- Fix comparisons made between string constants and dynamic strings that
+	  are either toUpperCase()d or toLowerCase()d to use Locale.ENGLISH, as
+	  some locales 'override' case rules for English. Also use
+	  StringUtils.indexOfIgnoreCase() instead of .toUpperCase().indexOf(),
+	  avoids creating a very short-lived transient String instance.
 
-    - Fixed BUG#5235 - Server-side prepared statements did not honor
+	- Fixed BUG#5235 - Server-side prepared statements did not honor
       'zeroDateTimeBehavior' property, and would cause class-cast
       exceptions when using ResultSet.getObject(), as the all-zero string
       was always returned.
@@ -1851,9 +1868,9 @@
       error), caused NPE. Fixed.
 
     - Fixed BUG#5012 -- ServerPreparedStatements dealing with return of
-      DECIMAL type don't work.
+	  DECIMAL type don't work.
 
-    - Fixed BUG#5032 -- ResultSet.getObject() doesn't return
+	- Fixed BUG#5032 -- ResultSet.getObject() doesn't return
       type Boolean for pseudo-bit types from prepared statements on 4.1.x
       (shortcut for avoiding extra type conversion when using binary-encoded
       result sets obscurred test in getObject() for 'pseudo' bit type)
@@ -1888,185 +1905,185 @@
 
 07-07-04 - Version 3.1.3-beta
 
-    - Mangle output parameter names for CallableStatements so they
-      will not clash with user variable names.
+	- Mangle output parameter names for CallableStatements so they
+	  will not clash with user variable names.
 
-    - Added support for INOUT parameters in CallableStatements.
+	- Added support for INOUT parameters in CallableStatements.
 
-    - Fix for BUG#4119, null bitmask sent for server-side prepared
-      statements was incorrect.
+	- Fix for BUG#4119, null bitmask sent for server-side prepared
+	  statements was incorrect.
 
-    - Use SQL Standard SQL states by default, unless 'useSqlStateCodes'
-      property is set to 'false'.
+	- Use SQL Standard SQL states by default, unless 'useSqlStateCodes'
+	  property is set to 'false'.
 
-    - Added packet debuging code (see the 'enablePacketDebug' property
-      documentation).
+	- Added packet debuging code (see the 'enablePacketDebug' property
+	  documentation).
 
-    - Added constants for MySQL error numbers (publicly-accessible,
-      see com.mysql.jdbc.MysqlErrorNumbers), and the ability to
-      generate the mappings of vendor error codes to SQLStates
-      that the driver uses (for documentation purposes).
+	- Added constants for MySQL error numbers (publicly-accessible,
+	  see com.mysql.jdbc.MysqlErrorNumbers), and the ability to
+	  generate the mappings of vendor error codes to SQLStates
+	  that the driver uses (for documentation purposes).
 
-    - Externalized more messages (on-going effort).
+	- Externalized more messages (on-going effort).
 
-    - Fix for BUG#4311 - Error in retrieval of mediumint column with
-      prepared statements and binary protocol.
+	- Fix for BUG#4311 - Error in retrieval of mediumint column with
+	  prepared statements and binary protocol.
 
-    - Support new timezone variables in MySQL-4.1.3 when
-      'useTimezone=true'
+	- Support new timezone variables in MySQL-4.1.3 when
+	  'useTimezone=true'
 
-    - Support for unsigned numerics as return types from prepared statements.
-      This also causes a change in ResultSet.getObject() for the 'bigint unsigned'
-      type, which used to return BigDecimal instances, it now returns instances
-      of java.lang.BigInteger.
+	- Support for unsigned numerics as return types from prepared statements.
+	  This also causes a change in ResultSet.getObject() for the 'bigint unsigned'
+	  type, which used to return BigDecimal instances, it now returns instances
+	  of java.lang.BigInteger.
 
 06-09-04 - Version 3.1.2-alpha
 
-    - Fixed stored procedure parameter parsing info when size was
-      specified for a parameter (i.e. char(), varchar()).
+	- Fixed stored procedure parameter parsing info when size was
+	  specified for a parameter (i.e. char(), varchar()).
 
-    - Enabled callable statement caching via 'cacheCallableStmts'
-      property.
+	- Enabled callable statement caching via 'cacheCallableStmts'
+	  property.
 
-    - Fixed case when no output parameters specified for a
-      stored procedure caused a bogus query to be issued
-      to retrieve out parameters, leading to a syntax error
-      from the server.
+	- Fixed case when no output parameters specified for a
+	  stored procedure caused a bogus query to be issued
+	  to retrieve out parameters, leading to a syntax error
+	  from the server.
 
-    - Fixed case when no parameters could cause a NullPointerException
-      in CallableStatement.setOutputParameters().
+	- Fixed case when no parameters could cause a NullPointerException
+	  in CallableStatement.setOutputParameters().
 
-    - Removed wrapping of exceptions in MysqlIO.changeUser().
+	- Removed wrapping of exceptions in MysqlIO.changeUser().
 
-    - Fixed sending of split packets for large queries, enabled nio
-      ability to send large packets as well.
+	- Fixed sending of split packets for large queries, enabled nio
+	  ability to send large packets as well.
 
-    - Added .toString() functionality to ServerPreparedStatement,
-      which should help if you're trying to debug a query that is
-      a prepared statement (it shows SQL as the server would process).
+	- Added .toString() functionality to ServerPreparedStatement,
+	  which should help if you're trying to debug a query that is
+	  a prepared statement (it shows SQL as the server would process).
 
-    - Added 'gatherPerformanceMetrics' property, along with properties
-      to control when/where this info gets logged (see docs for more
-      info).
+	- Added 'gatherPerformanceMetrics' property, along with properties
+	  to control when/where this info gets logged (see docs for more
+	  info).
 
-    - ServerPreparedStatements weren't actually de-allocating
-      server-side resources when .close() was called.
+	- ServerPreparedStatements weren't actually de-allocating
+	  server-side resources when .close() was called.
 
-    - Added 'logSlowQueries' property, along with property
-      'slowQueriesThresholdMillis' to control when a query should
-      be considered 'slow'.
+	- Added 'logSlowQueries' property, along with property
+	  'slowQueriesThresholdMillis' to control when a query should
+	  be considered 'slow'.
 
-    - Correctly map output parameters to position given in
-      prepareCall() vs. order implied during registerOutParameter() -
-      fixes BUG#3146.
+	- Correctly map output parameters to position given in
+	  prepareCall() vs. order implied during registerOutParameter() -
+	  fixes BUG#3146.
 
-    - Correctly detect initial character set for servers >= 4.1.0
+	- Correctly detect initial character set for servers >= 4.1.0
 
-    - Cleaned up detection of server properties.
+	- Cleaned up detection of server properties.
 
-    - Support placeholder for parameter metadata for server >= 4.1.2
+	- Support placeholder for parameter metadata for server >= 4.1.2
 
-    - Fix for BUG#3539 getProcedures() does not return any procedures in
-      result set
+	- Fix for BUG#3539 getProcedures() does not return any procedures in
+	  result set
 
-    - Fix for BUG#3540 getProcedureColumns() doesn't work with wildcards
-      for procedure name
+	- Fix for BUG#3540 getProcedureColumns() doesn't work with wildcards
+	  for procedure name
 
-    - Fixed BUG#3520 -- DBMD.getSQLStateType() returns incorrect value.
+	- Fixed BUG#3520 -- DBMD.getSQLStateType() returns incorrect value.
 
-    - Added 'connectionCollation' property to cause driver to issue
-      'set collation_connection=...' query on connection init if default
-      collation for given charset is not appropriate.
+	- Added 'connectionCollation' property to cause driver to issue
+	  'set collation_connection=...' query on connection init if default
+	  collation for given charset is not appropriate.
 
-    - Fixed DatabaseMetaData.getProcedures() when run on MySQL-5.0.0 (output of
-    'show procedure status' changed between 5.0.1 and 5.0.0.
+	- Fixed DatabaseMetaData.getProcedures() when run on MySQL-5.0.0 (output of
+	'show procedure status' changed between 5.0.1 and 5.0.0.
 
-    - Fixed BUG#3804 -- getWarnings() returns SQLWarning instead of DataTruncation
+	- Fixed BUG#3804 -- getWarnings() returns SQLWarning instead of DataTruncation
 
-    - Don't enable server-side prepared statements for server version 5.0.0 or 5.0.1,
-    as they aren't compatible with the '4.1.2+' style that the driver uses (the driver
-    expects information to come back that isn't there, so it hangs).
+	- Don't enable server-side prepared statements for server version 5.0.0 or 5.0.1,
+	as they aren't compatible with the '4.1.2+' style that the driver uses (the driver
+	expects information to come back that isn't there, so it hangs).
 
 
 02-14-04 - Version 3.1.1-alpha
 
     - Fixed bug with UpdatableResultSets not using client-side
-      prepared statements.
+	  prepared statements.
 
-    - Fixed character encoding issues when converting bytes to
-      ASCII when MySQL doesn't provide the character set, and
-      the JVM is set to a multibyte encoding (usually affecting
-      retrieval of numeric values).
+	- Fixed character encoding issues when converting bytes to
+	  ASCII when MySQL doesn't provide the character set, and
+	  the JVM is set to a multibyte encoding (usually affecting
+	  retrieval of numeric values).
 
-    - Unpack 'unknown' data types from server prepared statements
-      as Strings.
+	- Unpack 'unknown' data types from server prepared statements
+	  as Strings.
 
-    - Implemented long data (Blobs, Clobs, InputStreams, Readers)
-      for server prepared statements.
+	- Implemented long data (Blobs, Clobs, InputStreams, Readers)
+	  for server prepared statements.
 
-    - Implemented Statement.getWarnings() for MySQL-4.1 and newer
-      (using 'SHOW WARNINGS').
+	- Implemented Statement.getWarnings() for MySQL-4.1 and newer
+	  (using 'SHOW WARNINGS').
 
-    - Default result set type changed to TYPE_FORWARD_ONLY
-      (JDBC compliance).
+	- Default result set type changed to TYPE_FORWARD_ONLY
+	  (JDBC compliance).
 
-    - Centralized setting of result set type and concurrency.
+	- Centralized setting of result set type and concurrency.
 
-    - Re-factored how connection properties are set and exposed
-      as DriverPropertyInfo as well as Connection and DataSource
-      properties.
+	- Re-factored how connection properties are set and exposed
+	  as DriverPropertyInfo as well as Connection and DataSource
+	  properties.
 
-    - Support for NIO. Use 'useNIO=true' on platforms that support
-      NIO.
+	- Support for NIO. Use 'useNIO=true' on platforms that support
+	  NIO.
 
-    - Support for SAVEPOINTs (MySQL >= 4.0.14 or 4.1.1).
+	- Support for SAVEPOINTs (MySQL >= 4.0.14 or 4.1.1).
 
-    - Support for mysql_change_user()...See the changeUser() method
-      in com.mysql.jdbc.Connection.
+	- Support for mysql_change_user()...See the changeUser() method
+	  in com.mysql.jdbc.Connection.
 
-    - Reduced number of methods called in average query to be more
-      efficient.
+	- Reduced number of methods called in average query to be more
+	  efficient.
 
-    - Prepared Statements will be re-prepared on auto-reconnect. Any errors
-      encountered are postponed until first attempt to re-execute the
-      re-prepared statement.
+	- Prepared Statements will be re-prepared on auto-reconnect. Any errors
+	  encountered are postponed until first attempt to re-execute the
+	  re-prepared statement.
 
-    - Ensure that warnings are cleared before executing queries
-      on prepared statements, as-per JDBC spec (now that we support
-      warnings).
+	- Ensure that warnings are cleared before executing queries
+	  on prepared statements, as-per JDBC spec (now that we support
+	  warnings).
 
-    - Support 'old' profileSql capitalization in ConnectionProperties.
-      This property is deprecated, you should use 'profileSQL' if possible.
+	- Support 'old' profileSql capitalization in ConnectionProperties.
+	  This property is deprecated, you should use 'profileSQL' if possible.
 
-    - Optimized Buffer.readLenByteArray() to return shared empty byte array
-      when length is 0.
+	- Optimized Buffer.readLenByteArray() to return shared empty byte array
+	  when length is 0.
 
-    - Allow contents of PreparedStatement.setBlob() to be retained
-      between calls to .execute*().
+	- Allow contents of PreparedStatement.setBlob() to be retained
+	  between calls to .execute*().
 
-    - Deal with 0-length tokens in EscapeProcessor (caused by callable
-      statement escape syntax).
+	- Deal with 0-length tokens in EscapeProcessor (caused by callable
+	  statement escape syntax).
 
-    - Check for closed connection on delete/update/insert row operations in
-      UpdatableResultSet.
+	- Check for closed connection on delete/update/insert row operations in
+	  UpdatableResultSet.
 
-    - Fix support for table aliases when checking for all primary keys in
-      UpdatableResultSet.
+	- Fix support for table aliases when checking for all primary keys in
+	  UpdatableResultSet.
 
-    - Removed useFastDates connection property.
+	- Removed useFastDates connection property.
 
-    - Correctly initialize datasource properties from JNDI Refs, including
-      explicitly specified URLs.
+	- Correctly initialize datasource properties from JNDI Refs, including
+	  explicitly specified URLs.
 
-    - DatabaseMetaData now reports supportsStoredProcedures() for
-      MySQL versions >= 5.0.0
+	- DatabaseMetaData now reports supportsStoredProcedures() for
+	  MySQL versions >= 5.0.0
 
-    - Fixed stack overflow in Connection.prepareCall() (bad merge).
+	- Fixed stack overflow in Connection.prepareCall() (bad merge).
 
-    - Fixed IllegalAccessError to Calendar.getTimeInMillis() in DateTimeValue
-      (for JDK < 1.4).
+	- Fixed IllegalAccessError to Calendar.getTimeInMillis() in DateTimeValue
+	  (for JDK < 1.4).
 
-    - Fix for BUG#1673, where DatabaseMetaData.getColumns() is not
+	- Fix for BUG#1673, where DatabaseMetaData.getColumns() is not
       returning correct column ordinal info for non '%' column name patterns.
 
     - Merged fix of datatype mapping from MySQL type 'FLOAT' to
@@ -2128,18 +2145,18 @@
     - Fixed BUG#2623 -- Class-cast exception when using
       scrolling result sets and server-side prepared statements.
 
-    - Merged unbuffered input code from 3.0.
+	- Merged unbuffered input code from 3.0.
 
-    - Fixed ConnectionProperties that weren't properly exposed
-      via accessors, cleaned up ConnectionProperties code.
+	- Fixed ConnectionProperties that weren't properly exposed
+	  via accessors, cleaned up ConnectionProperties code.
 
-    - Fixed BUG#2671, NULL fields not being encoded correctly in
-      all cases in server side prepared statements.
+	- Fixed BUG#2671, NULL fields not being encoded correctly in
+	  all cases in server side prepared statements.
 
-    - Fixed rare buffer underflow when writing numbers into buffers
-      for sending prepared statement execution requests.
+	- Fixed rare buffer underflow when writing numbers into buffers
+	  for sending prepared statement execution requests.
 
-    - Use DocBook version of docs for shipped versions of drivers.
+	- Use DocBook version of docs for shipped versions of drivers.
 
 
 02-18-03 - Version 3.1.0-alpha
@@ -2162,24 +2179,24 @@
     - Fixed BUG#5874, Timestamp/Time conversion goes in the wrong 'direction'
       when useTimeZone='true' and server timezone differs from client timezone.
 
-    - Fixed BUG#7081, DatabaseMetaData.getIndexInfo() ignoring 'unique'
-      parameter.
+	- Fixed BUG#7081, DatabaseMetaData.getIndexInfo() ignoring 'unique'
+	  parameter.
 
-    - Support new protocol type 'MYSQL_TYPE_VARCHAR'.
+	- Support new protocol type 'MYSQL_TYPE_VARCHAR'.
 
-    - Added 'useOldUTF8Behavoior' configuration property, which causes
-      JDBC driver to act like it did with MySQL-4.0.x and earlier when
-      the character encoding is 'utf-8' when connected to MySQL-4.1 or
-      newer.
+	- Added 'useOldUTF8Behavoior' configuration property, which causes
+	  JDBC driver to act like it did with MySQL-4.0.x and earlier when
+	  the character encoding is 'utf-8' when connected to MySQL-4.1 or
+	  newer.
 
-    - Fixed BUG#7316 - Statements created from a pooled connection were
-      returning physical connection instead of logical connection when
-      getConnection() was called.
+	- Fixed BUG#7316 - Statements created from a pooled connection were
+	  returning physical connection instead of logical connection when
+	  getConnection() was called.
 
-    - Fixed BUG#7033 - PreparedStatements don't encode Big5 (and other
-      multibyte) character sets correctly in static SQL strings.
+	- Fixed BUG#7033 - PreparedStatements don't encode Big5 (and other
+	  multibyte) character sets correctly in static SQL strings.
 
-    - Fixed BUG#6966, connections starting up failed-over (due to down master)
+	- Fixed BUG#6966, connections starting up failed-over (due to down master)
       never retry master.
 
     - Fixed BUG#7061, PreparedStatement.fixDecimalExponent() adding extra
@@ -2237,15 +2254,15 @@
 
 11-15-04 - Version 3.0.16-ga
 
-    - Re-issue character set configuration commands when re-using pooled
-      connections and/or Connection.changeUser() when connected to MySQL-4.1
-      or newer.
+	- Re-issue character set configuration commands when re-using pooled
+	  connections and/or Connection.changeUser() when connected to MySQL-4.1
+	  or newer.
 
-    - Fixed ResultSetMetaData.isReadOnly() to detect non-writable columns
-      when connected to MySQL-4.1 or newer, based on existence of 'original'
-      table and column names.
+	- Fixed ResultSetMetaData.isReadOnly() to detect non-writable columns
+	  when connected to MySQL-4.1 or newer, based on existence of 'original'
+	  table and column names.
 
-    - Fixed BUG#5664, ResultSet.updateByte() when on insert row
+	- Fixed BUG#5664, ResultSet.updateByte() when on insert row
       throws ArrayOutOfBoundsException.
 
     - Fixed DatabaseMetaData.getTypes() returning incorrect (i.e. non-negative)
@@ -2266,84 +2283,84 @@
 
 09-04-04 - Version 3.0.15-ga
 
-    - Fixed BUG#4010 - StringUtils.escapeEasternUnicodeByteStream is still
-      broken for GBK
+	- Fixed BUG#4010 - StringUtils.escapeEasternUnicodeByteStream is still
+	  broken for GBK
 
-    - Fixed BUG#4334 - Failover for autoReconnect not using port #'s for any
-      hosts, and not retrying all hosts. (WARN: This required a change to
-      the SocketFactory connect() method signature, which is now
+	- Fixed BUG#4334 - Failover for autoReconnect not using port #'s for any
+	  hosts, and not retrying all hosts. (WARN: This required a change to
+	  the SocketFactory connect() method signature, which is now
 
-        public Socket connect(String host, int portNumber, Properties props),
+	    public Socket connect(String host, int portNumber, Properties props),
 
-      therefore any third-party socket factories will have to be changed
-      to support this signature.
+	  therefore any third-party socket factories will have to be changed
+	  to support this signature.
 
-    - Logical connections created by MysqlConnectionPoolDataSource will
-      now issue a rollback() when they are closed and sent back to the pool.
-      If your application server/connection pool already does this for you, you
-      can set the 'rollbackOnPooledClose' property to false to avoid the
-      overhead of an extra rollback().
+	- Logical connections created by MysqlConnectionPoolDataSource will
+	  now issue a rollback() when they are closed and sent back to the pool.
+	  If your application server/connection pool already does this for you, you
+	  can set the 'rollbackOnPooledClose' property to false to avoid the
+	  overhead of an extra rollback().
 
-    - Removed redundant calls to checkRowPos() in ResultSet.
+	- Removed redundant calls to checkRowPos() in ResultSet.
 
-    - Fixed BUG#4742, 'DOUBLE' mapped twice in DBMD.getTypeInfo().
+	- Fixed BUG#4742, 'DOUBLE' mapped twice in DBMD.getTypeInfo().
 
-    - Added FLOSS license exemption.
+	- Added FLOSS license exemption.
 
-    - Fixed BUG#4808, calling .close() twice on a PooledConnection causes NPE.
+	- Fixed BUG#4808, calling .close() twice on a PooledConnection causes NPE.
 
-    - Fixed BUG#4138 and BUG#4860, DBMD.getColumns() returns incorrect JDBC
-      type for unsigned columns. This affects type mappings for all numeric
-      types in the RSMD.getColumnType() and RSMD.getColumnTypeNames() methods
-      as well, to ensure that 'like' types from DBMD.getColumns() match up
-      with what RSMD.getColumnType() and getColumnTypeNames() return.
+	- Fixed BUG#4138 and BUG#4860, DBMD.getColumns() returns incorrect JDBC
+	  type for unsigned columns. This affects type mappings for all numeric
+	  types in the RSMD.getColumnType() and RSMD.getColumnTypeNames() methods
+	  as well, to ensure that 'like' types from DBMD.getColumns() match up
+	  with what RSMD.getColumnType() and getColumnTypeNames() return.
 
-    - 'Production' - 'GA' in naming scheme of distributions.
+	- 'Production' - 'GA' in naming scheme of distributions.
 
-    - Fix for BUG#4880, RSMD.getPrecision() returning 0 for non-numeric types
-      (should return max length in chars for non-binary types, max length
-      in bytes for binary types). This fix also fixes mapping of
-      RSMD.getColumnType() and RSMD.getColumnTypeName() for the BLOB types based
-      on the length sent from the server (the server doesn't distinguish between
-      TINYBLOB, BLOB, MEDIUMBLOB or LONGBLOB at the network protocol level).
+	- Fix for BUG#4880, RSMD.getPrecision() returning 0 for non-numeric types
+	  (should return max length in chars for non-binary types, max length
+	  in bytes for binary types). This fix also fixes mapping of
+	  RSMD.getColumnType() and RSMD.getColumnTypeName() for the BLOB types based
+	  on the length sent from the server (the server doesn't distinguish between
+	  TINYBLOB, BLOB, MEDIUMBLOB or LONGBLOB at the network protocol level).
 
-    - Fixed BUG#5022 - ResultSet should release Field[] instance in .close().
+	- Fixed BUG#5022 - ResultSet should release Field[] instance in .close().
 
     - Fixed BUG#5069 -- ResultSet.getMetaData() should not return
-      incorrectly-initialized metadata if the result set has been closed, but
-      should instead throw a SQLException. Also fixed for getRow() and
-      getWarnings() and traversal methods by calling checkClosed() before
-      operating on instance-level fields that are nullified during .close().
+	  incorrectly-initialized metadata if the result set has been closed, but
+	  should instead throw a SQLException. Also fixed for getRow() and
+	  getWarnings() and traversal methods by calling checkClosed() before
+	  operating on instance-level fields that are nullified during .close().
 
-    - Parse new timezone variables from 4.1.x servers.
+	- Parse new timezone variables from 4.1.x servers.
 
-    - Use _binary introducer for PreparedStatement.setBytes() and
-      set*Stream() when connected to MySQL-4.1.x or newer to avoid
-      misinterpretation during character conversion.
+	- Use _binary introducer for PreparedStatement.setBytes() and
+	  set*Stream() when connected to MySQL-4.1.x or newer to avoid
+	  misinterpretation during character conversion.
 
 05-28-04 - Version 3.0.14-production
 
-    - Fixed URL parsing error
+	- Fixed URL parsing error
 
 05-27-04 - Version 3.0.13-production
 
-    - Fixed BUG#3848 - Using a MySQLDatasource without server name fails
+	- Fixed BUG#3848 - Using a MySQLDatasource without server name fails
 
-    - Fixed BUG#3920 - "No Database Selected" when using
-      MysqlConnectionPoolDataSource.
+	- Fixed BUG#3920 - "No Database Selected" when using
+	  MysqlConnectionPoolDataSource.
 
-    - Fixed BUG#3873 - PreparedStatement.getGeneratedKeys() method returns only
-      1 result for batched insertions
+	- Fixed BUG#3873 - PreparedStatement.getGeneratedKeys() method returns only
+	  1 result for batched insertions
 
 05-18-04 - Version 3.0.12-production
 
-    - Add unsigned attribute to DatabaseMetaData.getColumns() output
-      in the TYPE_NAME column.
+	- Add unsigned attribute to DatabaseMetaData.getColumns() output
+	  in the TYPE_NAME column.
 
-    - Added 'failOverReadOnly' property, to allow end-user to configure
-      state of connection (read-only/writable) when failed over.
+	- Added 'failOverReadOnly' property, to allow end-user to configure
+	  state of connection (read-only/writable) when failed over.
 
-    - Backported 'change user' and 'reset server state' functionality
+	- Backported 'change user' and 'reset server state' functionality
       from 3.1 branch, to allow clients of MysqlConnectionPoolDataSource
       to reset server state on getConnection() on a pooled connection.
 
@@ -2421,30 +2438,30 @@
 
 02-19-04 - Version 3.0.11-stable
 
-    - Trigger a 'SET NAMES utf8' when encoding is forced to 'utf8' _or_
-      'utf-8' via the 'characterEncoding' property. Previously, only the
-      Java-style encoding name of 'utf-8' would trigger this.
+	- Trigger a 'SET NAMES utf8' when encoding is forced to 'utf8' _or_
+	  'utf-8' via the 'characterEncoding' property. Previously, only the
+	  Java-style encoding name of 'utf-8' would trigger this.
 
-    - AutoReconnect time was growing faster than exponentially (BUG#2447).
+	- AutoReconnect time was growing faster than exponentially (BUG#2447).
 
-    - Fixed failover always going to last host in list (BUG#2578)
+	- Fixed failover always going to last host in list (BUG#2578)
 
-    - Added 'useUnbufferedInput' parameter, and now use it by default
-      (due to JVM issue
-      http://developer.java.sun.com/developer/bugParade/bugs/4401235.html)
+	- Added 'useUnbufferedInput' parameter, and now use it by default
+	  (due to JVM issue
+	  http://developer.java.sun.com/developer/bugParade/bugs/4401235.html)
 
-    - Detect 'on/off' or '1','2','3' form of lower_case_table_names on
-      server.
+	- Detect 'on/off' or '1','2','3' form of lower_case_table_names on
+	  server.
 
-    - Return 'java.lang.Integer' for TINYINT and SMALLINT types from
-      ResultSetMetaData.getColumnClassName() (fix for BUG#2852).
+	- Return 'java.lang.Integer' for TINYINT and SMALLINT types from
+	  ResultSetMetaData.getColumnClassName() (fix for BUG#2852).
 
-    - Return 'java.lang.Double' for FLOAT type from ResultSetMetaData.
-      getColumnClassName() (fix for BUG#2855).
+	- Return 'java.lang.Double' for FLOAT type from ResultSetMetaData.
+	  getColumnClassName() (fix for BUG#2855).
 
-    - Return '[B' instead of java.lang.Object for BINARY, VARBINARY and
-      LONGVARBINARY types from ResultSetMetaData.getColumnClassName()
-      (JDBC compliance).
+	- Return '[B' instead of java.lang.Object for BINARY, VARBINARY and
+	  LONGVARBINARY types from ResultSetMetaData.getColumnClassName()
+	  (JDBC compliance).
 
 01-13-04 - Version 3.0.10-stable
 
@@ -2547,135 +2564,135 @@
 
 10-07-03 - Version 3.0.9-stable
 
-    - Faster date handling code in ResultSet and PreparedStatement (no longer
-      uses Date methods that synchronize on static calendars).
+	- Faster date handling code in ResultSet and PreparedStatement (no longer
+	  uses Date methods that synchronize on static calendars).
 
-    - Fixed test for end of buffer in Buffer.readString().
+	- Fixed test for end of buffer in Buffer.readString().
 
-    - Fixed ResultSet.previous() behavior to move current
-      position to before result set when on first row
-      of result set (bugs.mysql.com BUG#496)
+	- Fixed ResultSet.previous() behavior to move current
+	  position to before result set when on first row
+	  of result set (bugs.mysql.com BUG#496)
 
-    - Fixed Statement and PreparedStatement issuing bogus queries
-      when setMaxRows() had been used and a LIMIT clause was present
-      in the query.
+	- Fixed Statement and PreparedStatement issuing bogus queries
+	  when setMaxRows() had been used and a LIMIT clause was present
+	  in the query.
 
-    - Fixed BUG#661 - refreshRow didn't work when primary key values
-      contained values that needed to be escaped (they ended up being
-      doubly-escaped).
+	- Fixed BUG#661 - refreshRow didn't work when primary key values
+	  contained values that needed to be escaped (they ended up being
+	  doubly-escaped).
 
-    - Support InnoDB contraint names when extracting foreign key info
-      in DatabaseMetaData BUG#517 and BUG#664
-      (impl. ideas from Parwinder Sekhon)
+	- Support InnoDB contraint names when extracting foreign key info
+	  in DatabaseMetaData BUG#517 and BUG#664
+	  (impl. ideas from Parwinder Sekhon)
 
-    - Backported 4.1 protocol changes from 3.1 branch (server-side SQL
-      states, new field info, larger client capability flags,
-      connect-with-database, etc).
+	- Backported 4.1 protocol changes from 3.1 branch (server-side SQL
+	  states, new field info, larger client capability flags,
+	  connect-with-database, etc).
 
-    - Fix UpdatableResultSet to return values for getXXX() when on
-      insert row (BUG#675).
+	- Fix UpdatableResultSet to return values for getXXX() when on
+	  insert row (BUG#675).
 
-    - The insertRow in an UpdatableResultSet is now loaded with
-      the default column values when moveToInsertRow() is called
-      (BUG#688)
+	- The insertRow in an UpdatableResultSet is now loaded with
+	  the default column values when moveToInsertRow() is called
+	  (BUG#688)
 
-    - DatabaseMetaData.getColumns() wasn't returning NULL for
-      default values that are specified as NULL.
+	- DatabaseMetaData.getColumns() wasn't returning NULL for
+	  default values that are specified as NULL.
 
-    - Change default statement type/concurrency to TYPE_FORWARD_ONLY
-      and CONCUR_READ_ONLY (spec compliance).
+	- Change default statement type/concurrency to TYPE_FORWARD_ONLY
+	  and CONCUR_READ_ONLY (spec compliance).
 
-    - Don't try and reset isolation level on reconnect if MySQL doesn't
-      support them.
+	- Don't try and reset isolation level on reconnect if MySQL doesn't
+	  support them.
 
-    - Don't wrap SQLExceptions in RowDataDynamic.
+	- Don't wrap SQLExceptions in RowDataDynamic.
 
-    - Don't change timestamp TZ twice if useTimezone==true (BUG#774)
+	- Don't change timestamp TZ twice if useTimezone==true (BUG#774)
 
-    - Fixed regression in large split-packet handling (BUG#848).
+	- Fixed regression in large split-packet handling (BUG#848).
 
-    - Better diagnostic error messages in exceptions for 'streaming'
-      result sets.
+	- Better diagnostic error messages in exceptions for 'streaming'
+	  result sets.
 
-    - Issue exception on ResultSet.getXXX() on empty result set (wasn't
-      caught in some cases).
+	- Issue exception on ResultSet.getXXX() on empty result set (wasn't
+	  caught in some cases).
 
-    - Don't hide messages from exceptions thrown in I/O layers.
+	- Don't hide messages from exceptions thrown in I/O layers.
 
-    - Don't fire connection closed events when closing pooled connections, or
-      on PooledConnection.getConnection() with already open connections (BUG#884).
+	- Don't fire connection closed events when closing pooled connections, or
+	  on PooledConnection.getConnection() with already open connections (BUG#884).
 
-    - Clip +/- INF (to smallest and largest representative values for the type in
-      MySQL) and NaN (to 0) for setDouble/setFloat(), and issue a warning on the
-      statement when the server does not support +/- INF or NaN.
+	- Clip +/- INF (to smallest and largest representative values for the type in
+	  MySQL) and NaN (to 0) for setDouble/setFloat(), and issue a warning on the
+	  statement when the server does not support +/- INF or NaN.
 
-    - Fix for BUG#879, double-escaping of '\' when charset is SJIS or GBK and '\'
-      appears in non-escaped input.
+	- Fix for BUG#879, double-escaping of '\' when charset is SJIS or GBK and '\'
+	  appears in non-escaped input.
 
-    - When emptying input stream of unused rows for 'streaming' result sets,
-      have the current thread yield() every 100 rows in order to not monopolize
-      CPU time.
+	- When emptying input stream of unused rows for 'streaming' result sets,
+	  have the current thread yield() every 100 rows in order to not monopolize
+	  CPU time.
 
-    - Fixed BUG#1099, DatabaseMetaData.getColumns() getting confused about the
-      keyword 'set' in character columns.
+	- Fixed BUG#1099, DatabaseMetaData.getColumns() getting confused about the
+	  keyword 'set' in character columns.
 
-    - Fixed deadlock issue with Statement.setMaxRows().
+	- Fixed deadlock issue with Statement.setMaxRows().
 
-    - Fixed CLOB.truncate(), BUG#1130
+	- Fixed CLOB.truncate(), BUG#1130
 
-    - Optimized CLOB.setChracterStream(), BUG#1131
+	- Optimized CLOB.setChracterStream(), BUG#1131
 
-    - Made databaseName, portNumber and serverName optional parameters
-      for MysqlDataSourceFactory (BUG#1246)
+	- Made databaseName, portNumber and serverName optional parameters
+	  for MysqlDataSourceFactory (BUG#1246)
 
-    - Fix for BUG#1247 -- ResultSet.get/setString mashing char 127
+	- Fix for BUG#1247 -- ResultSet.get/setString mashing char 127
 
-    - Backported auth. changes for 4.1.1 and newer from 3.1 branch.
+	- Backported auth. changes for 4.1.1 and newer from 3.1 branch.
 
-    - Added com.mysql.jdbc.util.BaseBugReport to help creation of testcases
-      for bug reports.
+	- Added com.mysql.jdbc.util.BaseBugReport to help creation of testcases
+	  for bug reports.
 
-    - Added property to 'clobber' streaming results, by setting the
-      'clobberStreamingResults' property to 'true' (the default is 'false').
-      This will cause a 'streaming' ResultSet to be automatically
-      closed, and any oustanding data still streaming from the server to
-      be discarded if another query is executed before all the data has been
-      read from the server.
+	- Added property to 'clobber' streaming results, by setting the
+	  'clobberStreamingResults' property to 'true' (the default is 'false').
+	  This will cause a 'streaming' ResultSet to be automatically
+	  closed, and any oustanding data still streaming from the server to
+	  be discarded if another query is executed before all the data has been
+	  read from the server.
 
 05-23-03 - Version 3.0.8-stable
 
-    - Allow bogus URLs in Driver.getPropertyInfo().
+	- Allow bogus URLs in Driver.getPropertyInfo().
 
-    - Return list of generated keys when using multi-value INSERTS
-      with Statement.getGeneratedKeys().
+	- Return list of generated keys when using multi-value INSERTS
+	  with Statement.getGeneratedKeys().
 
-    - Use JVM charset with filenames and 'LOAD DATA [LOCAL] INFILE'
+	- Use JVM charset with filenames and 'LOAD DATA [LOCAL] INFILE'
 
-    - Fix infinite loop with Connection.cleanup().
+	- Fix infinite loop with Connection.cleanup().
 
-    - Changed Ant target 'compile-core' to 'compile-driver', and
-      made testsuite compilation a separate target.
+	- Changed Ant target 'compile-core' to 'compile-driver', and
+	  made testsuite compilation a separate target.
 
-    - Fixed result set not getting set for Statement.executeUpdate(),
-      which affected getGeneratedKeys() and getUpdateCount() in
-      some cases.
+	- Fixed result set not getting set for Statement.executeUpdate(),
+	  which affected getGeneratedKeys() and getUpdateCount() in
+	  some cases.
 
-    - Unicode character 0xFFFF in a string would cause the driver to
-      throw an ArrayOutOfBoundsException (Bug #378)
+	- Unicode character 0xFFFF in a string would cause the driver to
+	  throw an ArrayOutOfBoundsException (Bug #378)
 
-    - Return correct amount of generated keys when using 'REPLACE'
-      statements.
+	- Return correct amount of generated keys when using 'REPLACE'
+	  statements.
 
-    - Fix problem detecting server character set in some cases.
+	- Fix problem detecting server character set in some cases.
 
-    - Fix row data decoding error when using _very_ large packets.
+	- Fix row data decoding error when using _very_ large packets.
 
-    - Optimized row data decoding.
+	- Optimized row data decoding.
 
-    - Issue exception when operating on an already-closed
-      prepared statement.
+	- Issue exception when operating on an already-closed
+	  prepared statement.
 
-    - Fixed SJIS encoding bug, thanks to Naoto Sato.
+	- Fixed SJIS encoding bug, thanks to Naoto Sato.
 
     - Optimized usage of EscapeProcessor.
 
@@ -3679,4 +3696,4 @@
         * getTables()
         * getTableTypes()
         * getColumns
-        * getCatalogs()
\ No newline at end of file
+        * getCatalogs()

Modified: trunk/connector-j/src/com/mysql/jdbc/CallableStatement.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/CallableStatement.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/CallableStatement.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -776,7 +776,7 @@
 
 			row[12] = null;
 
-			resultRows.add(row);
+			resultRows.add(new ByteArrayRow(row));
 		}
 
 		java.sql.ResultSet paramTypesRs = DatabaseMetaData.buildResultSet(

Modified: trunk/connector-j/src/com/mysql/jdbc/ConnectionImpl.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/ConnectionImpl.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/ConnectionImpl.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -1038,7 +1038,7 @@
 		this.password = newPassword;
 
 		if (versionMeetsMinimum(4, 1, 0)) {
-			configureClientCharacterSet();
+			configureClientCharacterSet(true);
 		}
 		
 		setupServerForTruncationChecks();
@@ -1584,7 +1584,7 @@
 	 *             server, or the server sends character set information that
 	 *             the client doesn't know about.
 	 */
-	private boolean configureClientCharacterSet() throws SQLException {
+	private boolean configureClientCharacterSet(boolean dontCheckServerMatch) throws SQLException {
 		String realJavaEncoding = getEncoding();
 		boolean characterSetAlreadyConfigured = false;
 
@@ -1667,7 +1667,7 @@
 							// charset names are case-sensitive
 
 							if (!getUseOldUTF8Behavior()) {
-								if (!characterSetNamesMatches("utf8")) {
+								if (dontCheckServerMatch || !characterSetNamesMatches("utf8")) {
 									execSQL(null, "SET NAMES utf8", -1, null,
 											java.sql.ResultSet.TYPE_FORWARD_ONLY,
 											java.sql.ResultSet.CONCUR_READ_ONLY,
@@ -1694,7 +1694,7 @@
 
 							if (mysqlEncodingName != null) {
 								
-								if (!characterSetNamesMatches(mysqlEncodingName)) {
+								if (dontCheckServerMatch || !characterSetNamesMatches(mysqlEncodingName)) {
 									execSQL(null, "SET NAMES " + mysqlEncodingName,
 										-1, null,
 										java.sql.ResultSet.TYPE_FORWARD_ONLY,
@@ -1716,7 +1716,7 @@
 								.getMysqlEncodingForJavaEncoding(getEncoding()
 										.toUpperCase(Locale.ENGLISH), this);
 
-						if (!characterSetNamesMatches(mysqlEncodingName)) {
+						if (dontCheckServerMatch || !characterSetNamesMatches(mysqlEncodingName)) {
 							execSQL(null, "SET NAMES " + mysqlEncodingName, -1,
 								null, java.sql.ResultSet.TYPE_FORWARD_ONLY,
 								java.sql.ResultSet.CONCUR_READ_ONLY, false,
@@ -3364,7 +3364,7 @@
 		
 		boolean overrideDefaultAutocommit = isAutoCommitNonDefaultOnServer();
 	
-		configureClientCharacterSet();
+		configureClientCharacterSet(false);
 
 		if (versionMeetsMinimum(3, 23, 15)) {
 			this.transactionsSupported = true;

Modified: trunk/connector-j/src/com/mysql/jdbc/ConnectionProperties.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/ConnectionProperties.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/ConnectionProperties.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -1,3 +1,26 @@
+/*
+ Copyright (C) 2002-2007 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as 
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL 
+ as it is applied to this software. View the full text of the 
+ exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
+ software distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ */
+
 package com.mysql.jdbc;
 
 import java.sql.SQLException;

Modified: trunk/connector-j/src/com/mysql/jdbc/ConnectionPropertiesImpl.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/ConnectionPropertiesImpl.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/ConnectionPropertiesImpl.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2002-2004 MySQL AB
+ Copyright (C) 2002-2007 MySQL AB
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of version 2 of the GNU General Public License as 

Modified: trunk/connector-j/src/com/mysql/jdbc/Field.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/Field.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/Field.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -954,26 +954,65 @@
 		try {
 			StringBuffer asString = new StringBuffer();
 			asString.append(super.toString());
-
-			asString.append("\n  catalog: ");
+			asString.append("[");
+			asString.append("catalog=");
 			asString.append(this.getDatabaseName());
-			asString.append("\n  table name: ");
+			asString.append(",tableName=");
 			asString.append(this.getTableName());
-			asString.append("\n  original table name: ");
+			asString.append(",originalTableName=");
 			asString.append(this.getOriginalTableName());
-			asString.append("\n  column name: ");
+			asString.append(",columnName=");
 			asString.append(this.getName());
-			asString.append("\n  original column name: ");
+			asString.append(",originalColumnName=");
 			asString.append(this.getOriginalName());
-			asString.append("\n  MySQL data type: ");
+			asString.append(",mysqlType=");
 			asString.append(getMysqlType());
-
-			if (this.buffer != null) {
-				asString.append("\n\nData as received from server:\n\n");
-				asString.append(StringUtils.dumpAsHex(this.buffer,
-						this.buffer.length));
+			asString.append("(");
+			asString.append(MysqlDefs.typeToName(getMysqlType()));
+			asString.append(")");
+			asString.append(",flags=");
+			
+			if (isAutoIncrement()) {
+				asString.append(" AUTO_INCREMENT");
 			}
+			
+			if (isPrimaryKey()) {
+				asString.append(" PRIMARY_KEY");
+			}
+			
+			if (isUniqueKey()) {
+				asString.append(" UNIQUE_KEY");
+			}
+			
+			if (isBinary()) {
+				asString.append(" BINARY");
+			}
+			
+			if (isBlob()) {
+				asString.append(" BLOB");
+			}
+			
+			if (isMultipleKey()) {
+				asString.append(" MULTI_KEY");
+			}
+			
+			if (isUnsigned()) {
+				asString.append(" UNSIGNED");
+			}
+			
+			if (isZeroFill()) {
+				asString.append(" ZEROFILL");
+			}
 
+			
+			//if (this.buffer != null) {
+			//	asString.append("\n\nData as received from server:\n\n");
+			//	asString.append(StringUtils.dumpAsHex(this.buffer,
+			//			this.buffer.length));
+			//}
+
+			asString.append("]");
+			
 			return asString.toString();
 		} catch (Throwable t) {
 			return super.toString();

Modified: trunk/connector-j/src/com/mysql/jdbc/PreparedStatement.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/PreparedStatement.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/PreparedStatement.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -38,6 +38,7 @@
 import java.math.BigInteger;
 import java.net.URL;
 import java.sql.Array;
+import java.sql.BatchUpdateException;
 import java.sql.Clob;
 import java.sql.Date;
 import java.sql.ParameterMetaData;
@@ -57,6 +58,7 @@
 import java.util.TimeZone;
 
 import com.mysql.jdbc.StatementImpl.CancelTask;
+import com.mysql.jdbc.exceptions.MySQLStatementCancelledException;
 import com.mysql.jdbc.exceptions.NotYetImplementedException;
 import com.mysql.jdbc.exceptions.MySQLTimeoutException;
 import com.mysql.jdbc.profiler.ProfilerEvent;
@@ -1046,6 +1048,12 @@
 			if (this.batchedArgs == null || this.batchedArgs.size() == 0) {
                 return new int[0];
             }
+
+			// we timeout the entire batch, not individual statements
+			int batchTimeout = this.timeoutInMillis;
+			this.timeoutInMillis = 0;
+		
+			resetCancelledState();
 			
 			try {
 				clearWarnings();
@@ -1055,18 +1063,18 @@
 					
 					
 					if (canRewriteAsMultivalueInsertStatement()) {
-						return executeBatchedInserts();
+						return executeBatchedInserts(batchTimeout);
 					}
 					
 					if (this.connection.versionMeetsMinimum(4, 1, 0) 
 							&& !this.batchHasPlainStatements
 							&& this.batchedArgs != null 
 							&& this.batchedArgs.size() > 3 /* cost of option setting rt-wise */) {
-						return executePreparedBatchAsMultiStatement();
+						return executePreparedBatchAsMultiStatement(batchTimeout);
 					}
 				}
 
-				return executeBatchSerially();
+				return executeBatchSerially(batchTimeout);
 			} finally {
 				clearBatch();
 			}
@@ -1106,7 +1114,7 @@
 	 * @throws SQLException
 	 */
 	
-	protected int[] executePreparedBatchAsMultiStatement() throws SQLException {
+	protected int[] executePreparedBatchAsMultiStatement(int batchTimeout) throws SQLException {
 		synchronized (this.connection.getMutex()) {
 			// This is kind of an abuse, but it gets the job done
 			if (this.batchedValuesClause == null) {
@@ -1116,6 +1124,7 @@
 			ConnectionImpl locallyScopedConn = this.connection;
 			
 			boolean multiQueriesEnabled = locallyScopedConn.getAllowMultiQueries();
+			CancelTask timeoutTask = null;
 			
 			try {
 				clearWarnings();
@@ -1135,9 +1144,11 @@
 				java.sql.PreparedStatement batchedStatement = null;
 
 				int batchedParamIndex = 1;
-				int updateCountRunningTotal = 0;
 				int numberToExecuteAsMultiValue = 0;
 				int batchCounter = 0;
+				int updateCountCounter = 0;
+				int[] updateCounts = new int[numBatchedArgs];
+				SQLException sqlEx = null;
 				
 				try {
 					if (!multiQueriesEnabled) {
@@ -1153,6 +1164,14 @@
 								.prepareStatement(generateMultiStatementForBatch(numValuesPerBatch));
 					}
 
+					if (locallyScopedConn.getEnableQueryTimeouts() &&
+							batchTimeout != 0
+							&& locallyScopedConn.versionMeetsMinimum(5, 0, 0)) {
+						timeoutTask = new CancelTask((StatementImpl)batchedStatement);
+						ConnectionImpl.getCancelTimer().schedule(timeoutTask,
+								batchTimeout);
+					}
+					
 					if (numBatchedArgs < numValuesPerBatch) {
 						numberToExecuteAsMultiValue = numBatchedArgs;
 					} else {
@@ -1163,9 +1182,17 @@
 			
 					for (int i = 0; i < numberArgsToExecute; i++) {
 						if (i != 0 && i % numValuesPerBatch == 0) {
-							updateCountRunningTotal += batchedStatement.executeUpdate();
-			
-							getBatchedGeneratedKeys(batchedStatement);
+							try {
+								batchedStatement.execute();
+							} catch (SQLException ex) {
+								sqlEx = handleExceptionForBatch(batchCounter, numValuesPerBatch, 
+										updateCounts, ex);
+							}
+							
+							updateCountCounter = processMultiCountsAndKeys(
+									(StatementImpl)batchedStatement, updateCountCounter,
+									updateCounts);
+							
 							batchedStatement.clearParameters();
 							batchedParamIndex = 1;
 						}
@@ -1175,8 +1202,18 @@
 								.get(batchCounter++));
 					}
 			
-					updateCountRunningTotal += batchedStatement.executeUpdate();
-					getBatchedGeneratedKeys(batchedStatement);
+					try {
+						batchedStatement.execute();
+					} catch (SQLException ex) {
+						sqlEx = handleExceptionForBatch(batchCounter - 1, numValuesPerBatch, 
+								updateCounts, ex);
+					}
+					
+					updateCountCounter = processMultiCountsAndKeys(
+							(StatementImpl)batchedStatement, updateCountCounter,
+							updateCounts);
+					
+					batchedStatement.clearParameters();
 			
 					numValuesPerBatch = numBatchedArgs - batchCounter;
 				} finally {
@@ -1197,6 +1234,10 @@
 									generateMultiStatementForBatch(numValuesPerBatch));
 						}
 						
+						if (timeoutTask != null) {
+							timeoutTask.toCancel = (StatementImpl)batchedStatement;
+						}
+						
 						batchedParamIndex = 1;
 			
 						while (batchCounter < numBatchedArgs) {
@@ -1205,16 +1246,35 @@
 									.get(batchCounter++));
 						}
 			
-						updateCountRunningTotal += batchedStatement.executeUpdate();
-						getBatchedGeneratedKeys(batchedStatement);
+						try {
+							batchedStatement.execute();
+						} catch (SQLException ex) {
+							sqlEx = handleExceptionForBatch(batchCounter - 1, numValuesPerBatch, 
+									updateCounts, ex);
+						}
+						
+						updateCountCounter = processMultiCountsAndKeys(
+								(StatementImpl)batchedStatement, updateCountCounter,
+								updateCounts);
+						
+						batchedStatement.clearParameters();
 					}
 			
-					int[] updateCounts = new int[this.batchedArgs.size()];
-			
-					for (int i = 0; i < this.batchedArgs.size(); i++) {
-						updateCounts[i] = 1;
+					if (timeoutTask != null) {
+						if (timeoutTask.caughtWhileCancelling != null) {
+							throw timeoutTask.caughtWhileCancelling;
+						}
+
+						timeoutTask.cancel();
+						timeoutTask = null;
 					}
-			
+					
+					if (sqlEx != null) {
+						throw new java.sql.BatchUpdateException(sqlEx
+								.getMessage(), sqlEx.getSQLState(), sqlEx
+								.getErrorCode(), updateCounts);
+					}
+					
 					return updateCounts;
 				} finally {
 					if (batchedStatement != null) {
@@ -1222,6 +1282,12 @@
 					}
 				}
 			} finally {
+				if (timeoutTask != null) {
+					timeoutTask.cancel();
+				}
+				
+				resetCancelledState();
+				
 				if (!multiQueriesEnabled) {
 					locallyScopedConn.getIO().disableMultiQueries();
 				}
@@ -1254,17 +1320,17 @@
 	 * 
 	 * @throws SQLException
 	 */
-	protected int[] executeBatchedInserts() throws SQLException {
+	protected int[] executeBatchedInserts(int batchTimeout) throws SQLException {
 		String valuesClause = extractValuesClause();
 
 		Connection locallyScopedConn = this.connection;
-		
+
 		if (valuesClause == null) {
-			return executeBatchSerially();
+			return executeBatchSerially(batchTimeout);
 		}
 
 		int numBatchedArgs = this.batchedArgs.size();
-		
+
 		if (this.retrieveGeneratedKeys) {
 			this.batchedGeneratedKeys = new ArrayList(numBatchedArgs);
 		}
@@ -1281,86 +1347,137 @@
 		int updateCountRunningTotal = 0;
 		int numberToExecuteAsMultiValue = 0;
 		int batchCounter = 0;
+		CancelTask timeoutTask = null;
+		SQLException sqlEx = null;
 		
-		try {
-			if (this.retrieveGeneratedKeys) {
-				batchedStatement = locallyScopedConn.prepareStatement(
-						generateBatchedInsertSQL(valuesClause, numValuesPerBatch),
-						RETURN_GENERATED_KEYS);
-			} else {
-				batchedStatement = locallyScopedConn
-						.prepareStatement(generateBatchedInsertSQL(valuesClause,
-								numValuesPerBatch));
-			}
+		int[] updateCounts = new int[numBatchedArgs];
 
-			if (numBatchedArgs < numValuesPerBatch) {
-				numberToExecuteAsMultiValue = numBatchedArgs;
-			} else {
-				numberToExecuteAsMultiValue = numBatchedArgs / numValuesPerBatch;
-			}
-	
-			int numberArgsToExecute = numberToExecuteAsMultiValue * numValuesPerBatch;
-	
-			for (int i = 0; i < numberArgsToExecute; i++) {
-				if (i != 0 && i % numValuesPerBatch == 0) {
-					updateCountRunningTotal += batchedStatement.executeUpdate();
-	
-					getBatchedGeneratedKeys(batchedStatement);
-					batchedStatement.clearParameters();
-					batchedParamIndex = 1;
-	
-				}
-	
-				batchedParamIndex = setOneBatchedParameterSet(batchedStatement,
-						batchedParamIndex, this.batchedArgs
-						.get(batchCounter++));
-			}
-	
-			updateCountRunningTotal += batchedStatement.executeUpdate();
-			getBatchedGeneratedKeys(batchedStatement);
-	
-			numValuesPerBatch = numBatchedArgs - batchCounter;
-		} finally {
-			if (batchedStatement != null) {
-				batchedStatement.close();
-			}
+		for (int i = 0; i < this.batchedArgs.size(); i++) {
+			updateCounts[i] = 1;
 		}
 		
 		try {
-			if (numValuesPerBatch > 0) {
-	
+			try {
 				if (this.retrieveGeneratedKeys) {
 					batchedStatement = locallyScopedConn.prepareStatement(
-						generateBatchedInsertSQL(valuesClause, numValuesPerBatch),
-						RETURN_GENERATED_KEYS);
+							generateBatchedInsertSQL(valuesClause,
+									numValuesPerBatch), RETURN_GENERATED_KEYS);
 				} else {
-					batchedStatement = locallyScopedConn.prepareStatement(
-							generateBatchedInsertSQL(valuesClause, numValuesPerBatch));
+					batchedStatement = locallyScopedConn
+							.prepareStatement(generateBatchedInsertSQL(
+									valuesClause, numValuesPerBatch));
 				}
+
+				if (this.connection.getEnableQueryTimeouts()
+						&& batchTimeout != 0
+						&& this.connection.versionMeetsMinimum(5, 0, 0)) {
+					timeoutTask = new CancelTask(
+							(StatementImpl) batchedStatement);
+					ConnectionImpl.getCancelTimer().schedule(timeoutTask,
+							batchTimeout);
+				}
+
+				if (numBatchedArgs < numValuesPerBatch) {
+					numberToExecuteAsMultiValue = numBatchedArgs;
+				} else {
+					numberToExecuteAsMultiValue = numBatchedArgs
+							/ numValuesPerBatch;
+				}
+
+				int numberArgsToExecute = numberToExecuteAsMultiValue
+						* numValuesPerBatch;
+
+				for (int i = 0; i < numberArgsToExecute; i++) {
+					if (i != 0 && i % numValuesPerBatch == 0) {
+						try {
+							updateCountRunningTotal += batchedStatement
+								.executeUpdate();
+						} catch (SQLException ex) {
+							sqlEx = handleExceptionForBatch(batchCounter - 1,
+									numValuesPerBatch, updateCounts, ex);
+						}
+
+						getBatchedGeneratedKeys(batchedStatement);
+						batchedStatement.clearParameters();
+						batchedParamIndex = 1;
+
+					}
+
+					batchedParamIndex = setOneBatchedParameterSet(
+							batchedStatement, batchedParamIndex,
+							this.batchedArgs.get(batchCounter++));
+				}
+
+				try {
+					updateCountRunningTotal += batchedStatement.executeUpdate();
+				} catch (SQLException ex) {
+					sqlEx = handleExceptionForBatch(batchCounter - 1,
+							numValuesPerBatch, updateCounts, ex);
+				}
 				
-				batchedParamIndex = 1;
-	
-				while (batchCounter < numBatchedArgs) {
-					batchedParamIndex = setOneBatchedParameterSet(batchedStatement,
-							batchedParamIndex, this.batchedArgs
-							.get(batchCounter++));
+				getBatchedGeneratedKeys(batchedStatement);
+
+				numValuesPerBatch = numBatchedArgs - batchCounter;
+			} finally {
+				if (batchedStatement != null) {
+					batchedStatement.close();
 				}
-	
-				updateCountRunningTotal += batchedStatement.executeUpdate();
-				getBatchedGeneratedKeys(batchedStatement);
 			}
-	
-			int[] updateCounts = new int[this.batchedArgs.size()];
-	
-			for (int i = 0; i < this.batchedArgs.size(); i++) {
-				updateCounts[i] = 1;
+
+			try {
+				if (numValuesPerBatch > 0) {
+
+					if (this.retrieveGeneratedKeys) {
+						batchedStatement = locallyScopedConn.prepareStatement(
+								generateBatchedInsertSQL(valuesClause,
+										numValuesPerBatch),
+								RETURN_GENERATED_KEYS);
+					} else {
+						batchedStatement = locallyScopedConn
+								.prepareStatement(generateBatchedInsertSQL(
+										valuesClause, numValuesPerBatch));
+					}
+
+					if (timeoutTask != null) {
+						timeoutTask.toCancel = (StatementImpl) batchedStatement;
+					}
+
+					batchedParamIndex = 1;
+
+					while (batchCounter < numBatchedArgs) {
+						batchedParamIndex = setOneBatchedParameterSet(
+								batchedStatement, batchedParamIndex,
+								this.batchedArgs.get(batchCounter++));
+					}
+
+					try {
+						updateCountRunningTotal += batchedStatement.executeUpdate();
+					} catch (SQLException ex) {
+						sqlEx = handleExceptionForBatch(batchCounter - 1,
+								numValuesPerBatch, updateCounts, ex);
+					}
+					
+					getBatchedGeneratedKeys(batchedStatement);
+				}
+
+				if (sqlEx != null) {
+					throw new java.sql.BatchUpdateException(sqlEx
+							.getMessage(), sqlEx.getSQLState(), sqlEx
+							.getErrorCode(), updateCounts);
+				}
+				
+				return updateCounts;
+			} finally {
+				if (batchedStatement != null) {
+					batchedStatement.close();
+				}
 			}
-	
-			return updateCounts;
 		} finally {
-			if (batchedStatement != null) {
-				batchedStatement.close();
+			if (timeoutTask != null) {
+				timeoutTask.cancel();
 			}
+
+			resetCancelledState();
 		}
 	}
 
@@ -1385,7 +1502,7 @@
 		
 		return (int)Math.max(1, (maxAllowedPacket - this.originalSql.length()) / maxSizeOfParameterSet);
 	}
-
+	
 	/** 
 	 *  Computes the maximum parameter set size, and entire batch size given 
 	 *  the number of arguments in the batch.
@@ -1453,7 +1570,7 @@
 	 * @throws SQLException
 	 *             if an error occurs
 	 */
-	protected int[] executeBatchSerially() throws SQLException {
+	protected int[] executeBatchSerially(int batchTimeout) throws SQLException {
 		
 		Connection locallyScopedConn = this.connection;
 		
@@ -1475,65 +1592,86 @@
 
 			int commandIndex = 0;
 
-			if (this.retrieveGeneratedKeys) {
-				this.batchedGeneratedKeys = new ArrayList(nbrCommands);
-			}
-
-			for (commandIndex = 0; commandIndex < nbrCommands; commandIndex++) {
-				Object arg = this.batchedArgs.get(commandIndex);
-
-				if (arg instanceof String) {
-					updateCounts[commandIndex] = executeUpdate((String) arg);
-				} else {
-					BatchParams paramArg = (BatchParams) arg;
-
-					try {
-						updateCounts[commandIndex] = executeUpdate(
-								paramArg.parameterStrings,
-								paramArg.parameterStreams, paramArg.isStream,
-								paramArg.streamLengths, paramArg.isNull, true);
-
-						if (this.retrieveGeneratedKeys) {
-							java.sql.ResultSet rs = null;
-
-							try {
-								rs = getGeneratedKeysInternal();
-
-								while (rs.next()) {
-									this.batchedGeneratedKeys
-											.add(new ByteArrayRow(new byte[][] { rs.getBytes(1) }));
+			CancelTask timeoutTask = null;
+			
+			try {
+				if (this.connection.getEnableQueryTimeouts() &&
+						batchTimeout != 0
+						&& this.connection.versionMeetsMinimum(5, 0, 0)) {
+					timeoutTask = new CancelTask(this);
+					ConnectionImpl.getCancelTimer().schedule(timeoutTask,
+							batchTimeout);
+				}
+				
+				if (this.retrieveGeneratedKeys) {
+					this.batchedGeneratedKeys = new ArrayList(nbrCommands);
+				}
+	
+				for (commandIndex = 0; commandIndex < nbrCommands; commandIndex++) {
+					Object arg = this.batchedArgs.get(commandIndex);
+	
+					if (arg instanceof String) {
+						updateCounts[commandIndex] = executeUpdate((String) arg);
+					} else {
+						BatchParams paramArg = (BatchParams) arg;
+	
+						try {
+							updateCounts[commandIndex] = executeUpdate(
+									paramArg.parameterStrings,
+									paramArg.parameterStreams, paramArg.isStream,
+									paramArg.streamLengths, paramArg.isNull, true);
+	
+							if (this.retrieveGeneratedKeys) {
+								java.sql.ResultSet rs = null;
+	
+								try {
+									rs = getGeneratedKeysInternal();
+	
+									while (rs.next()) {
+										this.batchedGeneratedKeys
+												.add(new ByteArrayRow(new byte[][] { rs.getBytes(1) }));
+									}
+								} finally {
+									if (rs != null) {
+										rs.close();
+									}
 								}
-							} finally {
-								if (rs != null) {
-									rs.close();
-								}
 							}
+						} catch (SQLException ex) {
+							updateCounts[commandIndex] = EXECUTE_FAILED;
+	
+							if (this.continueBatchOnError && 
+									!(ex instanceof MySQLTimeoutException) && 
+									!(ex instanceof MySQLStatementCancelledException)) {
+								sqlEx = ex;
+							} else {
+								int[] newUpdateCounts = new int[commandIndex];
+								System.arraycopy(updateCounts, 0,
+										newUpdateCounts, 0, commandIndex);
+	
+								throw new java.sql.BatchUpdateException(ex
+										.getMessage(), ex.getSQLState(), ex
+										.getErrorCode(), newUpdateCounts);
+							}
 						}
-					} catch (SQLException ex) {
-						updateCounts[commandIndex] = EXECUTE_FAILED;
-
-						if (this.continueBatchOnError) {
-							sqlEx = ex;
-						} else {
-							int[] newUpdateCounts = new int[commandIndex];
-							System.arraycopy(updateCounts, 0, newUpdateCounts,
-									0, commandIndex);
-
-							throw new java.sql.BatchUpdateException(ex
-									.getMessage(), ex.getSQLState(), ex
-									.getErrorCode(), newUpdateCounts);
-						}
 					}
 				}
+	
+				if (sqlEx != null) {
+					throw new java.sql.BatchUpdateException(sqlEx.getMessage(),
+							sqlEx.getSQLState(), sqlEx.getErrorCode(), updateCounts);
+				}
+			} finally {
+				if (timeoutTask != null) {
+					timeoutTask.cancel();
+				}
+				
+				resetCancelledState();
 			}
-
-			if (sqlEx != null) {
-				throw new java.sql.BatchUpdateException(sqlEx.getMessage(),
-						sqlEx.getSQLState(), sqlEx.getErrorCode(), updateCounts);
-			}
 		}
-
+	
 		return (updateCounts != null) ? updateCounts : new int[0];
+		
 	}
 
 	/**
@@ -1563,9 +1701,7 @@
 			throws SQLException {
 		try {
 			
-			synchronized (this.cancelTimeoutMutex) {
-				this.wasCancelled = false;
-			}
+			resetCancelledState();
 			
 			ConnectionImpl locallyScopedConnection = this.connection;
 			
@@ -1579,7 +1715,7 @@
 				if (locallyScopedConnection.getEnableQueryTimeouts() &&
 						this.timeoutInMillis != 0
 						&& locallyScopedConnection.versionMeetsMinimum(5, 0, 0)) {
-					timeoutTask = new CancelTask();
+					timeoutTask = new CancelTask(this);
 					ConnectionImpl.getCancelTimer().schedule(timeoutTask, 
 							this.timeoutInMillis);
 				}
@@ -1601,8 +1737,17 @@
 			
 				synchronized (this.cancelTimeoutMutex) {
 					if (this.wasCancelled) {
-						this.wasCancelled = false;
-						throw new MySQLTimeoutException();
+						SQLException cause = null;
+						
+						if (this.wasCancelledByTimeout) {
+							cause = new MySQLTimeoutException();
+						} else {
+							cause = new MySQLStatementCancelledException();
+						}
+						
+						resetCancelledState();
+						
+						throw cause;
 					}
 				}
 			} finally {

Modified: trunk/connector-j/src/com/mysql/jdbc/ServerPreparedStatement.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/ServerPreparedStatement.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/ServerPreparedStatement.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -24,6 +24,7 @@
  */
 package com.mysql.jdbc;
 
+import com.mysql.jdbc.exceptions.MySQLStatementCancelledException;
 import com.mysql.jdbc.exceptions.MySQLTimeoutException;
 import com.mysql.jdbc.profiler.ProfileEventSink;
 import com.mysql.jdbc.profiler.ProfilerEvent;
@@ -1227,9 +1228,7 @@
 				begin = mysql.getCurrentTimeNanosOrMillis();
 			}
 
-			synchronized (this.cancelTimeoutMutex) {
-				this.wasCancelled = false;
-			}
+			resetCancelledState();
 			
 			CancelTask timeoutTask = null;
 
@@ -1237,7 +1236,7 @@
 				if (this.connection.getEnableQueryTimeouts() &&
 						this.timeoutInMillis != 0
 						&& this.connection.versionMeetsMinimum(5, 0, 0)) {
-					timeoutTask = new CancelTask();
+					timeoutTask = new CancelTask(this);
 					this.connection.getCancelTimer().schedule(timeoutTask, 
 							this.timeoutInMillis);
 				}
@@ -1263,8 +1262,17 @@
 				
 				synchronized (this.cancelTimeoutMutex) {
 					if (this.wasCancelled) {
-						this.wasCancelled = false;
-						throw new MySQLTimeoutException();
+						SQLException cause = null;
+						
+						if (this.wasCancelledByTimeout) {
+							cause = new MySQLTimeoutException();
+						} else {
+							cause = new MySQLStatementCancelledException();
+						}
+						
+						resetCancelledState();
+						
+						throw cause;
 					}
 				}
 

Modified: trunk/connector-j/src/com/mysql/jdbc/StatementImpl.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/StatementImpl.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/StatementImpl.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -24,6 +24,7 @@
  */
 package com.mysql.jdbc;
 
+import com.mysql.jdbc.exceptions.MySQLStatementCancelledException;
 import com.mysql.jdbc.exceptions.NotYetImplementedException;
 import com.mysql.jdbc.exceptions.MySQLTimeoutException;
 import com.mysql.jdbc.profiler.ProfileEventSink;
@@ -31,6 +32,7 @@
 import com.mysql.jdbc.util.LRUCache;
 
 import java.io.InputStream;
+import java.sql.BatchUpdateException;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.SQLWarning;
@@ -73,9 +75,11 @@
 
 		long connectionId = 0;
 		SQLException caughtWhileCancelling = null;
-
-		CancelTask() throws SQLException {
+		StatementImpl toCancel;
+		
+		CancelTask(StatementImpl cancellee) throws SQLException {
 			connectionId = connection.getIO().getThreadId();
+			toCancel = cancellee;
 		}
 
 		public void run() {
@@ -91,7 +95,8 @@
 							cancelConn = connection.duplicate();
 							cancelStmt = cancelConn.createStatement();
 							cancelStmt.execute("KILL QUERY " + connectionId);
-							wasCancelled = true;
+							toCancel.wasCancelled = true;
+							toCancel.wasCancelledByTimeout = true;
 						}
 					} catch (SQLException sqlEx) {
 						caughtWhileCancelling = sqlEx;
@@ -141,6 +146,7 @@
 	public final static byte USES_VARIABLES_UNKNOWN = -1;
 
 	protected boolean wasCancelled = false;
+	protected boolean wasCancelledByTimeout = false;
 
 	/** Holds batched commands */
 	protected List batchedArgs;
@@ -579,9 +585,7 @@
 		ConnectionImpl locallyScopedConn = this.connection;
 
 		synchronized (locallyScopedConn.getMutex()) {
-			synchronized (this.cancelTimeoutMutex) {
-				this.wasCancelled = false;
-			}
+			resetCancelledState();
 
 			checkNullOrEmptyQuery(sql);
 
@@ -659,7 +663,7 @@
 					if (locallyScopedConn.getEnableQueryTimeouts() &&
 							this.timeoutInMillis != 0
 							&& locallyScopedConn.versionMeetsMinimum(5, 0, 0)) {
-						timeoutTask = new CancelTask();
+						timeoutTask = new CancelTask(this);
 						ConnectionImpl.getCancelTimer().schedule(timeoutTask,
 								this.timeoutInMillis);
 					}
@@ -733,8 +737,17 @@
 
 					synchronized (this.cancelTimeoutMutex) {
 						if (this.wasCancelled) {
-							this.wasCancelled = false;
-							throw new MySQLTimeoutException();
+							SQLException cause = null;
+							
+							if (this.wasCancelledByTimeout) {
+								cause = new MySQLTimeoutException();
+							} else {
+								cause = new MySQLStatementCancelledException();
+							}
+							
+							resetCancelledState();
+							
+							throw cause;
 						}
 					}
 				} finally {
@@ -772,6 +785,17 @@
 		}
 	}
 
+	protected synchronized void resetCancelledState() {
+		if (this.cancelTimeoutMutex == null) {
+			return;
+		}
+		
+		synchronized (this.cancelTimeoutMutex) {
+			this.wasCancelled = false;
+			this.wasCancelledByTimeout = false;
+		}
+	}
+
 	/**
 	 * @see StatementImpl#execute(String, int)
 	 */
@@ -898,11 +922,20 @@
                 return new int[0];
             }
 			
+			// we timeout the entire batch, not individual statements
+			int individualStatementTimeout = this.timeoutInMillis;
+			this.timeoutInMillis = 0;
+			
+			CancelTask timeoutTask = null;
+			
 			try {
+				resetCancelledState();
+
 				this.retrieveGeneratedKeys = true;
 
 				int[] updateCounts = null;
 
+				
 				if (this.batchedArgs != null) {
 					int nbrCommands = this.batchedArgs.size();
 
@@ -914,9 +947,17 @@
 							(multiQueriesEnabled ||
 							(locallyScopedConn.getRewriteBatchedStatements() &&
 									nbrCommands > 4))) {
-						return executeBatchUsingMultiQueries(multiQueriesEnabled, nbrCommands);
+						return executeBatchUsingMultiQueries(multiQueriesEnabled, nbrCommands, individualStatementTimeout);
 					}
 
+					if (locallyScopedConn.getEnableQueryTimeouts() &&
+							individualStatementTimeout != 0
+							&& locallyScopedConn.versionMeetsMinimum(5, 0, 0)) {
+						timeoutTask = new CancelTask(this);
+						ConnectionImpl.getCancelTimer().schedule(timeoutTask,
+								individualStatementTimeout);
+					}
+					
 					updateCounts = new int[nbrCommands];
 
 					for (int i = 0; i < nbrCommands; i++) {
@@ -935,7 +976,9 @@
 						} catch (SQLException ex) {
 							updateCounts[commandIndex] = EXECUTE_FAILED;
 
-							if (this.continueBatchOnError) {
+							if (this.continueBatchOnError && 
+									!(ex instanceof MySQLTimeoutException) && 
+									!(ex instanceof MySQLStatementCancelledException)) {
 								sqlEx = ex;
 							} else {
 								int[] newUpdateCounts = new int[commandIndex];
@@ -956,8 +999,25 @@
 					}
 				}
 
+				if (timeoutTask != null) {
+					if (timeoutTask.caughtWhileCancelling != null) {
+						throw timeoutTask.caughtWhileCancelling;
+					}
+
+					timeoutTask.cancel();
+					timeoutTask = null;
+				}
+				
 				return (updateCounts != null) ? updateCounts : new int[0];
 			} finally {
+				
+				if (timeoutTask != null) {
+					timeoutTask.cancel();
+				}
+				
+				resetCancelledState();
+				
+				this.timeoutInMillis = individualStatementTimeout;
 				this.retrieveGeneratedKeys = false;
 
 				clearBatch();
@@ -974,7 +1034,7 @@
 	 * @throws SQLException
 	 */
 	private int[] executeBatchUsingMultiQueries(boolean multiQueriesEnabled,
-			int nbrCommands) throws SQLException {
+			int nbrCommands, int individualStatementTimeout) throws SQLException {
 
 		ConnectionImpl locallyScopedConn = this.connection;
 
@@ -984,6 +1044,8 @@
 
 		java.sql.Statement batchStmt = null;
 
+		CancelTask timeoutTask = null;
+		
 		try {
 			int[] updateCounts = new int[nbrCommands];
 
@@ -997,6 +1059,14 @@
 
 			batchStmt = locallyScopedConn.createStatement();
 
+			if (locallyScopedConn.getEnableQueryTimeouts() &&
+					individualStatementTimeout != 0
+					&& locallyScopedConn.versionMeetsMinimum(5, 0, 0)) {
+				timeoutTask = new CancelTask((StatementImpl)batchStmt);
+				ConnectionImpl.getCancelTimer().schedule(timeoutTask,
+						individualStatementTimeout);
+			}
+			
 			int counter = 0;
 
 			int numberOfBytesPerChar = 1;
@@ -1017,6 +1087,10 @@
 				                     escape processing */
 			}
 
+			SQLException sqlEx = null;
+			
+			int argumentSetsInBatchSoFar = 0;
+			
 			for (commandIndex = 0; commandIndex < nbrCommands; commandIndex++) {
 				String nextQuery = (String) this.batchedArgs.get(commandIndex);
 
@@ -1024,50 +1098,60 @@
 						* numberOfBytesPerChar) + 1 /* for semicolon */
 						+ MysqlIO.HEADER_LENGTH) * escapeAdjust)  + 32 > this.connection
 						.getMaxAllowedPacket()) {
-					batchStmt.execute(queryBuf.toString());
+					try {
+						batchStmt.execute(queryBuf.toString());
+					} catch (SQLException ex) {
+						sqlEx = handleExceptionForBatch(commandIndex,
+								argumentSetsInBatchSoFar, updateCounts, ex);
+					}
 
-					updateCounts[counter++] = batchStmt.getUpdateCount();
-					long generatedKeyStart = ((com.mysql.jdbc.StatementImpl)batchStmt).getLastInsertID();
-					byte[][] row = new byte[1][];
-					row[0] = Long.toString(generatedKeyStart++).getBytes();
-					this.batchedGeneratedKeys.add(row);
+					counter = processMultiCountsAndKeys((StatementImpl)batchStmt, counter, 
+							updateCounts);
 
-					while (batchStmt.getMoreResults()
-							|| batchStmt.getUpdateCount() != -1) {
-						updateCounts[counter++] = batchStmt.getUpdateCount();
-						row = new byte[1][];
-						row[0] = Long.toString(generatedKeyStart++).getBytes();
-						this.batchedGeneratedKeys.add(row);
-					}
-
 					queryBuf = new StringBuffer();
+					argumentSetsInBatchSoFar = 0;
 				}
 
 				queryBuf.append(nextQuery);
 				queryBuf.append(";");
+				argumentSetsInBatchSoFar++;
 			}
 
 			if (queryBuf.length() > 0) {
-				batchStmt.execute(queryBuf.toString());
+				try {
+					batchStmt.execute(queryBuf.toString());
+				} catch (SQLException ex) {
+					sqlEx = handleExceptionForBatch(commandIndex - 1,
+							argumentSetsInBatchSoFar, updateCounts, ex);
+				}
 
-				long generatedKeyStart = ((com.mysql.jdbc.StatementImpl)batchStmt).getLastInsertID();
-				byte[][] row = new byte[1][];
-				row[0] = Long.toString(generatedKeyStart++).getBytes();
-				this.batchedGeneratedKeys.add(row);
+				counter = processMultiCountsAndKeys((StatementImpl)batchStmt, counter, 
+						updateCounts);
+			}
 
-				updateCounts[counter++] = batchStmt.getUpdateCount();
+			if (timeoutTask != null) {
+				if (timeoutTask.caughtWhileCancelling != null) {
+					throw timeoutTask.caughtWhileCancelling;
+				}
 
-				while (batchStmt.getMoreResults()
-						|| batchStmt.getUpdateCount() != -1) {
-					updateCounts[counter++] = batchStmt.getUpdateCount();
-					row = new byte[1][];
-					row[0] = Long.toString(generatedKeyStart++).getBytes();
-					this.batchedGeneratedKeys.add(row);
-				}
+				timeoutTask.cancel();
+				timeoutTask = null;
 			}
-
+			
+			if (sqlEx != null) {
+				throw new java.sql.BatchUpdateException(sqlEx
+						.getMessage(), sqlEx.getSQLState(), sqlEx
+						.getErrorCode(), updateCounts);
+			}
+			
 			return (updateCounts != null) ? updateCounts : new int[0];
 		} finally {
+			if (timeoutTask != null) {
+				timeoutTask.cancel();
+			}
+			
+			resetCancelledState();
+			
 			try {
 				if (batchStmt != null) {
 					batchStmt.close();
@@ -1079,7 +1163,65 @@
 			}
 		}
 	}
+	
+	protected int processMultiCountsAndKeys(
+			StatementImpl batchedStatement,
+			int updateCountCounter, int[] updateCounts) throws SQLException {
+		updateCounts[updateCountCounter++] = batchedStatement.getUpdateCount();
+		
+		boolean doGenKeys = this.batchedGeneratedKeys != null;
+		
+		long generatedKeyStart = 0;
+		byte[][] row = null;
+		
+		if (doGenKeys) {
+			generatedKeyStart = batchedStatement.getLastInsertID();
+		
+			row = new byte[1][];
+			row[0] = Long.toString(generatedKeyStart++).getBytes();
+			this.batchedGeneratedKeys.add(new ByteArrayRow(row));
+		}
 
+		while (batchedStatement.getMoreResults()
+				|| batchedStatement.getUpdateCount() != -1) {
+			updateCounts[updateCountCounter++] = batchedStatement.getUpdateCount();
+			
+			if (doGenKeys) {
+				row = new byte[1][];
+				row[0] = Long.toString(generatedKeyStart++).getBytes();
+				this.batchedGeneratedKeys.add(new ByteArrayRow(row));
+			}
+		}
+		
+		return updateCountCounter;
+	}
+	
+	protected SQLException handleExceptionForBatch(int endOfBatchIndex,
+			int numValuesPerBatch, int[] updateCounts, SQLException ex)
+			throws BatchUpdateException {
+		SQLException sqlEx;
+	
+		for (int j = endOfBatchIndex; j > endOfBatchIndex - numValuesPerBatch; j--) {
+			updateCounts[j] = EXECUTE_FAILED;
+		}
+
+		if (this.continueBatchOnError && 
+				!(ex instanceof MySQLTimeoutException) && 
+				!(ex instanceof MySQLStatementCancelledException)) {
+			sqlEx = ex;
+		} else {
+			int[] newUpdateCounts = new int[endOfBatchIndex];
+			System.arraycopy(updateCounts, 0,
+					newUpdateCounts, 0, endOfBatchIndex);
+
+			throw new java.sql.BatchUpdateException(ex
+					.getMessage(), ex.getSQLState(), ex
+					.getErrorCode(), newUpdateCounts);
+		}
+		
+		return sqlEx;
+	}
+	
 	/**
 	 * Execute a SQL statement that retruns a single ResultSet
 	 *
@@ -1098,9 +1240,7 @@
 		ConnectionImpl locallyScopedConn = this.connection;
 
 		synchronized (locallyScopedConn.getMutex()) {
-			synchronized (this.cancelTimeoutMutex) {
-				this.wasCancelled = false;
-			}
+			resetCancelledState();
 
 			checkNullOrEmptyQuery(sql);
 
@@ -1165,7 +1305,7 @@
 				if (locallyScopedConn.getEnableQueryTimeouts() &&
 						this.timeoutInMillis != 0
 						&& locallyScopedConn.versionMeetsMinimum(5, 0, 0)) {
-					timeoutTask = new CancelTask();
+					timeoutTask = new CancelTask(this);
 					ConnectionImpl.getCancelTimer().schedule(timeoutTask,
 							this.timeoutInMillis);
 				}
@@ -1237,8 +1377,17 @@
 
 				synchronized (this.cancelTimeoutMutex) {
 					if (this.wasCancelled) {
-						this.wasCancelled = false;
-						throw new MySQLTimeoutException();
+						SQLException cause = null;
+						
+						if (this.wasCancelledByTimeout) {
+							cause = new MySQLTimeoutException();
+						} else {
+							cause = new MySQLStatementCancelledException();
+						}
+						
+						resetCancelledState();
+						
+						throw cause;
 					}
 				}
 			} finally {
@@ -1306,9 +1455,7 @@
 		ResultSetInternalMethods rs = null;
 
 		synchronized (locallyScopedConn.getMutex()) {
-			synchronized (this.cancelTimeoutMutex) {
-				this.wasCancelled = false;
-			}
+			resetCancelledState();
 
 			checkNullOrEmptyQuery(sql);
 
@@ -1354,7 +1501,7 @@
 				if (locallyScopedConn.getEnableQueryTimeouts() &&
 						this.timeoutInMillis != 0
 						&& locallyScopedConn.versionMeetsMinimum(5, 0, 0)) {
-					timeoutTask = new CancelTask();
+					timeoutTask = new CancelTask(this);
 					ConnectionImpl.getCancelTimer().schedule(timeoutTask,
 							this.timeoutInMillis);
 				}
@@ -1390,8 +1537,17 @@
 
 				synchronized (this.cancelTimeoutMutex) {
 					if (this.wasCancelled) {
-						this.wasCancelled = false;
-						throw new MySQLTimeoutException();
+						SQLException cause = null;
+						
+						if (this.wasCancelledByTimeout) {
+							cause = new MySQLTimeoutException();
+						} else {
+							cause = new MySQLStatementCancelledException();
+						}
+						
+						resetCancelledState();
+						
+						throw cause;
 					}
 				}
 			} finally {
@@ -2266,7 +2422,7 @@
 
 				while (rs.next()) {
 					this.batchedGeneratedKeys
-							.add(new byte[][] { rs.getBytes(1) });
+							.add(new ByteArrayRow(new byte[][] { rs.getBytes(1) }));
 				}
 			} finally {
 				if (rs != null) {
@@ -2285,7 +2441,7 @@
 
 				while (rs.next()) {
 					this.batchedGeneratedKeys
-							.add(new byte[][] { rs.getBytes(1) });
+							.add(new ByteArrayRow(new byte[][] { rs.getBytes(1) }));
 				}
 			} finally {
 				if (rs != null) {

Modified: trunk/connector-j/src/com/mysql/jdbc/UpdatableResultSet.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/UpdatableResultSet.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/com/mysql/jdbc/UpdatableResultSet.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -513,7 +513,8 @@
 
 	private synchronized void extractDefaultValues() throws SQLException {
 		java.sql.DatabaseMetaData dbmd = this.connection.getMetaData();
-
+		this.defaultColumnValue = new byte[this.fields.length][];
+		
 		java.sql.ResultSet columnsResultSet = null;
 		Iterator referencedDbs = this.databasesUsedToTablesUsed.entrySet().iterator();
 

Copied: trunk/connector-j/src/com/mysql/jdbc/exceptions/MySQLStatementCancelledException.java (from rev 6566, branches/branch_5_1/connector-j/src/com/mysql/jdbc/exceptions/MySQLStatementCancelledException.java)

Modified: trunk/connector-j/src/testsuite/regression/CallableStatementRegressionTest.java
===================================================================
--- trunk/connector-j/src/testsuite/regression/CallableStatementRegressionTest.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/testsuite/regression/CallableStatementRegressionTest.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -852,9 +852,7 @@
 				assertEquals(100, rs.getInt(2));
 			}
 
-			assertEquals(this.pstmt.getClass().getName(),
-					com.mysql.jdbc.PreparedStatement.class.getName());
-
+			assertTrue(this.pstmt.getClass().getName().indexOf("Server") == -1);
 		} finally {
 			closeMemberJDBCResources();
 		}

Modified: trunk/connector-j/src/testsuite/regression/MetaDataRegressionTest.java
===================================================================
--- trunk/connector-j/src/testsuite/regression/MetaDataRegressionTest.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/testsuite/regression/MetaDataRegressionTest.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -1952,6 +1952,7 @@
 
 		this.conn.prepareCall("{call testBug25624(?,?)}").close();
 	}
+<<<<<<< .working
 	
 	/**
 	 * Tests fix for BUG#27867 - Schema objects with identifiers other than

Modified: trunk/connector-j/src/testsuite/regression/ResultSetRegressionTest.java
===================================================================
--- trunk/connector-j/src/testsuite/regression/ResultSetRegressionTest.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/testsuite/regression/ResultSetRegressionTest.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -2154,8 +2154,14 @@
 
 					assertEquals("java.lang.Integer", storedProc.getObject(1)
 							.getClass().getName());
-					assertEquals("java.lang.Integer", storedProc.getObject(2)
+					
+					if (versionMeetsMinimum(5, 1)) {
+						assertEquals("java.lang.Long", storedProc.getObject(2)
+								.getClass().getName());
+					} else {
+						assertEquals("java.lang.Integer", storedProc.getObject(2)
 							.getClass().getName());
+					}
 
 				} finally {
 					if (storedProc != null) {
@@ -4397,6 +4403,7 @@
         this.rs.next();
         assertEquals("java.lang.String", this.rs.getObject(1).getClass().getName());
 	}
+<<<<<<< .working
 	
 	/**
 	 * Tests fix for BUG#30664. Note that this fix only works
@@ -4467,3 +4474,4 @@
 		}        
 	}
 }
+>>>>>>> .merge-right.r6543

Modified: trunk/connector-j/src/testsuite/simple/CallableStatementTest.java
===================================================================
--- trunk/connector-j/src/testsuite/simple/CallableStatementTest.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/testsuite/simple/CallableStatementTest.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -422,7 +422,7 @@
 						.executeUpdate("CREATE PROCEDURE testSpParse(IN FOO VARCHAR(15))\n"
 								+ "BEGIN\n" + "SELECT 1;\n" + "end\n");
 
-				int numIterations = 10000;
+				int numIterations = 10;
 
 				long startTime = System.currentTimeMillis();
 

Modified: trunk/connector-j/src/testsuite/simple/DataSourceTest.java
===================================================================
--- trunk/connector-j/src/testsuite/simple/DataSourceTest.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/testsuite/simple/DataSourceTest.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -182,7 +182,7 @@
 			assertEquals(toCheck, this.rs.getString(1));
 
 			this.rs = connToMySQL.createStatement().executeQuery(
-					"SHOW VARIABLES LIKE 'character_set_client'");
+					"SHOW SESSION VARIABLES LIKE 'character_set_client'");
 			assertTrue(this.rs.next());
 			assertEquals("utf8", this.rs.getString(2));
 
@@ -195,7 +195,7 @@
 			assertEquals(toCheck, this.rs.getString(1));
 
 			this.rs = connToMySQL.createStatement().executeQuery(
-					"SHOW VARIABLES LIKE 'character_set_client'");
+					"SHOW SESSION VARIABLES LIKE 'character_set_client'");
 			assertTrue(this.rs.next());
 			assertEquals("utf8", this.rs.getString(2));
 

Modified: trunk/connector-j/src/testsuite/simple/StatementsTest.java
===================================================================
--- trunk/connector-j/src/testsuite/simple/StatementsTest.java	2007-09-06 14:14:17 UTC (rev 6566)
+++ trunk/connector-j/src/testsuite/simple/StatementsTest.java	2007-09-06 15:12:14 UTC (rev 6567)
@@ -32,6 +32,7 @@
 import java.io.StringReader;
 import java.math.BigDecimal;
 import java.rmi.server.UID;
+import java.sql.BatchUpdateException;
 import java.sql.CallableStatement;
 import java.sql.Connection;
 import java.sql.Date;
@@ -1557,7 +1558,93 @@
 			}
 		}
 	}
+	
+	public void testBatchRewriteErrors() throws Exception {
+		createTable("rewriteErrors", "(field1 int not null primary key)");
 
+		Properties props = new Properties();
+		Connection multiConn = null;
+
+		for (int j = 0; j < 2; j++) {
+			props.setProperty("useServerPrepStmts", "false");
+	
+			if (j == 1) {
+				props.setProperty("continueBatchOnError", "false");
+			}
+			
+			props.setProperty("sessionVariables", "max_allowed_packet=1024");
+			props.setProperty("rewriteBatchedStatements", "true");
+			multiConn = getConnectionWithProps(props);
+			this.pstmt = multiConn.prepareStatement("INSERT INTO rewriteErrors VALUES (?)");
+			Statement multiStmt = multiConn.createStatement();
+			
+			for (int i = 0; i < 4096; i++) {
+				multiStmt.addBatch("INSERT INTO rewriteErrors VALUES (" + i + ")");
+				this.pstmt.setInt(1, i);
+				this.pstmt.addBatch();
+			}
+			
+			multiStmt.addBatch("INSERT INTO rewriteErrors VALUES (2048)");
+			
+			this.pstmt.setInt(1, 2048);
+			this.pstmt.addBatch();
+			
+			try {
+				this.pstmt.executeBatch();
+			} catch (BatchUpdateException bUpE) {
+				int[] counts = bUpE.getUpdateCounts();
+	
+				for (int i = 4059; i < counts.length; i++) {
+					assertEquals(counts[i], Statement.EXECUTE_FAILED);
+				}
+				
+				assertEquals(4096, getRowCount("rewriteErrors"));
+			}
+			
+			this.stmt.execute("TRUNCATE TABLE rewriteErrors");
+			
+			try {
+				multiStmt.executeBatch();
+			} catch (BatchUpdateException bUpE) {
+				int[] counts = bUpE.getUpdateCounts();
+	
+				for (int i = 4094; i < counts.length; i++) {
+					assertEquals(counts[i], Statement.EXECUTE_FAILED);
+				}
+				
+				assertEquals(4096, getRowCount("rewriteErrors"));
+			}
+			
+			if (versionMeetsMinimum(5, 0)) {
+				this.stmt.execute("TRUNCATE TABLE rewriteErrors");
+				
+				createProcedure("sp_rewriteErrors", "(param1 INT)\nBEGIN\nINSERT INTO rewriteErrors VALUES (param1);\nEND");
+				
+				CallableStatement cStmt = multiConn.prepareCall("{ CALL sp_rewriteErrors(?)}");
+				
+				for (int i = 0; i < 4096; i++) {
+					cStmt.setInt(1, i);
+					cStmt.addBatch();
+				}
+				
+				cStmt.setInt(1, 2048);
+				cStmt.addBatch();
+				
+				try {
+					cStmt.executeBatch();
+				} catch (BatchUpdateException bUpE) {
+					int[] counts = bUpE.getUpdateCounts();
+	
+					for (int i = 4093; i < counts.length; i++) {
+						assertEquals(counts[i], Statement.EXECUTE_FAILED);
+					}
+					
+					assertEquals(4096, getRowCount("rewriteErrors"));
+				}
+			}
+		}
+	}
+
 	public void testStreamChange() throws Exception {
 		createTable("testStreamChange",
 				"(field1 varchar(32), field2 int, field3 TEXT, field4 BLOB)");

Thread
Connector/J commit: r6567 - in trunk: . connector-j connector-j/src/com/mysql/jdbc connector-j/src/com/mysql/jdbc/exceptions connector-j/src/testsuite...mmatthews6 Sep