MySQL Connector/J 8.0.15 has been released
Dear MySQL users, MySQL Connector/J Version 8.0.15 is the GA release of the 8.0 branch of MySQL Connector/J. It is suitable for use with MySQL Server versions 8.0, 5.7, 5.6, and 5.5. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI. This release includes the following new features and changes, also described in more detail on https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-15.html As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. To download MySQL Connector/J 8.0.15 GA, see the "Generally Available (GA) Releases" tab at http://dev.mysql.com/downloads/connector/j/ Enjoy! Changes in MySQL Connector/J 8.0.15 (2019-02-01, General Availability) Functionality Added or Changed * Default value of the connection property allowLoadLocalInfile has been changed to false. Applications that use the LOAD DATA LOCAL INFILE (http://dev.mysql.com/doc/refman/8.0/en/load-data.html) statement on MySQL Server needs to set this property to true explicitly. (Bug #29261254) Enjoy and thanks for the support! On Behalf of MySQL/ORACLE RE Team Gipson Pulla -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
MySQL Connector/J 8.0.14 has been released
Dear MySQL users, MySQL Connector/J Version 8.0.14 is the GA release of the 8.0 branch of MySQL Connector/J. It is suitable for use with MySQL Server versions 8.0, 5.7, 5.6, and 5.5. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI. This release includes the following new features and changes, also described in more detail on https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-14.html As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. To download MySQL Connector/J 8.0.14 GA, see the "Generally Available (GA) Releases" tab at http://dev.mysql.com/downloads/connector/j/ Enjoy! Changes in MySQL Connector/J 8.0.14 (2019-01-21, General Availability) * Functionality Added or Changed * Bugs Fixed Functionality Added or Changed * Important Change: For MySQL Server 8.0.14 and later, 5.7.25 and later, 5.6.43 and later, and 5.5.63 and later, minimal permissions on named pipes are granted to clients that use them to connect to the server. Connector/J, however, can only use named pipes when granted full access on them. As a workaround, the MySQL Server that Connector/J wants to connect to must be started with the system variable named_pipe_full_access_group; see the description for the system variable for more details. (Bug #28971500) * X DevAPI: getDefaultSchema() now returns null when no default schema has been set for the Session. * Connector/J now has a new property for building from source, com.mysql.cj.build.verbose, which controls the verbosity of the build process' output. Its default value is false, which makes the output considerably shorter comparing with earlier versions of Connector/J. (Bug #28970166) * The method ResultSet.getBoolean() now returns FALSE when the designated column is of data type CHAR or VARCHAR and contains an "N" or "n". This makes Connector/J 8.0 behaves like Connector/J 5.1 when it comes to converting strings to booleans. (Bug #28706219, Bug #92574) * Connector/J is now capable of reading and, if needed, ignoring any initial notice packets sent by X Plugin before an X Protocol connection is established. Bugs Fixed * X DevAPI: Connector/J returned a NullPointerException when an application tried to establish an XProtocol connection using a Windows named pipe, which is not supported. With this fix, an XProtoclException is returned instead. This fix also makes sure that instead of a NullPointerException, a proper exception is thrown when an application tries to establish a Classic MySQL Protocol connection with a named pipe, but the named pipe is not specified at connection or it cannot be found on the specified path. (Bug #28606708) * X DevAPI: Adding an empty document with executeAsync() resulted in an ERROR 5013 (Missing row data for Insert). With this fix, no error or warning is returned in the case. (Bug #23045642) * Collection.count() returned a wrong error message when the collection did not exist. (Bug #28924137) * The source code of Connector/J contains non-ASCII characters, which might cause encoding issues during compilation if the system did not also use a UTF-8 locale. With this fix, the build script now handles non-ASCII characters well regardless of the system locale. (Bug #28894344) * A memory leak occurred if Connector/J was loaded via the bootstrap class path instead of the main application classpath. It was because AbandonedConnectionCleanupThread failed to initialize its internal thread in that case, so that references for closed connections were not cleaned up, and their number kept growing. This fix repairs the clean up process for closed connections and also makes the process thread safe. (Bug #28747636, Bug #92508) * clearInputStream() returned a NullPointerException when the mysqlSocket, mysqlInput, or mysqlOutput object it tried to retrieve was null. With this fix, an IOExcpetion is thrown instead in the situation. Thanks to Henning Schmiedehausen for contributing to the fix. (Bug #28731795, Bug #92625) * Updating a result set returned by a server-side prepared statement with SELECT ... FOR UPDATE (http://dev.mysql.com/doc/refman/8.0/en/select.html) resulted in an SQLException. (Bug #28692243, Bug #92536) * When the connection property zeroDateTimeBehavior was set to CONVERT_TO_NULL, Connector/J converted a TIME (http://dev.mysql.com/doc/refman/8.0/en/time.html) type
MySQL Connector/J 5.1.47 GA has been released
Dear MySQL Users, MySQL Connector/J 5.1.47, a maintenance release of the production 5.1 branch has been released. Connector/J is the Type-IV pure-Java JDBC driver for MySQL. MySQL Connector/J is available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html and mirror sites as well as Maven-2 repositories. MySQL Connector/J (Commercial) is already available for download on the My Oracle Support (MOS) website. This release will shortly be available on eDelivery (OSDC). As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.47 includes the following general bug fixes and improvements, also available in more detail on https://dev.mysql.com/doc/relnotes/connector-j/5.1/en/news-5-1-47.html Changes in MySQL Connector/J 5.1.47 (2018-08-17, General Availability) Version 5.1.47 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL Server versions 5.5, 5.6, 5.7, and 8.0. It supports the Java Database Connectivity (JDBC) 4.2 API. * Functionality Added or Changed * Bugs Fixed Functionality Added or Changed * The value UTF-8 for the connection property characterEncoding now maps to the utf8mb4 character set on the server and, for MySQL Server 5.5.2 and later, characterEncoding=UTF-8 can now be used to set the connection character set to utf8mb4 even if character_set_server has been set to something else on the server. (Before this change, the server must have character_set_server=utf8mb4 for Connector/J to use that character set.) Also, if the connection property connectionCollation is also set and is incompatible with the value of characterEncoding, characterEncoding will be overridden with the encoding corresponding to connectionCollation. See Using Character Sets and Unicode (http://dev.mysql.com/doc/connector-j/5.1/en/connector-j- <http://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-charsets.html>reference-charsets.html <http://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-charsets.html>) for details, including how to use the utf8mb3 character set now for connection. (Bug#23227334, Bug #81196) Bugs Fixed * Setting rewriteBatchedStatements=true and useLocalTransactionState=true caused transactions to be uncommitted for batched UPDATE and DELETE statements. It was due to the intermediate queries for enabling multiquery support on the server resetting the local transaction state as a side effect. With this fix, the local transaction state is preserved when the intermediate queries are executed. (Bug #27658489, Bug #89948) * Rewriting prepared INSERT statements in a multiquery batch failed with a BatchUpdateException when the statements did not contain place holders. This was due a faulty mechanism for query rewriting, which has been corrected by this fix. (Bug #25501750, Bug #84813) * When using batched prepared statements with multiple queries per statement, queries rewriting was incorrect, resulting in the wrong queries being sent to the server. (Bug #23098159, Bug #81063) * ResultSet.updateRow() failed when the character set used by a column in the ResultSet did not match that of the connection's encoding. With this fix, values for the affected columns are first converted to String before the update, so that the character set difference is properly handled. (Bug #22847443, Bug #80532) * Record updates failed for a scrollable and updatable PreparedStatement when the WHERE clause for the updater or refresher contained fractional timestamp values and the connection property sendFractionalSeconds was set to false. It was because in the situation, Connector/J did not perform the proper adjustments of the fractional parts in the WHERE clause values according to the length of the field's fractional part as defined in the database. This fix makes Connector/J perform the proper adjustment to the fractional part, so that the WHERE clause value can be properly compared to the value fetched from the database. Moreover, useJDBCCompliantTimezoneShift(), useGmtMillisForDatetimes(), and useSSPSCompatibleTimezoneShift() were applied to the WHERE clause values while they should not be, and this fix removes their applications. (Bug #22305979) * When a Java Date value was bound to a PreparedStatement parameter, attempts to format the value by a proleptic GregorianCalendar failed to make the dates proleptic, so that d
MySQL Connector/J 8.0.12 has been released
Dear MySQL users, MySQL Connector/J Version 8.0.12 is the second GA release of the 8.0 branch of MySQL Connector/J. It is suitable for use with MySQL Server versions 5.5, 5.6, 5.7, and 8.0. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI. This release includes the following new features and changes, also described in more detail on https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-12.html As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. To download MySQL Connector/J 8.0.12 GA, see the "Generally Available (GA) Releases" tab at http://dev.mysql.com/downloads/connector/j/ Enjoy! Changes in MySQL Connector/J 8.0.12 (2018-07-27, General Availability) Version 8.0.12 is the latest General Availability release of the 8.0 series of MySQL Connector/J. It is suitable for use with MySQL Server versions 8.0, 5.7, 5.6, and 5.5. * Functionality Added or Changed * Bugs Fixed Functionality Added or Changed * X DevAPI: The following changes have been made to the API: + Removed ModifyStatement.arrayDelete() and ModifyStatement.merge(). + Renamed Colletion.find().limit().skip() to Colletion.find().limit().offset(). + To simplify the class hierarchy and to have the class names reflect better the classes' functions, the following changes have been made: o The FindParams class has been renamed to FilterParams o The AbstractFindParams class has been renamed to AbstractFilterParams o The DocFindParams class has been renamed to DocFilterParams o The TableFindParams class has been renamed to TableFilterParams Notice that the methods in the original FilterParams class have been moved under the new AbstractFilterParams class. (Bug #28027459) * X DevAPI: Connector/J now uses synchronous client sockets (java.net.Socket) by default to communicate with MySQL servers for X Protocol connections. While asynchronous sockets can still be used by setting the connection property xdevapi.useAsyncProtocol=true, this is not recommended, as it might result in performance degradation for Connector/J. (Bug #27522054) * X DevAPI: Connector/J now gives provision for the use of a custom socket factory for X Protocol connections to MySQL Servers using Unix domain sockets. See Section 6.8, "Connecting Using Unix Domain Sockets" for details. * Connector/J now retrieves the MySQL keyword list from the INFORMATION_SCHEMA.KEYWORDS ( http://dev.mysql.com/doc/refman/8.0/en/keywords-table.html ) table on the MySQL server when a connection session is established. The list can then be accessed by calling DatabaseMetaData.getSQLKeywords(). * To simplify the code, the ReadableProperty and ModifiableProperty classes have been consolidated into the RuntimeProperty class. Bugs Fixed * X DevAPI: When creating an X DevAPI session using a Properties map instead of a connection string, referring to property keys like host, port, and protocol in lowercase caused a NullPointerException. With the fix, both upper and lower cases can now be used. (Bug#27652379) * X DevAPI: When using the getConnection() method with the mysqlx: scheme in the connection URL, Connector/J returned an ordinary JDBC connection instead of an X-Protocol connection. (Bug #26089880) * If wait_timeout was set on the server and the Connector/J had the connection property interactiveClient=false, or if interactive_timeout was set on the server and Connector/J had the connection property interactiveClient=true, a connection is invalidated when it has idled for a longer time than the set timeout. When such a timeout occurred, Connector/J threw a CJCommunicationsException, without indicating it was a timeout. With this fix, the error message returned explains the issue and suggests how to avoid it. (Bug#27977617, Bug #90753) * When an application tried to connect to a non-MySQL database through some JDBC driver and Connector/J happened to be on the class path also, Connector/J threw a SQLNonTransientConnectionException, which prevented the application from connecting to its database. With this fix, Connector/J returns null whenever a connection string does not start with jdbc:mysql: or mysqlx:, so connections to non-MySQL databases are not blocked. (Bug#26724154, Bug #87600) * A was
MySQL Connector/J 5.1.43 has been released
Dear MySQL Users, MySQL Connector/J 5.1.43, a maintenance release of the production 5.1 branch has been released. Connector/J is the Type-IV pure-Java JDBC driver for MySQL. MySQL Connector Java is available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html and mirror sites as well as Maven-2 repositories. MySQL Connector Java (Commercial) is already available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.43 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-43.html Changes in MySQL Connector/J 5.1.43 (2017-07-21) Version 5.1.43 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL Server versions 5.5, 5.6, and 5.7. It supports the Java Database Connectivity (JDBC) 4.2 API. Functionality Added or Changed * Update the time zone mappings using the latest IANA and CLDR time zone databases. (Bug #25946965) * A new option for the loadBalancingStrategy connection property called serverAffinity has been added. The servers listed in the new connection property serverAffinityOrder (which should be a subset of the servers in the host list of the connection URL) are contacted in the order they are listed until a server is available or until the list of servers is exhausted, at which point a random load-balancing strategy is used with the hosts not listed by serverAffinityOrder. See descriptions for loadBalancingStrategy and serverAffinityOrder in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J (http://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html) for details. (Bug #20182108) Bugs Fixed * Secure JDBC connections did not fall back to the default truststore when a custom one was not provided. (Bug #26243128) * Connector/J failed a number of regression tests in the testsuite related to geographic information system (GIS) functions because of changes to GIS support by the MySQL server. The fix corrects the tests. (Bug #26239946, Bug #26140577) * Attempts to connect to a server started with collation utf8mb4_de_pb_0900_ai_ci resulted in null pointer exceptions. (Bug #26090721) * In com/mysql/jdbc/ServerPreparedStatement.java, the arguments resultSetType and resultSetConcurrency for a call of Connection.preparedStatement() were swapped. (Bug #25874048, Bug #85885) * A NullPointerException was returned when getDate(), getTime(), or getTimestamp() was called with a null Calendar. This fix makes Connector/J throw an SQLException in the case. (Bug #25650305) * Some JDBC proxied objects were missing the proper handling of the equals() methods, thus even comparison of one of these proxied objects to its own self with equals() yielded false. This patch introduces proper handling for the equals() method in all the relevant proxies. (Bug #21931572, Bug #78313) * A server-side prepared statement was not closed when the same statement was being prepared again while the original statement was being cached. This was caused by the silent replacement of the cache entry of the old statement by the new. When this happened repeatedly, it caused eventually the complaint that max_prepared_stmt_count was exceeded. This fix makes sure that when a cache entry for a statement replaces an older one, the older statement is immediately closed. (Bug #20066806, Bug #74932) On Behalf of the MySQL/Oracle Release Engineering Team, Hery Ramilison -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
MySQL Connector/J 5.1.42 has been released
Dear MySQL Users, MySQL Connector/J 5.1.42, a maintenance release of the production 5.1 branch has been released. Connector/J is the Type-IV pure-Java JDBC driver for MySQL. MySQL Connector Java is available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html and mirror sites as well as Maven-2 repositories. MySQL Connector Java (Commercial) is already available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.42 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-41.html Changes in MySQL Connector/J 5.1.42 (2017-04-28) Version 5.1.42 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL Server versions 5.5, 5.6, and 5.7. It supports the Java Database Connectivity (JDBC) 4.2 API. * Functionality Added or Changed * Bugs Fixed Functionality Added or Changed * A null value can now be extracted from a result set to a class belonging to the java.time package. Before, such an extraction resulted in a NullPointerException being thrown. Thanks to Martin Desharnais for contributing the code. (Bug #25250938, Bug #84189) * Connector/J now checks that a MySQL server's SSL certificate and the Certificate Authority (CA) that issued it are not expired before establishing an SSL connection with the server, even if the connection property verifyServerCertificate is set to false. (Bug #20515688) * Name-value pairs contained in the connection property sessionVariables can now be separated by either commas or a semicolons. (Bug #17757070) Bugs Fixed * An invalid timezone identifier was used in StatementRegressionTest.java of the Connector/J testsuite. (Bug #25687718, Bug #85351) * A mysql client failed to establish an SSL connection to the server using the SSL certificates provided in the Connector/J source package. It was because the certificates have been generated with the same Common Name. This fix corrects the Common Names and regenerates the SSL certificates. (Bug #25636947) * The unit test testsuite.simple.ResultSetTest.testPadding failed with the error Unknown character set: 'gb18030' after the collation map updates in release 5.1.40. (Bug #25556597) * In a multi-host connection, query timeouts did not occur as configured. It was because the CancelTask thread, when trying to access the top level, virtual connection object, ran into a race condition with the connection monitor and then hung. With this fix, the CancelTask thread is passed a direct reference to the underlying physical connection, with which it can execute the cancellation. (Bug #25490163, Bug #84783) * CallableStatement.extractProcedureName() did not return the correct result when the procedure name contained a dash. This was due to an error in the stripComments() method of the StringUtils class, which has now been corrected. (Bug #25321524, Bug #84324) * The ConnectionImpl.isReadOnly() method returned a confusing error message when it could not retrieve the read-only status of the server. The message has now been changed to "Could not retrieve transaction read-only status from server." (Bug #25101890, Bug #83834) * A NullPointerException was thrown when a null boolean value was being read from the database. (Bug #25048406, Bug #83662) * After a BIT value had been retrieved from a result set, the wasNull() method of the result set returned value for the last wasNull() query instead of the value for the last retrieved column. (Bug #24841670, Bug #83368) * Using a partially-quoted identifier (with only the database or the procedure name quoted) or a non-existent parameter to register an output parameter in a CallableStatement caused a NullPointerException. With this fix, a partially-quoted identifier is accepted, and a non-existent parameter causes a SQLError to be thrown. (Bug #22333996, Bug #79561) * DatabaseMetaData.getProcedureColumns() and DatabaseMetaData.getFunctionColumns() did not return expected results. This was due to the errors with the matching algorithm for the column names, which have now been fixed. Notice that, however, the effects of the connection parameter getProceduresReturnsFunctions on th
MySQL Connector/J 5.1.41 has been released
Dear MySQL Users, MySQL Connector/J 5.1.41, a maintenance release of the production 5.1 branch has been released. Connector/J is the Type-IV pure-Java JDBC driver for MySQL. Version 5.1.41 is suitable for use with many MySQL server versions, including 4.1, 5.0, 5.1, 5.4 and 5.5. MySQL Connector Java is available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html and mirror sites as well as Maven-2 repositories. MySQL Connector Java (Commercial) is already available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.41 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-41.html Changes in MySQL Connector/J 5.1.41 (2017-02-28) Version 5.1.41 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL server versions 5.5, 5.6, and 5.7. It supports the Java Database Connectivity (JDBC) 4.2 API. Bugs Fixed * Connections failed with MySQLSyntaxErrorException: Unknown character set when connectionCollation=ISO-8859-13. This was due to a wrong logic in Connector/J's internal charset mapping, which has now been fixed. (Bug #25504578) * When loading classes through some external class loaders, com.mysql.jdbc.Util threw an NoClassDefFoundError. This was caused by Class.getPackage() returning null when some external class loaders were used. This fix replaces those calls of Class.getPackage() with calls of the new method Class.getName(), which return package names that are extracted from the fully-qualified class names. (Bug #25048543, Bug #83052) * In the manifest for the Connector/J JAR file, the Import-Package directive specified version numbers for the javax.net.ssl package. The specification was unnecessary, and it caused the configuration of an SSL connection to a MySQL server to fail in an OSGi environment. The version requirement has now been removed. (Bug #24942672, Bug #82826) * In a Fabric setup, when multiple threads required to have hashes computed, an ArrayIndexOutOfBoundsException might be thrown from inside HashShardMapping. This fix prevents the issue by having HashShardMapping.getShardIndexForKey() synchronized. (Bug #24289730, Bug #82203) * When the configuration property cacheResultSetMetadata was set to true, a ping query using a PreparedStatement failed with a NullPointerException. This fix moves the ping query to an earlier stage of the statement execution, which prevents the exception. (Bug #23535001, Bug #81706) * The setFabricShardTable() method failed to parse qualified table names (in the format of database_name.table_name), which causes SQLExceptions to be thrown. (Bug #23264511, Bug #81108) * A race condition occurred when a call of Connection.setNetworkTimeout() was followed closely by a call of Connection.close(), and a NullPointerException might result if the connection was closed before the executor supplied to setNetworkTimeout() was able to set the timeout, as the executor would run into a null mysqlConnection object. This fix removed the race condition. (Bug #21181249, Bug #75615) * With the connection properties cacheServerConfiguration=true and elideSetAutoCommits=true, any new connection to the server obtained after the first connection was established had the variable autoCommit equaled false, even if the value of the variable was true on the server. That was because the value of autoCommit was not properly initialized when a new connection was established, and this fix corrects that. Also, since release 5.1.41, the functionality of the property elideSetAutoCommits has been disabled due to Bug# 66884. Any value given for the property is now ignored by Connector/J. (Bug #17756825, Bug #70785) * When using Tomcat and a web application that utilized Connector/J was down, Tomcat was unable to stop the AbandonedConnectionCleanupThread started internally by Connector/J, leading to multiple instances of the thread when the web application was restarted; or, Tomcat was able to stop the thread but unable to restart it on reload of the web application. Different combinations of Tomcat's default settings, usage of Tomcat's ServletContextListener feature, and
MySQL Connector/J 6.0.3 m2 Development Release has been released
Dear MySQL users, MySQL Connector/J 6.0.3 m2 Development Release is a developer milestone release for the 6.0.x series. It is the second public release of the current Connector/J 6.0 development branch, providing an insight to upcoming features. Although some of these are still under development, this release includes the following new features and changes, also described in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-6-0-3.html. As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. Enjoy! Changes in MySQL Connector/J 6.0.3 m2 (2016-06-24) Functionality Added or Changed * For MySQL server 5.7.5 and later, the EOF packet in the MySQL server/client protocol has been deprecated and replaced by the OK packet. The change is now supported by Connector/J. (Bug #23212347) * SSL is now supported for connections to a MySQL server using the X Protocol. (Bug #21532788) * The following objects are no longer extensions of the Extension interface, but get their own implementations now, which reduces their dependencies on other objects: + BalanceStrategy + ProfilerEventHandler + AuthenticationPlugin Bugs Fixed * An excessive amount of memory was used when the connection properties enablePacketDebug and traceProtocol were both set to "true." (Bug #23535571) * Connector/J hung, returned a NullPointerException, or returned an incorrect exception when using result sets with the properties TYPE_FORWARD_ONLY and CONCUR_UPDATABLE. It was due to an inaccurate check for the cursor for the result set. This fix makes sure Connector/J checks accurately on whether a cursor has been requested, both when executing a statement and fetching its results. (Bug #23201930) * When using server-side prepared statements with profileSQL=true and useInformationSchema=true, an SQLException (" ResultSet is from UPDATE. No Data") occurred when the client tried to advance to the next row in the result set. This was due to a failure of an internal query for metadata, which is now prevented by this fix. (Bug #23188498) * The download package for Connector/J 6.0.2 Milestone 1 contained the Developer Guide for the wrong version of Connector/J. (Bug #23111273, Bug #81089) * A NullPointerException occurred in com.mysql.cj.mysqlx.io.AsyncMessageReader due to a race condition when there were more than 2000 concurrent connections taking place. (Bug #23044312) * getTimestamp() returned wrong value for the fractional part of a TIME or DATETIME field. (Bug #22932078) * LoadBalanceConnectionGroupManager.removeHost() was not removing hosts as expected. This fix tries to ensure that host removals will be successful under different situations. (Bug #22848249) References: See also: Bug #22678872. * For a load-balanced connection, an ArrayIndexOutOfBoundsException was thrown when ConnectionGroupManager.removeHost() was called. It was due to an error in LoadBalancedConnectionProxy.removeHost(), which has now been fixed. (Bug #22730682) * A Fabric connection threw a NullPointerException when all hosts have been removed from its host list, or when the internal load-balanced connection became null due to inconsistency of the replication connection. This fix adds to Connector/J the abilities to handle those situations. Also, a new connection property, loadBalanceHostRemovalGracePeriod, has been introduced, which sets the grace period for waiting to remove the currently active host from a load-balanced connection. See the entry for the new property in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J (http://dev.mysql.com/doc/connector-j/6.0/en/connector-j- reference-configuration-properties.html) for details. (Bug #22678872) References: See also: Bug #22848249. * With some Tomcat web applications, when Connector/J connects to the server with useLegacyDatetimeCode=false without setting serverTimeZone, a NullPointerException was returned. This was because the timezone property file for Connector/J was loaded by the bootstrap class loader, which did not know the location of the property file and thus failed to load it. This fix avoids the problem by making Connector/J use the same class loader for both the p
MySQL Connector/J 6.0.3 m2 Development Release has been released
Dear MySQL users, MySQL Connector/J 6.0.3 m2 Development Release is a developer milestone release for the 6.0.x series. It is the second public release of the current Connector/J 6.0 development branch, providing an insight to upcoming features. Although some of these are still under development, this release includes the following new features and changes, also described in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-6-0-3.html. As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. Enjoy! Changes in MySQL Connector/J 6.0.3 m2 (2016-06-24) Functionality Added or Changed * For MySQL server 5.7.5 and later, the EOF packet in the MySQL server/client protocol has been deprecated and replaced by the OK packet. The change is now supported by Connector/J. (Bug #23212347) * SSL is now supported for connections to a MySQL server using the X Protocol. (Bug #21532788) * The following objects are no longer extensions of the Extension interface, but get their own implementations now, which reduces their dependencies on other objects: + BalanceStrategy + ProfilerEventHandler + AuthenticationPlugin Bugs Fixed * An excessive amount of memory was used when the connection properties enablePacketDebug and traceProtocol were both set to "true." (Bug #23535571) * Connector/J hung, returned a NullPointerException, or returned an incorrect exception when using result sets with the properties TYPE_FORWARD_ONLY and CONCUR_UPDATABLE. It was due to an inaccurate check for the cursor for the result set. This fix makes sure Connector/J checks accurately on whether a cursor has been requested, both when executing a statement and fetching its results. (Bug #23201930) * When using server-side prepared statements with profileSQL=true and useInformationSchema=true, an SQLException (" ResultSet is from UPDATE. No Data") occurred when the client tried to advance to the next row in the result set. This was due to a failure of an internal query for metadata, which is now prevented by this fix. (Bug #23188498) * The download package for Connector/J 6.0.2 Milestone 1 contained the Developer Guide for the wrong version of Connector/J. (Bug #23111273, Bug #81089) * A NullPointerException occurred in com.mysql.cj.mysqlx.io.AsyncMessageReader due to a race condition when there were more than 2000 concurrent connections taking place. (Bug #23044312) * getTimestamp() returned wrong value for the fractional part of a TIME or DATETIME field. (Bug #22932078) * LoadBalanceConnectionGroupManager.removeHost() was not removing hosts as expected. This fix tries to ensure that host removals will be successful under different situations. (Bug #22848249) References: See also: Bug #22678872. * For a load-balanced connection, an ArrayIndexOutOfBoundsException was thrown when ConnectionGroupManager.removeHost() was called. It was due to an error in LoadBalancedConnectionProxy.removeHost(), which has now been fixed. (Bug #22730682) * A Fabric connection threw a NullPointerException when all hosts have been removed from its host list, or when the internal load-balanced connection became null due to inconsistency of the replication connection. This fix adds to Connector/J the abilities to handle those situations. Also, a new connection property, loadBalanceHostRemovalGracePeriod, has been introduced, which sets the grace period for waiting to remove the currently active host from a load-balanced connection. See the entry for the new property in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J (http://dev.mysql.com/doc/connector-j/6.0/en/connector-j- reference-configuration-properties.html) for details. (Bug #22678872) References: See also: Bug #22848249. * With some Tomcat web applications, when Connector/J connects to the server with useLegacyDatetimeCode=false without setting serverTimeZone, a NullPointerException was returned. This was because the timezone property file for Connector/J was loaded by the bootstrap class loader, which did not know the location of the property file and thus failed to load it. This fix avoids the problem by
MySQL Connector/J 5.1.39 has been released
Hello all, MySQL Connector Java 5.1.39, a maintenance release of the production 5.1 branch, has been released. Connector/J is a Type-IV pure-Java JDBC driver for MySQL, supporting the JDBC 4.2 API. It is suitable for use with MySQL server versions 5.5, 5.6, and 5.7. MySQL Connector Java is available in source and binary form from the Connector/J download page at http://dev.mysql.com/downloads/connector/j/5.1.html MySQL Connector Java (Commercial) is available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.39 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-39.html : Changes in MySQL Connector/J 5.1.39 (2016-05-09) Functionality Added or Changed * For MySQL server 5.7.5 and later, the EOF packet in the MySQL server/client protocol has been deprecated and replaced by the OK packet. The change is now supported by Connector/J. (Bug #23212347) Bugs Fixed * Connector/J hung, returned a NullPointerException, or returned an incorrect exception when using result sets with the properties TYPE_FORWARD_ONLY and CONCUR_UPDATABLE. It was due to an inaccurate check for the cursor for the result set. This fix makes sure Connector/J checks accurately on whether a cursor has been requested, both when executing a statement and fetching its results. (Bug #23201930) * When using server-side prepared statements with profileSQL=true and useInformationSchema=true, an SQLException (" ResultSet is from UPDATE. No Data") occurred when the client tried to advance to the next row in the result set. This was due to a failure of an internal query for metadata, which is now prevented by this fix. (Bug #23188498) * LoadBalanceConnectionGroupManager.removeHost() was not removing hosts as expected. This fix tries to ensure that host removals will be successful under different situations. (Bug #22848249) References: See also: Bug #22678872. * For connections with useCursorFetch=true and fetch size set with defaultFetchSize or setFetchSize, if data from a TIME and a BLOB data column was selected together, corrupted value for the TIME data was returned. (Bug #22833410, Bug #80522) * For a load-balanced connection, an ArrayIndexOutOfBoundsException was thrown when ConnectionGroupManager.removeHost() was called. It was due to an error in LoadBalancedConnectionProxy.removeHost(), which has now been fixed. (Bug #22730682) * A Fabric connection threw a NullPointerException when all hosts have been removed from its host list, or when the internal load-balanced connection became null due to inconsistency of the replication connection. This fix adds to Connector/J the abilities to handle those situations. Also, a new connection property, loadBalanceHostRemovalGracePeriod, has been introduced, which sets the grace period for waiting to remove the currently active host from a load-balanced connection. See the entry for the new property in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J (http://dev.mysql.com/doc/connector-j/5.1/en/connector-j- reference-configuration-properties.html) for details. (Bug #22678872) References: See also: Bug #22848249. * FabricMySQLDataSource.getConnection() threw a null pointer exception when a master failover took place. (Bug #22598938) * The OSGi manifest file in the Connector/J JAR file did not expose the MySQL Fabric packages, so the Fabric-related classes could not be resolved even though they were present in the JAR file. (Bug #22385172) * With some Tomcat web applications, when Connector/J connects to the server with useLegacyDatetimeCode=false without setting serverTimeZone, a NullPointerException was returned. This was because the timezone property file for Connector/J was loaded by the bootstrap class loader, which did not know the location of the property file and thus failed to load it. This fix avoids the problem by making Connector/J use the same class loader for both the property file and the Connector/J classes. (Bug #22353759, Bug #79343) * When using JDBC 4.2 and with the connection property cachePrepStmts set to "true," after a prepared statement had been cached, rerunning the SQL statement resulted in a pre-JDBC 4.2 PreparedStatement object being instantiated. This fix prevents the problem by having the PreparedStatement instantiated by a factory instead of a constructor meth
MySQL Connector/J 6.0.2 m1 Development Release has been released
Dear MySQL users, MySQL Connector/J 6.0.2 m1 Development Release is a developer milestone release for the 6.0.x series. It is the first public release of the current Connector/J 6.0 development branch, providing an insight to upcoming features. Although some of these are still under development, this release includes the following new features and changes (in comparison to the current Connector/J 5.1 production release), also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-6-0-2.html: As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. Enjoy! Changes in MySQL Connector/J 6.0.2 (2016-04-11, Milestone 1) Version 6.0.2 Milestone 1 is the first development release of the 6.0 branch of MySQL Connector/J. The major features of Connector/J 6.0 include: * Supports MySQL 5.5, 5.6, and 5.7. * Supports the JDBC 4.2 specification. * Supports the Java 8 platform (use Connector/J 5.1 for Java 7 or earlier). * Supports the new X DevAPI. The X DevAPI enables application developers to write code that combines the strengths of the relational and document models using a modern, NoSQL-like syntax that does not assume previous experience writing traditional SQL. To learn more about how to write applications using the X DevAPI see the X DevAPI User's Guide (http://dev.mysql.com/doc/x-devapi-userguide/en/). For more information about how the X DevAPI is implemented in Connector/J, MySQL Connector/J X DevAPI Reference (http://dev.mysql.com/doc/dev/connector-j). Please note that the X DevAPI requires at least MySQL Server version 5.7.12 or higher with the X Plugin enabled. For general documentation about how to get started using MySQL as a Document Store, see (http://dev.mysql.com/doc/refman/5.7/en/document-store.html). For other significant changes from Connector/J 5.1 to 6.0, see Changes in Connection Properties (http://dev.mysql.com/doc/connector-j/6.0/en/connector-j-properties-changed.html) and Changes in the Connector/J API (http://dev.mysql.com/doc/connector-j/6.0/en/connector-j-api-changes.html). Connector/J 6.0.2 includes all the bug fixes that have been incorporated into Connector/J 5.1.38, plus the fixes described below. Bugs Fixed * FabricMySQLDataSource.getConnection() threw a null pointer exception when a master failover took place. (Bug #22598938) * The OSGi manifest file in the Connector/J JAR file did not expose the MySQL Fabric packages, so the Fabric-related classes could not be resolved even though they were present in the JAR file. (Bug #22385172) Documentation -- Online: http://dev.mysql.com/doc/connector-j/6.0/en/index.html Reporting Bugs --- We welcome and appreciate your feedback and bug reports: http://bugs.mysql.com/ On Behalf of the MySQL/ORACLE RE Team Hery Ramilison -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
MySQL Connector/J 5.1.38 has been released
Hello all, MySQL Connector Java 5.1.38, a maintenance release of the production 5.1 branch, has been released. Connector/J is a Type-IV pure-Java JDBC driver for MySQL. It is suitable for use with MySQL server versions 5.5, 5.6, and 5.7. It is also the first release of MySQL Connector/J to support the Java Database Connectivity (JDBC) 4.2 API. MySQL Connector Java is available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html MySQL Connector Java (Commercial) is available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.38 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-38.html : Changes in MySQL Connector/J 5.1.38 (2015-12-07) Functionality Added or Changed * When connecting to a MySQL server 5.7 instance that supports TLS, Connector/J now prefers a TLS over a plain TCP connection. (Bug #21947042) * Two new connection properties, allowSlaveDownConnections and readFromMasterWhenNoSlaves, have been introduced for configuring replication-aware connections. See Configuring Master/Slave Replication with Connector/J (http://dev.mysql.com/doc/connector-j/en/connector-j-master-slave-replication-connection.html) and the entries for the new properties in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J (http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html) for details. (Bug #21286268) Bugs Fixed * In a Fabric environment, a ClassCastException resulted when a stored procedure was called with an INOUT parameter. This was because in this situation, what was being cast was a proxied version of the object. This fix extracts the underlying object from its proxy, allowing it to be cast to the implementing class. (Bug #22096981) * getTypeInfo() erroneously returned a PRECISION value of "255" instead of "65535" for the data type VARBINARY. (Bug #21978216) * A deadlock was observed when in the same server group, two concurrent threads were using different Fabric connections, and one executed a failover procedure while the other simultaneously called a method that acquired a lock on the underlying replication connection instance monitor. This fix revised the locking mechanism of replication connections, in order to prevent the observed deadlocks. (Bug #21966391, Bug #21934573, Bug #78710) * State information of a Fabric group was not updated by Connector/J after a local cache's Time to Live (TTL) expired, which resulted in the client not recognizing any topology changes happening to the group like a master failover, a server rejoining, and so on. (Bug #21296840, Bug #17910835) * Connector/J threw an AbstractMethodError when a JDBC 4 functionality (for example, createBlob()) was used on a replication-aware connection. This has been fixed by putting replication connections under the multi-host connection proxy structure that Connector/J has been using for load-balanced and fail-over connections. (Bug #11763419) References: See also Bug #11763401. * After the initial call of Connection.setReadOnly() following the creation of a replication-aware connection, subsequent calls of Connection.setReadOnly() could not change the nature of the connection. This has been fixed by putting replication connections under the multi-host connection proxy structure that Connector/J has been using for load-balanced and fail-over connections. (Bug #11763401) References: See also Bug #11763419. Documentation -- Online: http://dev.mysql.com/doc/connector-j/en/index.html Reporting Bugs --- We welcome and appreciate your feedback and bug reports: http://bugs.mysql.com/ On Behalf of the MySQL/ORACLE RE Team Hery Ramilison -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
MySQL Connector/J 5.1.37 has been released
Hello all, MySQL Connector Java 5.1.37, a maintenance release of the production 5.1 branch, has been released. Connector/J is a Type-IV pure-Java JDBC driver for MySQL. It is suitable for use with MySQL server versions 5.5, 5.6, and 5.7. It is also the first release of MySQL Connector/J to support the Java Database Connectivity (JDBC) 4.2 API. MySQL Connector Java is available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html MySQL Connector Java (Commercial) is available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the "CHANGES" file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.37 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-37.html : Changes in MySQL Connector/J 5.1.37 (2015-10-15) Functionality Added or Changed * Connector/J now supports the JSON data type, which has been supported by the MySQL server since release 5.7.8. * methodCompressedInputStream.getNextPacketFromServer() has been refactored to reduce memory use and garbage collection efforts caused by the use of the inflater. (Bug #21648826, Bug #78106) * The code for executing a REPLACE statement when rewriteBatchedStatements=true has been refactored by putting multiple batched statements into a single query, making it work more like an INSERT statement. This increases the efficiency for running REPLACE statements. Thanks to Jie Han for contributing the code. (Bug #21429909, Bug #77681) * A new connection property, truncateFractionalSeconds=true|false, has been introduced. It controls whether fractional seconds in timestamps are to be truncated on the client side or to be sent to the server side for truncation there. See the entry for the new property in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J (http://dev.mysql.com/doc/connector-j/en/connector-j-refe rence-configuration-properties.html) for details. Thanks to Kwon Nam Son for contributing the code. (Bug #21304726, Bug #77449) * A new connection property, enableEscapeProcessing, has been introduced for supporting JDBC 4.2. It sets the default escape processing behavior for Statement objects. See the entry for the new property in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J (http://dev.mysql.com/doc/connector-j/en/connector-j-refe rence-configuration-properties.html) for details. Bugs Fixed * A ClassCastException resulted for a Fabric connection when rewriteBatchedStatements was "true" and a batch update was rewritten. (Bug #21876798) * A number of regression tests in the testsuite failed when they were run against MySQL 5.7, because the NO_AUTO_CREATE_USER SQL mode had become the default behavior of the server since MySQL 5.7.7, making some GRANT statements in the test fail when a new user had to be created. With this fix, CREATE USER statements have been added to the regressions tests when needed, to prevent the test failures. (Bug #21697684, Bug #78225) * Connecting to MySQL 5.0 and 5.1 using Connector/J 5.1.36 resulted in an SQLException, with a complaint for an "Unknown system variable 'language'". (Bug #21415165, Bug #77665) * The IS_GENERATEDCOLUMN field was empty in the result returned by DatabaseMetaData.getColumns(). This fix corrects the field so that it contains a YES or NO according to whether the column is generated or not. (Bug #20969312, Bug #76859) * getTypeInfo() returned an incorrect PRECISION value of "255" for the data type of VARCHAR. The return value has been corrected to "65535." (Bug #20675539, Bug #76187) * When a connection is forcefully closed with abortInternal() in the ConnectionImpl class, a null point exception sometimes resulted. This is now avoided by putting the associated this.io.releaseResources() call inside a try block, so that the exception, unavoidable due to a race condition, can be properly caught and ignored. (Bug #20536592, Bug #75849) * If the MySQL server's default authentication method was SHA256 but neither one of the Connector/J connection properties allowPublicKeyRetrieval and serverRSAPublicKeyFile was set, the authentication failed with a TransientConnectionException, complaining that the public key could not be retrieved. With this fix, authentication continues in the situation, allowing other enabled authentication methods to be tried. (Bug #20433047,
MySQL Connector/J 5.1.36 has been released
Hello all, MySQL Connector/J 5.1.36, a maintenance release of the production 5.1 branch has been released. Connector/J is a Type-IV pure-Java JDBC driver for MySQL. It is suitable for use with MySQL server versions 5.5 and 5.6. MySQL Connector Java is available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html MySQL Connector Java (Commercial) is available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the CHANGES file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.36 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-36.html : Changes in MySQL Connector/J 5.1.36 (2015-07-02) Version 5.1.36 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL server versions 5.5, and 5.6. Functionality Added or Changed * The files in the Maven Central Repository for each Connector/J release have been reorganized and a source artifact (*-sources.jar) has been added, for release 5.1.21 and after. (Bug #20283655, Bug #75335) Bugs Fixed * Results returned by DatabaseMetaData.getCatalogs() were not properly sorted by catalog name. (Bug #21215151) * A ClassCastException occurred when Connector/J was executing a streaming prepared statement in a Fabric environment. (Bug #21184949, Bug #77217) * Connector/J did not use the character set specified with the connection property passwordCharacterEncoding for authentication. With this fix, the property is now honored. If it is not set, Connector/J uses the value of characterEncoding instead; if even that is not set, Conenctor/J defaults to UTF-8 for the password's encoding. (Bug #20825727) * A failover did not occur for a MySQL Fabric connection during the failure of a master server. It was because the state change of the Fabric connection group was not handled properly, which hs been corrected by this fix. (Bug #20821888, Bug #75113) * When the getDate() and getTime() methods of ResultSet were called to retrieve values with fractional seconds, a bad format error occurred. With this fix, the fractional seconds are dropped before the retrieved values are converted into a Date or Time object. (Bug #20804635) * A StringIndexOutOfBoundsException occurred when getProcedureColumns() were trying to return ENUM or SET type procedures or functions that involved reserved words. That was caused by a problem in the parser for the functions' or procedures' CREATE statements, which this fix corrects. (Bug #20727196) * At every connection, Connector/J executed a SHOW VARIABLES WHERE statement over a multitude of variables, which consumed a lot of time and memory. To improve the efficiency of the code, this fix replaces the statement with the more efficient SELECT @@variable query and also implements some other related changes. (Bug #20408891, Bug #75592) * getProcedures(), getFunctions(), getProcedureColumns(), and getFunctionColumns() returned duplicate results when the connection parameter nullCatalogMeansCurrent was set to false. (Bug #19803348) * An UnsupportedEncodingException during handshake gave rise to a NullPointerException. With this fix, the NullPointerException is no longer thrown, and a proper error message is provided by Connector/J. (Bug #18758686, Bug #72630) * When using Connector/J with MySQL Fabric, the createGroup() method failed with a ClassCastException. (Bug #18719760, Bug #72546) * Using Connector/J to connect with non-null user name and password to a MySQL Fabric server that had authentication disabled resulted in a NullPointerException. (Bug #18425861, Bug #72077) * The change user functionality in Connector/J was dependent on Bug# 70865 of the MySQL server (for releases 5.5 and later, the server unnecessarily sends a plugin_request_packet for every COM_CHANGE_USER packet). That dependence made the com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSour ce interface fail for server versions or forks that did not have the same bug. This fix removes that dependence and makes the interface function properly, whether the server suffers Bug# 70865 or not. (Bug #17810800, Bug #70927) * JDBC4MySQLPooledConnection keeps a list of statementEventListener instances named statementEventListeners, which is used as monitor lock whenever the fireStatementEvent() method is called. However, because the pooled connection's close() method set statementEventListener to be null, if a prepared statement was closed
MySQL Connector/J 5.1.35 has been released
Hello all, MySQL Connector/J 5.1.35, a maintenance release of the production 5.1 branch has been released. Connector/J is the a Type-IV pure-Java JDBC driver for MySQL. It is suitable for use with MySQL server versions 5.5 and 5.6. MySQL Connector Java is available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html MySQL Connector Java (Commercial) is available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the CHANGES file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.35 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-35.html : Changes in MySQL Connector/J 5.1.35 (2015-03-23) Version 5.1.35 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL server versions 5.5, and 5.6. Functionality Added or Changed * The failover support by Connector/J has been refactored to be implemented independently of Connector/J's load-balancing feature. This resolves a number of issues including, for example, (1) a failover being triggered inadvertently, (2) a failover process kept trying to connect to an unavailable server (while there was an available one), and (3) the number of active connections kept growing until Connector/J threw an exception when there were successive failovers within the same connection. (The issues are regressions of Bug #75168.) (Bug #20533907, Bug #75885) * Connector/J now exposes the PreparedStatment.ParseInfo class for external usage, with no capture of the connection, which allows global, highly-concurrent parse caches to be implemented. * A number of new configuration properties have been introduced: + enabledSSLCipherSuites: For setting the enabled cipher suites used by JSSE. This configuration property needs to be set when using Java 7 or lower or MySQL Server Community edition version 5.7.6 or higher. + readOnlyPropagatesToServer: For controlling the implicit propagation of the read-only transaction access mode to the server, which affects optimization for InnoDB read-only transactions. + noTimezoneConversionForDateType and cacheDefaultTimezone: For improving Connector/J's time zone support; see the changelog entry for Bug #18028319/Bug #71084 below for details. See the descriptions for these properties in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J (http://dev.mysql.com/doc/connector-j/en/connector-j-refe rence-configuration-properties.html) for more details. Bugs Fixed * Issues with a number of the regression tests in the Connector/J test suite caused them to fail when they were run against MySQL 5.7.6. Those tests have now been fixed. (Bug #20606107) * Calling the function Clob.setString() with valid input resulted in a string index out of bounds exception. (Bug #20453712) * Calling the function Clob.position() resulted in an exception, because the function passed the wrong index value to the getSubString() function. (Bug #20453712) * When in streaming mode, if Connector/J encountered an exception while reading from the stream, a subsequent call to the close() method of the result set would put the thread into a blocking state, from which it would not exit. With this fix, the result set can now be properly closed when, due to an error, there is no more data to be loaded from the stream. (Bug #20272931, Bug #75309) * The setTimestamp method failed in a Fabric connection with a null pointer exception. It was because the implementation for the getCalendarInstanceForSessionOrNew method was missing, which has been added by this fix to Connector/J. (Bug #20217686, Bug #75080) * When using JDBC 4 features of Connector/J 5.1 with JDK 6 and above, custom implementations of the interface LoadBalanceExceptionChecker failed to work. This was because most of the JDBC 4-specific classes of Connector/J do not implement a JDBC interface directly, but extend other JDBC 3 classes instead, so that the LoadBalancingConnectionProxy.isInterfaceJdbc() check did not work. This fix makes the checking work by extending its search to include also the super classes. (Bug #20204783, Bug #75168) * The readRemainingMultiPackets method in the MysqlIO class returned incorrect results when a row was larger than 16MB in size. This fix corrects the wrong type conversion occurred during the calculation, which caused the problem. (Bug #20112694
MySQL Connector/J 5.1.31 has been released
Hello all, MySQL Connector/J 5.1.31, a maintenance release of the production 5.1 branch has been released. Connector/J is the Type-IV pure-Java JDBC driver for MySQL. Version 5.1.31 is suitable for use with many MySQL server versions, including 4.1, 5.0, 5.1, 5.4, 5.5 and 5.6. MySQL Connector Java (Commercial) is already available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the CHANGES file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.31 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-31.html : Functionality Added or Changed (2014-06-07) * Added support for sha256_password authentication with RSA encryption. Bugs Fixed * The option name gatherPerfMetrics in the fullDebug.properties file was misspelled as gatherPerMetrics. That resulted in the performance metrics not being logged. The name has been corrected in both the file and the Connector/J manual. (Bug #18598665, Bug #72326) * The MySQL Fabric driver did not properly propagate exceptions thrown during connection creation using JDBC 4. (Bug #18549472, Bug #72301) * In the method MysqlIO.unpackBinaryResultSetRow, an array was created unnecessarily to hold the null bit mask. With this fix, Connector/J avoids the creation of the array by making use of the data that is still variable in the original buffer object. (Bug #18403456, Bug #72023) * When trying to get an integer from a column value that was not a number, instead of a NumberFormatException , an ArrayIndexOutOfBoundsException was thrown instead due to an off-by-one error. This fix corrects the stop condition for trimming spaces in the beginning of byte buffers in the getShort(), getInt(), and getLong() methods in the StringUtils class. (Bug #18402873, Bug #72000) * In the method PreparedStatement.ParseInfo, a character array was created unnecessarily out of a string object. This fix removed the unnecessary instantiation of the array. (Bug #18403199, Bug #72006) * The StringUtils.getBytes methods have been refactored to avoid unnecessary creations of string objects for encoding character arrays into bytes. Also, unneeded StringBuffers are replaced by StringBuiders. (Bug #18389973, Bug #72008) * When exception interceptors were used, the init() method was called twice for each exception interceptor, once by Util.loadExtensions() and again by ConnectionImpl.ExceptionInterceptorChain.init(). This fix eliminates the calls by ExceptionInterceptorChain.init(). (Bug #18318197, Bug #71850) * After a non-SSL socket had been transformed into an SSL socket, Connection was still keeping its reference to the wrapped, non-SSL socket, failing to recognize that the type of connection had been changed. This fix creates a new StandardSSLSocketFactory class, which implements SocketFactory and wraps the initial SocketFactory.afterHandshake() method. MysqlIO.socketFactory was replaced after the socket transformation, so that afterHandshake() is performed on the old factory but returns the new socket. (Bug #18260918, Bug #71753) * When rewriteBatchedStatements=true and useAffectedRows=true were set, executeBatch() returned the number of affected rows as given by the server, which was not a reliable value unless it was a 0. That behavior was due to the fix for Bug#68562, which was implemented in Connector/J 5.1.27 (see the changelog for the release (http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-27. html)), and has been breaking a number of applications that use Connector/J. In this new fix, Connector/J returns Statement.SUCCESS_NO_INFO as a result for each statement in the batch as long as there are more than one batched statement and the returned value for the affected rows from the server is greater than 0. Connector/J returns a 0 otherwise, which indicates that no rows have been affected. (Bug #18009254, Bug #61213) * If profileSQL was enabled, a memory leak would occur after a connection was lost and continuous attempts were made to reconnect. It was because ProfilerEventHandlerFactory kept a map in which dead connections kept on accumulating. This fix refactors the ProfilerEventHandlerFactory and eliminates that map. (Bug #16737192, Bug #55680) * When useCursorFetch was set to true, Connector/J would attempt to send XA commands as server prepared statements, which were unsupported, and the commands would have to be resent as plain statements. This fix stops Connector/J from sending XA commands as server prepared statements. (Bug
MySQL Connector/J 5.1.30 has been released
Hello all, MySQL Connector/J 5.1.30, a maintenance release of the production 5.1 branch has been released. Connector/J is the Type-IV pure-Java JDBC driver for MySQL. Version 5.1.30 is suitable for use with many MySQL server versions, including 4.1, 5.0, 5.1, 5.4, 5.5 and 5.6. MySQL Connector Java (Commercial) is already available for download on the My Oracle Support (MOS) website. This release will be available on eDelivery (OSDC) in next month's upload cycle. As always, we recommend that you check the CHANGES file in the download archive to be aware of changes in behavior that might affect your application. MySQL Connector/J 5.1.30 includes the following general bug fixes and improvements, also available in more detail on http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-30.html : Changes in MySQL Connector/J 5.1.30 (2014-03-31) Functionality Added or Changed * Connector/J now supports MySQL Fabric. See Using Connector/J with MySQL Fabric (http://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-fabric.html) for details. Bugs Fixed * Replaced a for loop with the System.arraycopy() method for copying array values in the MysqlIO.unpackNativeEncodedColumn() and LoadBalancingConnectionProxy.addHost() methods, in order to improve the two methods' performance. (Bug #18327245, Bug #71861) * Avoided the use of an iterator over the list of statement interceptors in the methods MysqlIO.invokeStatementInterceptorsPost() and MysqlIO.invokeStatementInterceptorsPre(), so that Connector/J does not increase the stack size unnecessarily. (Bug #18236388, Bug #71679) * Improved on the code for integer-to-hex conversion when building XA commands by avoiding the creation of temporary character arrays, thus enhancing performance. (Bug #18228302, Bug #71621) * The Field.getStringFromBytes() method created a useless byte array when using JVM's converter and the encoding defined by the connection. This fix makes the method call StringUtils.toString() using the original buffer instead of creating a temporary byte array for the call. (Bug #18228668, Bug #71623) * There were sporadic cases of the key store file being open hundreds of times and causing some Too many files open errors. This fix makes sure that in com.mysql.jdbc.ExportControlled and in MysqlIO.sendFileToServer(), the input stream for the key store file is explicitly closed after use. (Bug #18107621, Bug #71432) * It was intended that if a previous query on a connection had used the setMaxRows() method, in the next query, Connector/J would not cancel that by setting SQL_SELECT_LIMIT=DEFAULT if the query contained a LIMIT clause. However, in the actual implementation, the maximum row setting was reused in the subsequent query in various situations beyond expectation (for example, when a table name contains the string limit in it). This fix removes the LIMIT-clause parsing and replaces it by a better way of controlling the maximum rows per session. (Bug #18110320, Bug #71396) * When working with MySQL 5.6, calling PreparedStatement.setTimestamp() resulted in a java.lang.StringIndexOutOfBoundsException being thrown if the Timestamp contained a fractional second. This fix corrects the digit truncation performed in the formatNanos() method, which was the cause of the problem. (Bug #18091639) * Calling ResultSet.close() on an already closed ResultSet caused an SQLException. While the exception was silently discarded, it did result in performance issues. This fix makes Connector/J comply with the Java specification that when a ResultSet object is already closed, application of the close method on it should be a no-op. (Bug #16722637, Bug #67318) * Fixed the problem of the wrong source being provided when the build property com.mysql.jdbc.noCryptoBuild was set. Thanks, On behalf of Oracle/MySQL Build Team, Murthy Narkedimilli -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
MySQL Connector/J 5.1.6 Has Been Released!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.1.6, a maintenance release of the production 5.1 branch has been released. Connector/J is the Type-IV pure-Java JDBC driver for MySQL. Version 5.1.6 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 RC or the MySQL-6.0 development release. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log http://dev.mysql.com/doc/refman/5.0/en/cj-news.html and Upgrading sections http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html in the manual before upgrading as well as the CHANGES file in the download archive to be aware of changes in behavior that might affect your application. We welcome and appreciate your feedback, bug reports, bug fixes, patches etc.: http://forge.mysql.com/wiki/Contributing MySQL Connector/J 5.1.6 includes the following changes: - JDBC-4.0-ized XAConnections and datasources. - Fixed BUG#31790 MysqlValidConnectionChecker doesn't properly handle ReplicationConnection - Fixed Bug#20491 - DatabaseMetadata.getColumns() doesn't return correct column names if connection character set isn't UTF-8. (There was a server-side component of this that was fixed late in the 5.0 development cycle, it seems, this is the last piece that fixes some loose ends in the JDBC driver). This fix touches *all* metadata information coming from the MySQL server itself. - Fixed MysqlIO.nextRowFast() to only attempt to read server warning counts and status if talking to a 4.1 or newer server (fixes a hang when reading data from 4.0 servers). - Made profiler event handling extensible via the profilerEventHandler connection property. - Fixed Bug#31823 - CallableStatement.setNull() on a stored function would throw an ArrayIndexOutOfBounds when setting the last parameter to null when calling setNull(). - Added SSL-related configuration property verifyServerCertificate. If set to false, the driver won't verify the server's certificate when useSSL is set to true. When using this feature, the keystore parameters should be secified by the clientCertificateKeyStore* properties, rather than system properties, as the JSSE doesn't make it straightforward to have a non-verifying trust store and the default key store. - Fixed ResultSetMetadata.getColumnName() for result sets returned from Statement.getGeneratedKeys() - it was returning null instead of GENERATED_KEY as in 5.0.x. - More applicable fix for the random load balance strategy in the face of node non-responsive, it re-tries a *different* random node, rather than waiting for the node to recover (for BUG#31053) - Fixed BUG#32577 - no way to store two timestamp/datetime values that happens over the DST switchover, as the hours end up being the same when sent as the literal that MySQL requires. Note that to get this scenario to work with MySQL (since it doesn't support per-value timezones), you need to configure your server (or session) to be in UTC, and tell the driver not to use the legacy date/time code by setting useLegacyDatetimeCode to false. This will cause the driver to always convert to/from the server and client timezone consistently. This bug fix also fixes BUG#15604, by adding entirely new date/time handling code that can be switched on by useLegacyDatetimeCode being set to false as a JDBC configuration property. For Connector/J 5.1.x, the default is true, in trunk and beyond it will be false (i.e. the old date/time handling code, warts and all will be deprecated). - Fixed BUG#32877 - Load balancing connection using best response time would incorrectly stick to hosts that were down when the connection was first created. We solve this problem with a black list that is used during the picking of new hosts. If the black list ends up including all configured hosts, the driver will retry for a configurable number of times (the retriesAllDown configuration property, with a default of 120 times), sleeping 250ms between attempts to pick a new connection. We've also went ahead and made the balancing strategy extensible. To create a new strategy, implement the interface com.mysql.jdbc.BalanceStrategy (which also includes our standard extension interface), and tell the driver to use it by passing in the class name via the loadBalanceStrategy configuration property. - Fixed BUG#30508 - ResultSet returned by Statement.getGeneratedKeys() is not closed automatically when statement that created it is closed. - Added two new connection properties, selfDestructOnPingSecondsLifetime and selfDestructOnPingMaxOperations
MySQL Connector/J 5.1.5 Has Been Released!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.1.5, the first production release of the 5.1 branch has been released. Connector/J is the Type-IV pure-Java JDBC driver for MySQL. Version 5.1.5 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 RC or the MySQL-6.0 Falcon development release. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log http://dev.mysql.com/doc/refman/5.0/en/cj-news.html and Upgrading sections http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html in the manual before upgrading as well as the CHANGES file in the download archive to be aware of changes in behavior that might affect your application. We welcome and appreciate your feedback, bug reports, bug fixes, patches etc.: http://forge.mysql.com/wiki/Contributing This is the first production release of our implementation of the new JDBC-4.0 API, along with some new performance features. Notice that there was an internal 5.1.4 release which we didn't publish because we wanted to pull in a last-minute update from the 5.0 branch before releasing 5.1 to production. MySQL Connector/J 5.1.5 includes the following new features compared to 5.1.3: - - Added autoSlowLog configuration property, overrides slowQueryThreshold* properties, driver determines slow queries by those that are slower than 5 * stddev of the mean query time (outside the 96% percentile). - - Fixed BUG#28256 - When connection is in read-only mode, queries that are wrapped in parentheses incorrectly identified as DML. The following features are new, compared to the 5.0 series of Connector/J: - - JDBC-4.0 ease-of-development features including auto-registration with the DriverManager via the service provider mechanism, standardized Connection validity checks and categorized SQLExceptions based on recoverability/retry-ability and class of the underlying error. - - JDBC-4.0 standardized unwrapping to interfaces that include vendor extensions. - - Support for JDBC-4.0 XML processing via JAXP interfaces to DOM, SAX and StAX. - - JDBC-4.0 support for setting per-connection client information (which can be viewed in the comments section of a query via SHOW PROCESSLIST on a MySQL server, or can be extended to support custom persistence of the information via a public interface). - - Support for JDBC-4.0 NCHAR, NVARCHAR and NCLOB types. - - 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 it can be influenced (currently experimental). - - Improved connection establishment time by 25% through selective retrieval of server variables. - - Improved ResultSet.getString(). It's now twice as fast, compared to 5.0. - - The 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. This change leads to substantial improvements in memory usage by avoiding copying data or allocating large blocks of memory when using streaming result sets or when dealing with large rows. - - Added experimental support for connection lifecycle interceptors, which enable notifcation of lifecycle events such as connection creation, destruction and transaction demarcation and allow code to be plugged in to influence the behavior of these events, see the source code of related interfaces at http://tinyurl.com/24g28y and http://tinyurl.com/29l4xt for more details. - - The driver will automatically adjust the server 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. (The configuration property is named netTimeoutForStreamingResults, with a unit of seconds, the value '0' means the driver will not try and adjust this value). - - 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. - - Setting rewriteBatchedStatements to true now causes CallableStatements with batched arguments to be re-written in the form CALL
MySQL Connector/J 5.0.8 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.0.8 a new version of the Type-IV all-Java JDBC driver for MySQL has been released. This is a bug fix release for the current production branch of Connector/J. We're releasing version 5.1.5 as a GA today as well, so this is the last planned release of the 5.0 branch unless security or data corruption bugs are reported against 5.0. Version 5.0.8 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 RC or the MySQL-6.0 Falcon development releases. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log http://dev.mysql.com/doc/refman/5.0/en/cj-news.html and Upgrading sections http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html in the manual before upgrading to be aware of changes in behavior that might affect your application. We welcome and appreciate your feedback, bug reports, bug fixes, patches etc.: http://forge.mysql.com/wiki/Contributing - -- Functionality added or changed - -- - - 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? - - Specifying a validation query in your connection pool that starts with /* ping */ _exactly_ will cause the driver to instead send a ping to the server and return a fake result set (much lighter weight), and when using a ReplicationConnection or a LoadBalancedConnection, will send the ping across all active connections. - - XAConnections now start in auto-commit mode (as per JDBC-4.0 specification clarification). - - Driver will now fall back to sane defaults for max_allowed_packet and net_buffer_length if the server reports them incorrectly (and will log this situation at WARN level, since it's actually an error condition). - -- Bugs Fixed - -- - - Fixed BUG#27182 - Connection.getServerCharacterEncoding() doesn't work for servers with version = 4.1. - - Fixed Bug#27412 - cached metadata with PreparedStatement.execute() throws NullPointerException. - - Fixed BUG#27867 - Schema objects with identifiers other than the connection character aren't retrieved correctly in ResultSetMetadata. - - Fixed BUG#27915 - DatabaseMetaData.getColumns() doesn't contain SCOPE_* or IS_AUTOINCREMENT columns. - - Fixed BUG#27916 - UNSIGNED types not reported via DBMD.getTypeInfo(), and capitalization of type names is not consistent between DBMD.getColumns(), RSMD.getColumnTypeName() and DBMD.getTypeInfo(). This fix also ensures that the precision of UNSIGNED MEDIUMINT and UNSIGNED BIGINT is reported correctly via DBMD.getColumns(). - - 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. - - 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. - - Fixed BUG#29106 - Connection checker for JBoss didn't use same method parameters via reflection, causing connections to always seem bad. - - Fixed BUG#29852 - Closing a load-balanced connection would cause a ClassCastException. - - Fixed BUG#30550, executeBatch() would fail with an ArithmeticException and/or NullPointerException when the batch had zero members and rewriteBatchedStatements was set to true for the connection. - - 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. - - Fixed BUG#30851, NPE with null column values when padCharsWithSpace is set to true. - Fixed Bug#30892 setObject(int, Object, int, int) delegate in PreparedStatmentWrapper delegates to wrong method
MySQL Connector/J 5.1.3 RC is available!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.1.3 RC, a new release candidate of the Type-IV pure-Java JDBC driver for MySQL has been released. Version 5.1.3 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-6.0 Falcon alpha release. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log http://dev.mysql.com/doc/refman/5.0/en/cj-news.html and Upgrading sections http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html in the manual before upgrading as well as the CHANGES file in the download archive to be aware of changes in behavior that might affect your application. We welcome and appreciate your feedback, bug reports, bug fixes, patches etc.: http://forge.mysql.com/wiki/Contributing This is the release candidate of our implementation of the new JDBC-4.0 API, along with some new performance features. This release candidate, as any other pre-production release, should not be installed on production level systems or systems with critical data. It is good practice to back up your data before installing any new version of software. Although MySQL has worked very hard to ensure a high level of quality, protect your data by making a backup as you would for any other software pre-production release. MySQL Connector/J 5.1.3 includes the following new feature compared to 5.1.2: * 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. * New methods on com.mysql.jdbc.Statement: setLocalInfileInputStream() and getLocalInfileInputStream(): * setLocalInfileInputStream() sets an InputStream instance that will be used to send datato 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(). * 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. * 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 all updates up-to and including 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. The following features are new, compared to the 5.0 series of Connector/J: * JDBC-4.0 ease-of-development features including auto-registration with the DriverManager via
MySQL Connector/J 5.0.7 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.0.7 a new version of the Type-IV all-Java JDBC driver for MySQL has been released. This is a bug fix release for the current production branch of Connector/J. Version 5.0.7 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-6.0 Falcon development releases. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log http://dev.mysql.com/doc/refman/5.0/en/cj-news.html and Upgrading sections http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html in the manual before upgrading to be aware of changes in behavior that might affect your application. We welcome and appreciate your feedback, bug reports, bug fixes, patches etc.: http://forge.mysql.com/wiki/Contributing - -- Functionality added or changed - -- Setting the configuration parameter useCursorFetch to true for MySQL-5.0+ enables the use of cursors that allow Connector/J to save memory by fetching result set rows in chunks (where the chunk size is set by calling setFetchSize() on a Statement or ResultSet) by using fully-materialized cursors on the server. The driver will will now automatically set useServerPrepStmts to true when useCursorFetch has been set to true, since the feature requires server-side prepared statements in order to function. 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. 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. 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). 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. 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. - -- Bugs Fixed - -- PreparedStatement.getMetaData() for statements containing leading one-line comments is not returned correctly. As part of this fix, we also overhauled detection of DML for executeQuery() and SELECTs for executeUpdate() in plain and prepared statements to be aware of the same types of comments. (Bug#28469) Parser in client-side prepared statements eats character following '/' if it's not a multi-line comment. (Bug#28851) Parser in client-side prepared statements runs to end of statement, rather than end-of-line for '#' comments. Also added support for '--' single-line comments. (Bug#28956) 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
MySQL Connector/J 5.0.6 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.0.6 a new version of the Type-IV all-Java JDBC driver for MySQL has been released. This is a bug fix release for the current production branch of Connector/J. Version 5.0.6 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-6.0 Falcon Preview. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log http://dev.mysql.com/doc/refman/5.0/en/cj-news.html and Upgrading sections http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html in the manual before upgrading to be aware of changes in behavior that might affect your application. We welcome and appreciate your feedback, bug reports, bug fixes, patches etc.: http://forge.mysql.com/wiki/Contributing - - Performance Improvements - - - - Fixed BUG#27655 - Connection.getTransactionIsolation() uses SHOW VARIABLES LIKE which is very inefficient on MySQL-5.0+ - - 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. - - 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. - - 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. - - 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 and touch the insert row no matter what the application does with them. - - 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 ResultSetMetaData.getColumnDisplayWidth() method. - -- Usability Improvements - -- - - Give better error message when
MySQL Connector/J 5.1.0 Alpha has been released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.1.0 a new alpha version of the Type-IV pure-Java JDBC driver for MySQL has been released. Version 5.1.0 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-5.2 Falcon Preview. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.1.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log http://dev.mysql.com/doc/refman/5.0/en/cj-news.html and Upgrading sections http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html in the manual before upgrading to be aware of changes in behavior that might affect your application. We welcome and appreciate your feedback, bug reports, bug fixes, patches etc.: http://forge.mysql.com/wiki/Contributing This is the first pre-production release of our implementation of the new JDBC-4.0 API. This alpha release, as any other pre-production release, should not be installed on production level systems or systems with critical data. It is good practice to back up your data before installing any new version of software. Although MySQL has worked very hard to ensure a high level of quality, protect your data by making a backup as you would for any other software pre-production release. MySQL Connector/J 5.1.0 includes the following new features: * JDBC-4.0 ease-of-development features including auto-registration with the DriverManager via the service provider mechanism, standardized Connection validity checks and categorized SQLExceptions based on recoverability/retry-ability and class of the underlying error. * JDBC-4.0 standardized unwrapping to interfaces that include vendor extensions * Support for JDBC-4.0 XML processing via JAXP interfaces to DOM, SAX and StAX * JDBC-4.0 support for setting per-connection client information (which can be viewed in the comments section of a query via SHOW PROCESSLIST on a MySQL server, or can be extended to support custom persistence of the information via a public interface) * Support for JDBC-4.0 NCHAR, NVARCHAR and NCLOB types * The driver will automatically adjust the server 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. (The configuration property is named netTimeoutForStreamingResults, with a unit of seconds, the value '0' means the driver will not try and adjust this value). This release also includes the following bug fixes that are also present in Connector/J 5.0.6 (not yet released): * 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#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#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). * 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#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
MySQL Connector/J 5.0.5 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.0.5 a new version of the Type-IV pure-Java JDBC driver for MySQL has been released. This is a bug fix release for the current production branch of Connector/J. Version 5.0.5 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-5.2 Falcon Preview. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log (http://dev.mysql.com/doc/refman/5.0/en/cj-news.html) and Upgrading sections (http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html) in the manual before upgrading to be aware of changes in behavior that might affect your application. Performance Improvements: * Improved speed of datetime parsing for ResultSets that come from plain or non-server-side prepared statements. If any regressions are noticed, you can enable the old implementation with useFastDateParsing=false as a configuration parameter. * 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. * 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. * Fixed cases where ServerPreparedStatements weren't using cached metadata when cacheResultSetMetadata=true was used. * 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. Functionality added or changed: * Important change: Due to a number of issues with the server's implementation of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way, except for the case where the connection was configured with useTimezone=true. If so, see the bugfix note for useSSPSCompatibleTimezoneShift. To enable server-side prepared statements you must add the following configuration property to your connector string: useServerPrepStmts=true The default value of this property is false (i.e. Connector/J does not use server-side prepared statements, and won't until they've matured). If you have an application that already works well with server-side prepared statements, it is reasonable to enable them. * The rewriteBatchedStatements feature can now be used with server-side prepared statements. * Usage Advisor now detects empty results sets and does not report on columns not referenced in those empty sets. * Usage Advisor will now issue warnings for result sets with large numbers of rows. You can configure the trigger value by using the resultSetSizeThreshold parameter, which has a default value of 100. * 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. * 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 logging of XA commands sent to server, it's now configurable via logXaCommands property (defaults to false). Bugs fixed: * Fixed an issue where XADataSources couldn't be bound into JNDI, as the DataSourceFactory didn't know how to create instances of them. * Calling Statement.cancel() could result in a Null Pointer Exception (NPE). (Bug#24721) * Calendars and timezones are now lazily instantiated when required. (Bug#24351) * Client-side
MySQL Connector/J 3.1.14 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.14, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.14 is a bugfix release for the legacy stable branch that is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0 or MySQL-5.1 beta. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.1.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) This is the second to last planned bug fix release for this branch. We encourage users to consider upgrading as soon as possible to the current production branch of Connector/J, 5.0, available for download at http://dev.mysql.com/downloads/connector/j/5.0.html Best Regards, -Mark - From the changelog: 10-19-06 - Version 3.1.14 - Fixed BUG#20479 - Updatable result set throws ClassCastException 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#16987 - Memory leak with profileSQL=true. - 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#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#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#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 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 satements that have been closed (in asSQL()). - Removed logger autodectection altogether, must now specify logger explicitly 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). - 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#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 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. - Fixed BUG#21814 - time values outside valid range silently wrap. - Fixed bug when calling stored functions, where parameters weren't 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. - -- Mark Matthews MySQL AB, Software Development Manager - Client Connectivity www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (MingW32) iD8DBQFFOPzDtvXNTca6JD8RArD4AJ0Sj3fjDe8kGGLG2zZ6R0d+cHdxXgCeIiJ8 Bp64VqruY45Y2/Uah1YSfmA= =ZVdW -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 5.0.4 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.0.4 a new version of the Type-IV all-Java JDBC driver for MySQL has been released. This is a bugfix release for the current production branch of Connector/J. Version 5.0.4 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0 or MySQL-5.1 beta. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) As always, we recommend that you check the change log (http://dev.mysql.com/doc/refman/5.0/en/cj-news.html) and Upgrading sections (http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html) in the manual before upgrading to be aware of changes in behavior that might affect your application. -Mark - From the change log (notice that this release includes changes and fixes from versions 3.1.14 and the yet-to-be-released 3.1.15 versions): 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 reaking 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. - 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. - 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. - 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. - 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. - 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. nn-nn-06 - Version 3.1.15 - Fixed BUG#23281 - Downed slave caused round-robin load balance to not cycle back to first host in list. 10-19-06 - Version 3.1.14 - Fixed BUG#20479 - Updatable result set throws ClassCastException 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#16987 - Memory leak with profileSQL=true. - 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#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#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#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 calling toString() on ResultSetMetaData for driver-generated (i.e. from DatabaseMetaData method calls, or from getGeneratedKeys()) result sets would raise
MySQL Connector/J 5.0.3 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.0.3 a new version of the Type-IV all-Java JDBC driver for MySQL has been released. This is the first generally-available, production release of Connector/J 5.0. Notice that Connector/J 3.1 has supported all MySQL-5.0 features other than XA, but this is the first generally-available release that synchronizes version numbers with the server (as well as adding support for XA). Version 5.0.3 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0 or MySQL-5.1 beta. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) Please notice that the download archives are larger than before as we're now shipping the output of our JUnit release tests and resultant code coverage in the docs/release-test-output subdirectory. Features/changes of note in this release: * Support for XA distributed transactions via com.mysql.jdbc.jdbc2.optional.MysqlXADataSource which is an implementation of javax.sql.XADataSource. Notice that depending on whether or not your application server re-uses the same physical XAConnection for a given global transaction, you may have to set the datasource configuration parameter pinGlobalTxToPhysicalConnection to true so that the driver itself will maintain this mapping, which also allows the driver to emulate the JOIN clause to XA START, which the server currently does not support natively. Our current testing shows that this configuration parameter is necessary for BEA WebLogic and IBM WebSphere. JBoss has their own configuration parameter for this, track-connection-by-tx, see http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch7.chapt.html#ch7.xaconf.fig for more information). We also recommend that connection pools that will be backing XAConnections should be configured to test connections on reserve/checkout and not let connections stay idle for long periods of time (ideally not at all), due to the current limitations with XA support in the server as listed here: http://dev.mysql.com/doc/refman/5.0/en/xa-restrictions.html * Loosened synchronization to solve a number of deadlock issues in BUG#18719, BUG#18367, BUG#17709 and BUG#15067. The new strategy basically makes Connection instances threadsafe and thus shareable across threads, and anything else threadsafe, but not necessarily shareable across threads due to JDBC API interactions that can cause non-obvious behavior and/or deadlock scenarios to occur since the JDBC API is not designed to be used from multiple threads at once. Therefore, unless external synchronization is provided, clients should not allow multiple threads to share a given statement or result set. Examples of issues with the API itself not being multi-thread suitable include, but are not limited to race conditions between modifiers and execution and retrieval methods on statements and result sets that are not synchronizable such as ResultSet.get*() and traversal methods, or Statement.execute*() closing result sets without effectively making the driver itself serialized across the board. These changes should not have any effect on normal J(2)EE use cases where only one thread ever uses a connection instance and the objects created by it. * Implementation of Statement.cancel() and Statement.setQueryTimeout(). Both methods require MySQL-5.0.0 or newer server, require a separate connection to issue the KILL QUERY command, and in the case of setQueryTimeout() the driver will create a separate thread should the timer to cancel the query fire to actually login to the server and cancel the statement. * Added support for Connector/MXJ integration via url subprotocol jdbc:mysql:mxj://. As always, we recommend that you check the change log (http://dev.mysql.com/doc/refman/5.0/en/cj-news.html) and Upgrading sections (http://dev.mysql.com/doc/refman/5.0/en/cj-upgrading.html) in the manual before upgrading to be aware of changes in behavior that might affect your application. -Mark - - From the change log (this release includes changes and fixes from versions 3.1.13 and 3.1.14): 07-26-06 - Version 5.0.3 - Fixed BUG#20650 - Statement.cancel() causes NullPointerException if underlying connection has been closed due to server failure. - Added configuration option noAccessToProcedureBodies which will cause the driver to create basic parameter metadata (all parameters reported as VARCHAR(65535) IN/OUT and not named) for CallableStatements when the user does not have access to procedure bodies via SHOW CREATE PROCEDURE or selecting from mysql.proc instead of throwing
MySQL Connector/J 5.0.2 Beta Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.0.2 Beta, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. This is the last planned beta release of this branch of the driver. Please notice that version 5.0.1 wasn't released due to a last-minute packaging error. Version 5.0.2 is a release for the development branch that is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0 or MySQL-5.1 beta. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) Please notice that the download archives are larger than before as we're now shipping the output of our JUnit release tests and resultant code coverage in the docs/release-test-output subdirectory. -Mark - From the changelog (this release includes changes and fixes from versions 3.1.13 and 3.1.14): 07-11-06 - Version 5.0.2-beta - Fixed BUG#17401 - Can't use XAConnection for local transactions when no global transaction is in progress. - Fixed BUG#18086 - Driver fails on non-ASCII platforms. The driver was assuming that the platform character set would be a superset of MySQL's latin1 when doing the handshake for authentication, and when reading error messages. We now use Cp1252 for all strings sent to the server during the handshake phase, and a hard-coded mapping of the language server variable to the character set that 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. - 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. - 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. nn-nn-06 - Version 3.1.14 - Fixed BUG#20479 - Updatable result set throws ClassCastException 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#16987 - Memory leak with profileSQL=true. - 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#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. 05-26-05 - Version 3.1.13 - Fixed BUG#15464 - INOUT parameter does not store IN value. - Fixed BUG#14609 - Exception thrown for new decimal type when using updatable result sets. - Fixed BUG#15544, no dos character set in MySQL 4.1.0 - Fixed BUG#15383 - PreparedStatement.setObject() serializes BigInteger as object, rather than sending as numeric value (and is thus not complementary to .getObject() on an UNSIGNED LONG type). - Fixed BUG#11874 - ResultSet.getShort() for UNSIGNED TINYINT returned wrong values. - Fixed BUG#15676 - lib-nodist directory missing from package breaks out-of-box build - Fixed BUG#15854 - DBMD.getColumns() returns wrong type for BIT. - Fixed BUG#14938 - Unable to initialize character set mapping tables. Removed reliance on .properties files to hold this information, as it turns out to be too
MySQL Connector/J 3.1.13 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.13, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.13 is a bugfix release for the stable branch that is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0 or MySQL-5.1 beta. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) Please notice that the download archives are larger than before as we're now shipping the output of our JUnit release tests, and code coverage in the docs/release-test-output subdirectory. -Mark - From the changelog: 05-26-05 - Version 3.1.13 - Fixed BUG#15464 - INOUT parameter does not store IN value. - Fixed BUG#14609 - Exception thrown for new decimal type when using updatable result sets. - Fixed BUG#15544, no dos character set in MySQL 4.1.0 - Fixed BUG#15383 - PreparedStatement.setObject() serializes BigInteger as object, rather than sending as numeric value (and is thus not complementary to .getObject() on an UNSIGNED LONG type). - Fixed BUG#11874 - ResultSet.getShort() for UNSIGNED TINYINT returned wrong values. - Fixed BUG#15676 - lib-nodist directory missing from package breaks out-of-box build - Fixed BUG#15854 - DBMD.getColumns() returns wrong type for BIT. - Fixed BUG#14938 - Unable to initialize character set mapping tables. Removed reliance on .properties files to hold this information, as it turns out to be too problematic to code around class loader hierarchies that change depending on how an application is deployed. Moved information back into the CharsetMapping class. - Fixed BUG#16841 - updatable result set doesn't return AUTO_INCREMENT values for insertRow() when multiple column primary keys are used. (the driver was checking for the existence of single-column primary keys and an autoincrement value 0 instead of a straightforward isAutoIncrement() check). - Fixed BUG#17099 - Statement.getGeneratedKeys() throws NullPointerException when no query has been processed. - Fixed BUG#13469 - Driver tries to call methods that don't exist on older and newer versions of Log4j. The fix is not trying to auto-detect presense of log4j, too many different incompatible versions out there in the wild to do this reliably. If you relied on autodetection before, you will need to add logger=com.mysql.jdbc.log.Log4JLogger to your JDBC URL to enable Log4J usage, or alternatively use the new CommonsLogger class to take care of this. - Added support for Apache Commons logging, use com.mysql.jdbc.log.CommonsLogger as the value for the logger configuration property. - LogFactory now prepends com.mysql.jdbc.log to log class name if it can't be found as-specified. This allows you to use short names for the built-in log factories, for example logger=CommonsLogger instead of 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. - 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. - 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. - 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. - 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. - Fixed BUG
MySQL Connector/J 5.0.0 Beta Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.0.0 Beta, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. You will notice that there is a new version numbering scheme for this release that more closely aligns with the server version that the JDBC driver is intended to be used with. You will soon see new base version numbers for all new connectivity libraries released by MySQL, including Connector/Net, Connector/ODBC and Connector/MXJ. Hopefully this will help alleviate the common question of Which driver version should I use with my MySQL server?. Version 5.0.0 is a development release based on code from the stable tree. It is essentially Connector/J 3.1.13 with support for XA back ported from the Connector/J 3.2 branch, as well as some internal refactorings to support JDBC-4.0 features. New features that are included: * Support for Connector/MXJ integration via url subprotocol jdbc:mysql:mxj://. * XA Distributed Transactions via the com.mysql.jdbc.jdbc2.optional.MysqlXADataSource implementation of javax.sql.XADataSource. * Statement.cancel() and Statement.setQueryTimeout(). Connector/J 5.0.0 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0 or MySQL-5.1. We expect that Connector/J 5.0 will soon stabilize, as the majority of the codebase is from Connector/J 3.1 which is a generally available release, with largely non-disruptive new functionality added (namely XA) to the 5.0 codebase (which is also why this is a beta release out of the gate). It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) -Mark - From the changelog: 12-23-05 - Version 5.0.0-beta - - XADataSource implemented (ported from 3.2 branch which won't be released as a product). Use com.mysql.jdbc.jdbc2.optional.MysqlXADataSource as your datasource class name in your application server to utilize XA transactions in MySQL-5.0.10 and newer. - - PreparedStatement.setString() didn't work correctly when sql_mode on server contained NO_BACKSLASH_ESCAPES, and no characters that needed escaping were present in the string. - - Attempt detection of the MySQL type BINARY (it's an alias, so this isn't always reliable), and use the java.sql.Types.BINARY type mapping for it. - - Moved -bin-g.jar file into separate debug subdirectory to avoid confusion. - - Don't allow .setAutoCommit(true), or .commit() or .rollback() on an XA-managed connection as-per the JDBC specification. - - If the connection useTimezone is set to true, then also respect timezone conversions in escape-processed string literals (e.g. {ts ...} and {t ...}). - - Return original column name for RSMD.getColumnName() if the column was aliased, alias name for .getColumnLabel() (if aliased), and original table name for .getTableName(). Note this only works for MySQL-4.1 and newer, as older servers don't make this information available to clients. - - Setting useJDBCCompliantTimezoneShift=true (it's not the default) causes the driver to use GMT for _all_ TIMESTAMP/DATETIME timezones, and the current VM timezone for any other type that refers to timezones. This feature can not be used when useTimezone=true to convert between server and client timezones. - - Add one level of indirection of internal representation of CallableStatement parameter metadata to avoid class not found issues on JDK-1.3 for ParameterMetadata interface (which doesn't exist prior to JDBC-3.0). - - Added unit tests for XADatasource, as well as friendlier exceptions for XA failures compared to the stock XAException (which has no messages). - - Fixed BUG#14279 - Idle timeouts cause XAConnections to whine about rolling themselves back - - Added support for Connector/MXJ integration via url subprotocol jdbc:mysql:mxj://. - - Removed Java5-specific calls to BigDecimal constructor (when result set value is '', (int)0 was being used as an argument in-directly via method return value. This signature doesn't exist prior to Java5.) - - Moved all SQLException creation to a factory method in SQLError, groundwork for JDBC-4.0 SQLState class-based exceptions. - - Added service-provider entry to META-INF/services/java.sql.Driver for JDBC-4.0 support. - - Return [VAR]BINARY for RSMD.getColumnTypeName() when that is actually the type, and it can be distinguished (MySQL-4.1 and newer). - - When fix for BUG#14562 was merged from 3.1.12, added functionality for CallableStatement's parameter metadata to return correct information for .getParameterClassName(). - - Fuller synchronization of Connection to avoid deadlocks when using multithreaded frameworks that multithread a single connection (usually not recommended, but the JDBC spec allows
MySQL Connector/J 3.1.9 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.9, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.9 is the latest production release of the 3.1 series that is suitable for use with all versions of MySQL, including MySQL-4.1 or MySQL-5.0. Connector/J 3.1.9 is required if you want to use server-side prepared statements with MySQL-4.1.2 or newer, or CallableStatements with MySQL-5.0. Sources and binaries are now available from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.1.html as well as mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) If you are upgrading from Connector/J 3.0, or are upgrading from MySQL-4.0 to MySQL-4.1 or 5.0, please make sure to check out the 'Upgrades' section in the documentation that comes with the driver, or available on the web site at http://dev.mysql.com/doc/connector/j/en/cj-upgrading-3-0-to-3-1.html -Mark - From the changelog: 06-22-05 - Version 3.1.9-stable - 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. - Fixed BUG#9064 - com.mysql.jdbc.PreparedStatement.ParseInfo does unnecessary call to toCharArray(). - 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. - 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#10155, double quotes not recognized when parsing client-side prepared statements. - 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 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. - 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#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. - 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. - Added
MySQL Connector/J 3.0.17 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.17, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.0.17is a bugfix release for the stable tree that is suitable for use with any MySQL version including MySQL-4.1 or MySQL-5.0 (although it provides minimal 'new' functionality with MySQL-4.1 or MySQL-5.0, users connecting to MySQL-4.1 or 5.0 should be using Connector/J 3.1.x). It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) -Mark - From the changelog: 06-22-05 - Version 3.0.17-ga - 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. - 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. - 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#6966, connections starting up failed-over (due to down master) never retry master. - Fixed BUG#7061, PreparedStatement.fixDecimalExponent() adding extra '+', making number unparseable by MySQL server. - Fixed BUG#7686, Timestamp key column data needed _binary' stripped for UpdatableResultSet.refreshRow(). - Backported SQLState codes mapping from Connector/J 3.1, enable with 'useSqlStateCodes=true' as a connection property, it defaults to 'false' in this release, so that we don't break legacy applications (it defaults to 'true' starting with Connector/J 3.1). - Fixed BUG#7601, PreparedStatement.fixDecimalExponent() adding extra '+', making number unparseable by MySQL server. - Escape sequence {fn convert(..., type)} now supports ODBC-style types that are prepended by 'SQL_'. - Fixed duplicated code in configureClientCharset() that prevented useOldUTF8Behavior=true from working properly. - Handle streaming result sets with 2 billion rows properly by fixing wraparound of row number counter. - Fixed BUG#7607 - MS932, SHIFT_JIS and Windows_31J not recog. as aliases for sjis. - Fixed BUG#6549 (while fixing #7607), adding 'CP943' to aliases for sjis. - Fixed BUG#8064, which requires hex escaping of binary data when using multibyte charsets with prepared statements. - Fixed BUG#8812, NON_UNIQUE column from DBMD.getIndexInfo() returned inverted value. - Workaround for server BUG#9098 - default values of CURRENT_* for DATE/TIME/TIMESTAMP/TIMESTAMP columns can't be distinguished from 'string' values, so UpdatableResultSet.moveToInsertRow() generates bad SQL for inserting default values. - Fixed BUG#8629 - 'EUCKR' charset is sent as 'SET NAMES euc_kr' which MySQL-4.1 and newer doesn't understand. - DatabaseMetaData.supportsSelectForUpdate() returns correct value based on server version. - Use hex escapes for PreparedStatement.setBytes() for double-byte charsets including 'aliases' Windows-31J, CP934, MS932. - Added support for the EUC_JP_Solaris character encoding, which maps to a MySQL encoding of eucjpms (backported from 3.1 branch). This only works on servers that support eucjpms, namely 5.0.3 or later. - -- Mark Matthews MySQL AB, Software Development Manager - Client Connectivity www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuZe7tvXNTca6JD8RAjFpAJsE551UG0OGNftW78r0JZiPaIIQhwCeM4rA xEl/cfq+xSkgmKugLlthaG0= =L+Wi -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.1.10 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.10, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. This has been released shortly after 3.1.9 to fix the following issue that we noticed after release: - - Fixed connecting without a database specified raised an exception in MysqlIO.changeDatabaseTo(). We apologize to those of you that make connections without specifying a database, as this would've caused problems for you :( -Mark - -- Mark Matthews MySQL AB, Software Development Manager - Client Connectivity www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuicMtvXNTca6JD8RAuS2AKCMO+xk2tokuy6yPcLH0ZXXth85RACdGuHW S1A28upvYDFZ9yhjvMf7F9Q= =7Be1 -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.1.7 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.7, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.7 is the latest production release of the 3.1 series that is suitable for use with all versions of MySQL, including MySQL-4.1 or MySQL-5.0. Connector/J 3.1.7 is required if you want to use server-side prepared statements with MySQL-4.1.2 or newer, or CallableStatements with MySQL-5.0. Sources and binaries are now available from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.1.html as well as mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) If you are upgrading from Connector/J 3.0, or are upgrading from MySQL-4.0 to MySQL-4.1, please make sure to check out the 'Upgrades' section in the documentation that comes with the driver, or available on the web site at http://dev.mysql.com/doc/connector/j/en/cj-upgrading-3-0-to-3-1.html -Mark - From the changelog: 02-18-05 - Version 3.1.7-stable - Fixed BUG#7686, Timestamp key column data needed _binary' stripped for UpdatableResultSet.refreshRow(). - Fixed BUG#7715 - Timestamps converted incorrectly to strings with Server-side prepared statements and updatable result sets. - Detect new sql_mode variable in string form (it used to be integer) and adjust quoting method for strings appropriately. - Added 'holdResultsOpenOverStatementClose' property (default is false), that keeps result sets open over statement.close() or new execution on same statement (suggested by Kevin Burton). - Fixed BUG#7952 -- Infinite recursion when 'falling back' to master in failover configuration. - Disable multi-statements (if enabled) for MySQL-4.1 versions prior to version 4.1.10 if the query cache is enabled, as the server returns wrong results in this configuration. - Fixed duplicated code in configureClientCharset() that prevented useOldUTF8Behavior=true from working properly. - Removed 'dontUnpackBinaryResults' functionality, the driver now always stores results from server-side prepared statements as-is from the server and unpacks them on demand. - Fixed BUG#8096 where emulated locators corrupt binary data when using server-side prepared statements. - Fixed synchronization issue with ServerPreparedStatement.serverPrepare() that could cause deadlocks/crashes if connection was shared between threads. - By default, the driver now scans SQL you are preparing via all variants of Connection.prepareStatement() to determine if it is a supported type of statement to prepare on the server side, and if it is not supported by the server, it instead prepares it as a client-side emulated prepared statement (BUG#4718). You can disable this by passing 'emulateUnsupportedPstmts=false' in your JDBC URL. - Remove _binary introducer from parameters used as in/out parameters in CallableStatement. - Always return byte[]s for output parameters registered as *BINARY. - Send correct value for 'boolean' true to server for PreparedStatement.setObject(n, true, Types.BIT). - Fixed bug with Connection not caching statements from prepareStatement() when the statement wasn't a server-side prepared statement. - Choose correct 'direction' to apply time adjustments when both client and server are in GMT timezone when using ResultSet.get(..., cal) and PreparedStatement.set(, cal). - Added 'dontTrackOpenResources' option (default is false, to be JDBC compliant), which helps with memory use for non-well-behaved apps (i.e applications which don't close Statements when they should). - Fixed BUG#8428 - ResultSet.getString() doesn't maintain format stored on server, bug fix only enabled when 'noDatetimeStringSync' property is set to 'true' (the default is 'false'). - Fixed NPE in ResultSet.realClose() when using usage advisor and result set was already closed. - Fixed BUG#8487 - PreparedStatements not creating streaming result sets. - Don't pass NULL to String.valueOf() in ResultSet.getNativeConvertToString(), as it stringifies it (i.e. returns null), which is not correct for the method in question. - Fixed BUG#8484 - ResultSet.getBigDecimal() throws exception when rounding would need to occur to set scale. The driver now chooses a rounding mode of 'half up' if non-rounding BigDecimal.setScale() fails. - Added 'useLocalSessionState' configuration property, when set to 'true' the JDBC driver trusts that the application is well-behaved and only sets autocommit and transaction isolation levels using the methods
MySQL Connector/J 3.1.6 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.6, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.6 is the first production release of the 3.1 series that is suitable for use with all versions of MySQL, including MySQL-4.1 or MySQL-5.0. Connector/J 3.1.6 is required if you want to use server-side prepared statements MySQL-4.1.2 or newer, or CallableStatements with MySQL-5.0. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.1.html as well as mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) If you are upgrading from Connector/J 3.0, or are upgrading from MySQL-4.0 to MySQL-4.1, please make sure to check out the 'Upgrades' section in the documentation that comes with the driver, or available on the web site at http://dev.mysql.com/doc/connector/j/en/#id2424819 Connector/J 3.0 will be maintained for the immediate future, however only critical bug fixes will be applied to it. -Mark - From the changelog: 12-23-04 - Version 3.1.6-stable - Fixed hang on SocketInputStream.read() with Statement.setMaxRows() and multiple result sets when driver has to truncate result set directly, rather than tacking a 'LIMIT n' on the end of it. - Fixed BUG#7026 - DBMD.getProcedures() doesn't respect catalog parameter. - -- Mark Matthews MySQL AB, Software Development Manager - Client Connectivity www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB5BkqtvXNTca6JD8RAv7jAKCYwuWUAm6M18FM7LqzT1bTk9VdYwCgoCCe oowGxH53JyhvVeyaCKtdHzY= =oQTL -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.2.0 Alpha Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.2.0, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.2.0 is the first ALPHA release of the 3.2 series that is suitable for use with all versions of MySQL, including MySQL-4.1 or MySQL-5.0. Connector/J 3.2.0 is required if you want to use the new batched fetching capability of MySQL-5.0 when using prepared statements. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.2.html as well as mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) If you are upgrading from Connector/J 3.0, or are upgrading from MySQL-4.0 to MySQL-4.1, please make sure to check out the 'Upgrades' section in the documentation that comes with the driver, or available on the web site at http://dev.mysql.com/doc/connector/j/en/#id2424819 Connector/J 3.1 is the current production series of drivers, as was announced earlier. -Mark - From the changelog: 12-23-04 - Version 3.2.0-alpha - - Fixed incorrect return values from DatabaseMetaData.supportsCatalogIn*(). - - Support for 'cursor' based result sets when using ServerPreparedStatements and MySQL 5.0 or newer. Result set needs to be forward-only, and a non-zero fetch size for this feature to be enabled. - - Refactoring of where logic for prepared statement, server-prepared statement lives. - -- Mark Matthews MySQL AB, Software Development Manager - Client Connectivity www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB5B3EtvXNTca6JD8RArYAAJ9N4p4CQ1fHVW7Mh+aJ6BtzjURT6QCfTfqw BH3m+IgmH66PWJbb1EIAWwc= =/kSb -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.0.16 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.16, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.0.16 is a bugfix release for the stable tree that is suitable for use with any MySQL version including MySQL-4.1 or MySQL-5.0 (although it provides minimal 'new' functionality with MySQL-4.1 or MySQL-5.0, users connecting to MySQL-4.1 or 5.0 should be using Connector/J 3.1.x). It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) -Mark - From the changelog: 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. - 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 throws ArrayOutOfBoundsException. - Fixed DatabaseMetaData.getTypes() returning incorrect (i.e. non-negative) scale for the 'NUMERIC' type. - Fixed BUG#6198, off-by-one bug in Buffer.readString(string). - Made TINYINT(1) - BIT/Boolean conversion configurable via 'tinyInt1isBit' property (default 'true' to be JDBC compliant out of the box). - Only set 'character_set_results' during connection establishment if server version = 4.1.1. - Fixed regression where useUnbufferedInput was defaulting to 'false'. - Fixed BUG#6231, ResultSet.getTimestamp() on a column with TIME in it fails. - -- Mark Matthews MySQL AB, Software Development Manager - Client Connectivity Office: +1 708 332 0507 www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBo9GgtvXNTca6JD8RAu/JAKCqk41l3U4YWd7qlBU3/bLC/QTEjACcC49l Plr24IF4Ex93baUeVcKgu1o= =YXAA -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.0.15 Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.15, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.0.15 is a bugfix release for the stable tree that is suitable for use with any MySQL version including MySQL-4.1 or MySQL-5.0. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) -Mark - From the changelog: 09-04-04 - Version 3.0.15-ga - - 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 public Socket connect(String host, int portNumber, Properties props) 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(). - - Removed redundant calls to checkRowPos() in ResultSet. - - Fixed BUG#4742, 'DOUBLE' mapped twice in DBMD.getTypeInfo(). - - Added FLOSS license exemption. - - 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. - - '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). - - 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(). - - 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. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBOUjptvXNTca6JD8RAsyUAKCNLB89dCUMySd1JC8GiLH0etYzNACdFlAI gFoH/CtfJWavteVddkyb12s= =UrYJ -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.1.4 BETA Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.4, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.4 is the second (and last planned before GAMMA) BETA release of the 3.1 series that is suitable for use with either MySQL-4.1 or MySQL-5.0 (and is required when using server-side prepared statements on MySQL-4.1.2 or newer). It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.1.html as well as mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) Please take the time to file any bugs you might encounter (hopefully none!) at http://bugs.mysql.com/ ... We're particularly interested in any issues you might have with this release and MySQL-4.1.4 with respect to server-side prepared statements in 4.1, stored procedures in 5.0 and access to VIEW-level metadata in 5.0. Regards, -Mark - From the changelog: 09-04-04 - Version 3.1.4-beta - - Fixed BUG#4510 - connector/j 3.1.3 beta does not handle integers correctly (caused by changes to support unsigned reads in Buffer.readInt() - Buffer.readShort()). - - Added support in DatabaseMetaData.getTables() and getTableTypes() for VIEWs which are now available in MySQL server version 5.0.x. - - Fixed BUG#4642 -- ServerPreparedStatement.execute*() sometimes threw ArrayIndexOutOfBoundsException when unpacking field metadata. - - Optimized integer number parsing, enable 'old' slower integer parsing using JDK classes via 'useFastIntParsing=false' property. - - Added 'useOnlyServerErrorMessages' property, which causes message text in exceptions generated by the server to only contain the text sent by the server (as opposed to the SQLState's 'standard' description, followed by the server's error message). This property is set to 'true' by default. - - Fixed BUG#4689 - ResultSet.wasNull() does not work for primatives if a previous null was returned. - - Track packet sequence numbers if enablePacketDebug=true, and throw an exception if packets received out-of-order. - - Fixed BUG#4482, ResultSet.getObject() returns wrong type for strings when using prepared statements. - - Calling MysqlPooledConnection.close() twice (even though an application error), caused NPE. Fixed. - - Fixed BUG#5012 -- ServerPreparedStatements dealing with return of DECIMAL type don't work. - - 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) - - You can now use URLs in 'LOAD DATA LOCAL INFILE' statements, and the driver will use Java's built-in handlers for retreiving the data and sending it to the server. This feature is not enabled by default, you must set the 'allowUrlInLocalInfile' connection property to 'true'. - - The driver is more strict about truncation of numerics on ResultSet.get*(), and will throw a SQLException when truncation is detected. You can disable this by setting 'jdbcCompliantTruncation' to false (it is enabled by default, as this functionality is required for JDBC compliance). - - Added three ways to deal with all-zero datetimes when reading them from a ResultSet, 'exception' (the default), which throws a SQLException with a SQLState of 'S1009', 'convertToNull', which returns NULL instead of the date, and 'round', which rounds the date to the nearest closest value which is '0001-01-01'. - - Fixed ServerPreparedStatement to read prepared statement metadata off the wire, even though it's currently a placeholder instead of using MysqlIO.clearInputStream() which didn't work at various times because data wasn't available to read from the server yet. This fixes sporadic errors users were having with ServerPreparedStatements throwing ArrayIndexOutOfBoundExceptions. - - Use com.mysql.jdbc.Message's classloader when loading resource bundle, should fix sporadic issues when the caller's classloader can't locate the resource bundle. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBOUoItvXNTca6JD8RAso9AJsH161w0Y5lzc1UzC+4IKwYIsGuBwCgtnTN +vCNiaYS2JuOee1Cty4bJG0= =CZJU -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Default username and pw for MySQL Connector/J
Hi everyone, Is there a standard way to specify a default user name and password for the java driver? For example, will it recognize .my.cnf like most mysql clinets do? Thanks, Sergei Sergei, No there is not. It must be passed in on the command line. Of course your application(s) could always read a 'standard' configuration properties file and add that. Connector/J can't read my.cnf because in many (most) cases, security restrictions prevent JDBC drivers from reading or creating files. -Mark -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Default username and pw for MySQL Connector/J
The JDBC driver will not recognize the my.cnf file. -Original Message- From: Sergei Skarupo To: Mysql List (E-mail) Sent: 8/3/04 10:51 PM Subject: Default username and pw for MySQL Connector/J Hi everyone, Is there a standard way to specify a default user name and password for the java driver? For example, will it recognize .my.cnf like most mysql clinets do? Thanks, Sergei -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Default username and pw for MySQL Connector/J
Hi everyone, Is there a standard way to specify a default user name and password for the java driver? For example, will it recognize .my.cnf like most mysql clinets do? Thanks, Sergei
MySQL Connector/J 3.1.3 BETA Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.3, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.3 is the first BETA release of the 3.1 series that is suitable for use with either MySQL-4.1 or MySQL-5.0 (and is required when using server-side prepared statements on MySQL-4.1.2 or newer). It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.1.html as well as mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) Please note that currently server-side prepared statements are automatically disabled in this release when the driver is connecting to MySQL-5.0.0 or MySQL-5.0.1, as the current prepared statement code from the 4.1 branch (which contains network protocol-level changes) has yet to be merged into the 5.0 source tree. The focus of the next few releases of Connector/J 3.1 is on code cleanup and performance improvements (although micro-performance benchmarks are looking pretty good right now, approx 25-30% faster than the 3.0 series due mostly to shortening call stack length and some optimizations in re-using expensive to allocate objects). Have fun with this release! Please take the time to file any bugs you might encounter (hopefully none!) at http://bugs.mysql.com/ ... We're particularly interested in any issues you might have with this release and MySQL-4.1.3 with respect to server-side prepared statements. Regards, -Mark ~From the changelog: 07-07-04 - Version 3.1.3-beta - - Mangle output parameter names for CallableStatements so they will not clash with user variable names. - - Added support for INOUT parameters in CallableStatements. - - 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'. - - 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). - - Externalized more messages (on-going effort). - - 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 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. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFA7a/UtvXNTca6JD8RAoKUAJ46zyxebl3xDwXL95m1J9fWyLzv7QCghkTN Dkal59QtkxTAsHUaVLpBGKo= =HveI -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.1.2 ALPHA Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.2, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.2 is a new feature release for the ALPHA tree that is suitable for use with either MySQL-4.1 or MySQL-5.0 (and is required when using server-side prepared statements on MySQL-4.1.2 or newer). It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-stable.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) Please note that currently server-side prepared statements are automatically disabled in this release when the driver is connecting to MySQL-5.0.0 or MySQL-5.0.1, as the current prepared statement code from the 4.1 branch (which contains network protocol-level changes) has yet to be merged into the 5.0 source tree. Depending on bug reports from the field, and how the release time line for MySQL-4.1 plays out, this release should be the last ALPHA release of the Connector/J 3.1 series. The focus of the next release of Connector/J 3.1 is on code cleanup and performance improvements (although micro-performance benchmarks are looking pretty good right now, approx 25-30% faster than the 3.0 series due mostly to shortening call stack length and some optimizations in re-using expensive to allocate objects). Have fun with this release! Please take the time to file any bugs you might encounter (hopefully none!) at http://bugs.mysql.com/ ... We're particularly interested in any issues you might have with this release and MySQL-4.1.2 with respect to server-side prepared statements. Regards, -Mark - From the changelog: 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()). - 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 parameters could cause a NullPointerException in CallableStatement.setOutputParameters(). - Removed wrapping of exceptions in MysqlIO.changeUser(). - 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 '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. - 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 detect initial character set for servers = 4.1.0 - Cleaned up detection of server properties. - 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#3540 getProcedureColumns() doesn't work with wildcards for procedure name - 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. - 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 - 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). -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAxj0wtvXNTca6JD8RAvfQAJ46YtLfHBBIg6MUtjBmwWpwT1rMnQCcDMpi DKOuvoQ3088UuwRUKN90rlE= =s1tz -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.0.14 (Production) Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.14, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.0.14 is a bugfix release for the production tree that is suitable for use with any MySQL version including MySQL-4.1 or MySQL-5.0. This release fixes a URL parsing error (http://bugs.mysql.com/?id=3923) that slipped out (so much for a release with '13' in it's version # going smoothly). It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) -Mark - From the changelog: 05-27-04 - Version 3.0.14-production - Fixed BUG#3923 - URL parsing error -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAtzH+tvXNTca6JD8RAgeQAKCeOsJ7Wh/lc0mPoWbEMJCizf0ODwCfX90d 5JnnOfS+xTllWk/TMZNBLNc= =4sUy -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.0.13 (Production) Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.13, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.0.13 is a bugfix release for the production tree that is suitable for use with any MySQL version including MySQL-4.1 or MySQL-5.0. This release is intended to fix three minor bugs, two which impact users using MysqlConnectionPoolDataSource, and one bug fix for prepared statements with batched parameters creating all keys for getGeneratedKeys(). It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) -Mark - From the changelog: - Fixed BUG#3848 - Using a MySQLDatasource without server name fails - Fixed BUG#3920 - No Database Selected when using MysqlConnectionPoolDataSource. - Fixed BUG#3873 - PreparedStatement.getGeneratedKeys() method returns only 1 result for batched insertions -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAtjsetvXNTca6JD8RAsc6AJ96nLVvVeOK6ODQcvBeC+xmWJ0eRgCfbiMk Azz5OAldJjoBD8UElM65E7Q= =cIfj -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.0.12 (Production) Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.12, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.0.12 is a bugfix release for the production tree that is suitable for use with any MySQL version including MySQL-4.1 or MySQL-5.0. It is now available in source and binary form from the Connector/J download pages at http://dev.mysql.com/downloads/connector/j/3.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) -Mark - From the changelog: - 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. - 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. - Don't escape SJIS/GBK/BIG5 when using MySQL-4.1 or newer. - Allow 'url' parameter for MysqlDataSource and MysqlConnectionPool DataSource so that passing of other properties is possible from inside appservers. - Map duplicate key and foreign key errors to SQLState of '23000'. - Backport documentation tooling from 3.1 branch. - Return creating statement for ResultSets created by getGeneratedKeys() (BUG#2957) - Allow java.util.Date to be sent in as parameter to PreparedStatement.setObject(), converting it to a Timestamp to maintain full precision (BUG#3103). - Don't truncate BLOBs/CLOBs when using setBytes() and/or setBinary/CharacterStream() (BUG#2670). - Dynamically configure character set mappings for field-level character sets on MySQL-4.1.0 and newer using 'SHOW COLLATION' when connecting. - Map 'binary' character set to 'US-ASCII' to support DATETIME charset recognition for servers = 4.1.2 - Use 'SET character_set_results during initialization to allow any charset to be returned to the driver for result sets. - Use charsetnr returned during connect to encode queries before issuing 'SET NAMES' on MySQL = 4.1.0. - Add helper methods to ResultSetMetaData (getColumnCharacterEncoding() and getColumnCharacterSet()) to allow end-users to see what charset the driver thinks it should be using for the column. - Only set character_set_results for MySQL = 4.1.0. - Fixed BUG#3511, StringUtils.escapeSJISByteStream() not covering all eastern double-byte charsets correctly. - Renamed StringUtils.escapeSJISByteStream() to more appropriate escapeEasternUnicodeByteStream(). - Fixed BUG#3554 - Not specifying database in URL caused MalformedURL exception. - Auto-convert MySQL encoding names to Java encoding names if used for characterEncoding property. - Added encoding names that are recognized on some JVMs to fix case where they were reverse-mapped to MySQL encoding names incorrectly. - Use junit.textui.TestRunner for all unit tests (to allow them to be run from the command line outside of Ant or Eclipse). - Fixed BUG#3557 - UpdatableResultSet not picking up default values for moveToInsertRow(). - Fixed BUG#3570 - inconsistent reporting of column type. The server still doesn't return all types for *BLOBs *TEXT correctly, so the driver won't return those correctly. - Fixed BUG#3520 -- DBMD.getSQLStateType() returns incorrect value. - Fixed regression in PreparedStatement.setString() and eastern character encodings. - Made StringRegressionTest 4.1-unicode aware. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAq7tLtvXNTca6JD8RAoaJAJ4ulqzTCr6AGYMj3cin+6OAhmLnBQCeJzx2 ErH3NfgSHz604cANPYH5/PM= =N1Pu -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.0.11 STABLE Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.11, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.0.11 is a bugfix release for the STABLE tree that is suitable for use with any MySQL version including MySQL-4.1 or MySQL-5.0. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-stable.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) You might also be interested in learning about new features in Connector/J as well as hearing sessions from other Java and MySQL-related developers in person at the MySQL Users' Conference, which will be held in Orlando, April 14th-16th, 2004 (see http://www.mysql.com/events/uc2004/ for more information). Have fun with this release, and looking forward to meeting you in Orlando if you can make it! -Mark - From the changelog: - 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). - 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) - 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.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). - Issue connection events on all instances created from a ConnectionPoolDataSource. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFANS+atvXNTca6JD8RAoQMAJ4lBucpaVDCXldcfC09FGxRkIRfrACgwRXC ydgSTN55m6KwHfOChNxgIBw= =g1MU -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.1.1 ALPHA Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.1, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.1.1 is a new feature release for the ALPHA tree that is suitable for use with either MySQL-4.1 or MySQL-5.0. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-stable.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.) The major new feature of this release aside from performance optimizations and bug fixes from 3.1.0 is support for the stored procedures in MySQL-5.0 via the java.sql.CallableStatement interface, and the inclusion of the docbook-based documentation that has been available on www.mysql.com for awhile. The new documentation is located in the 'doc' subdirectory of the distribution. For those of you who want to try out the stored procedures support, I suggest that you see the documentation (http://www.mysql.com/documentation/connector-j/index.html#id2803184) as well as the JDBC spec and APIDOCs for java.sql.CallableStatement. You might also be interested in hearing me talk about the new features in Connector/J 3.1 as well as other Java and MySQL-related topics in person at the MySQL Users' Conference, which will be held in Orlando, April 14th-16th, 2004 (see http://www.mysql.com/events/uc2004/ for more information). Have fun with this release, and looking forward to meeting you in Orlando if you can make it! -Mark - From the changelog: 02-14-04 - Version 3.1.1-alpha - Fixed bug with UpdatableResultSets not using client-side 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). - Unpack 'unknown' data types from server prepared statements as Strings. - Implemented long data (Blobs, Clobs, InputStreams, Readers) for server prepared statements. - Implemented Statement.getWarnings() for MySQL-4.1 and newer (using 'SHOW WARNINGS'). - Default result set type changed to TYPE_FORWARD_ONLY (JDBC compliance). - 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. - Support for NIO. Use 'useNIO=true' on platforms that support NIO. - 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. - 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. - 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. - 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*(). - 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. - Fix support for table aliases when checking for all primary keys in UpdatableResultSet. - Removed useFastDates connection property. - Correctly initialize datasource properties from JNDI Refs, including explicitly specified URLs. - DatabaseMetaData now reports supportsStoredProcedures() for MySQL versions = 5.0.0 - Fixed stack overflow in Connection.prepareCall() (bad merge). - Fixed IllegalAccessError to Calendar.getTimeInMillis() in DateTimeValue (for JDK 1.4). - 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 java.sql.Types.REAL from 3.0 branch. - Detect collation of column for RSMD.isCaseSensitive(). - Fixed sending of queries 16M. - Added named and indexed input/output parameter support to CallableStatement. MySQL-5.0.x or newer. - Fixed NullPointerException in ServerPreparedStatement.setTimestamp(), as well as year and month descrepencies in ServerPreparedStatement.setTimestamp
MySQL Connector/J 3.0.10 STABLE Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.10, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. Version 3.0.10 is a bugfix/performance release for the STABLE tree. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-stable.html and mirror sites. Note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site. - From the changelog: 01-13-04 - Version 3.0.10-stable - Don't count quoted id's when inside a 'string' in PreparedStatement parsing (fix for BUG#1511). - 'Friendlier' exception message for PacketTooLargeException (BUG#1534). - Backported fix for aliased tables and UpdatableResultSets in checkUpdatability() method from 3.1 branch. - Fix for ArrayIndexOutOfBounds exception when using Statement.setMaxRows() (BUG#1695). - Fixed BUG#1576, dealing with large blobs and split packets not being read correctly. - Fixed regression of Statement.getGeneratedKeys() and REPLACE statements. - Fixed BUG#1630, subsequent call to ResultSet.updateFoo() causes NPE if result set is not updatable. - Fix for 4.1.1-style auth with no password. - Fix for BUG#1731, Foreign Keys column sequence is not consistent in DatabaseMetaData.getImported/Exported/CrossReference(). - Fix for BUG#1775 - DatabaseMetaData.getSystemFunction() returning bad function 'VResultsSion'. - Fix for BUG#1592 -- cross-database updatable result sets are not checked for updatability correctly. - DatabaseMetaData.getColumns() should return Types.LONGVARCHAR for MySQL LONGTEXT type. - ResultSet.getObject() on TINYINT and SMALLINT columns should return Java type 'Integer' (BUG#1913) - Added 'alwaysClearStream' connection property, which causes the driver to always empty any remaining data on the input stream before each query. - Added more descriptive error message 'Server Configuration Denies Access to DataSource', as well as retrieval of message from server. - Autoreconnect code didn't set catalog upon reconnect if it had been changed. - Implement ResultSet.updateClob(). - ResultSetMetaData.isCaseSensitive() returned wrong value for CHAR/VARCHAR columns. - Fix for BUG#1933 -- Connection property maxRows not honored. - Fix for BUG#1925 -- Statements being created too many times in DBMD.extractForeignKeyFromCreateTable(). - Fix for BUG#1914 -- Support escape sequence {fn convert ... } - Fix for BUG#1958 -- ArrayIndexOutOfBounds when parameter number == number of parameters + 1. - Fix for BUG#2006 -- ResultSet.findColumn() should use first matching column name when there are duplicate column names in SELECT query (JDBC-compliance). - Removed static synchronization bottleneck from PreparedStatement.setTimestamp(). - Removed static synchronization bottleneck from instance factory method of SingleByteCharsetConverter. - Enable caching of the parsing stage of prepared statements via the 'cachePrepStmts', 'prepStmtCacheSize' and 'prepStmtCacheSqlLimit' properties (disabled by default). - Speed up parsing of PreparedStatements, try to use one-pass whenever possible. - Fixed security exception when used in Applets (applets can't read the system property 'file.encoding' which is needed for LOAD DATA LOCAL INFILE). - Use constants for SQLStates. - Map charset 'ko18_ru' to 'ko18r' when connected to MySQL-4.1.0 or newer. - Ensure that Buffer.writeString() saves room for the \0. - Fixed exception 'Unknown character set 'danish' on connect w/ JDK-1.4.0 - Fixed mappings in SQLError to report deadlocks with SQLStates of '41000'. - 'maxRows' property would affect internal statements, so check it for all statement creation internal to the driver, and set to 0 when it is not. Have fun with it! -Mark -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFABKvYtvXNTca6JD8RAlZyAJ9Csh3R17Kz2N2aDsLsqZ+QEincpwCfXKb5 BvUUaorPwr6ywJZ3ZnNhxfI= =zsLF -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
New To MySQL Connector J
Hi I am new to MySQL connector J. I do not know how to install it. I just downloaded the .zip file and I am using XP Home. I want to use it with tomcat which is already running OK. I need someone to help me how to install it and connect to MySQL which is also installed and working fine. Thank you. -- Peter K. Aganyo Eternal Designs Inc., +1(617)344-8023 (fax voicemail)
MySQL Connector/J 3.0.9 STABLE Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.9, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-stable.html and mirror sites. Note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site. The new CHANGELOG for 3.0.9 should be posted on the website later today as well (the one for 3.0.8 is still listed there), but 3.0.9 is available for downloading from the URL above. - From the changelog: 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). - 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 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). - 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). - 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) - 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). - Don't try and reset isolation level on reconnect if MySQL doesn't support them. - Don't wrap SQLExceptions in RowDataDynamic. - Don't change timestamp TZ twice if useTimezone==true (BUG#774) - Fixed regression in large split-packet handling (BUG#848). - 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). - 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). - 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. - 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 deadlock issue with Statement.setMaxRows(). - Fixed CLOB.truncate(), BUG#1130 - Optimized CLOB.setChracterStream(), BUG#1131 - Made databaseName, portNumber and serverName optional parameters for MysqlDataSourceFactory (BUG#1246) - Fix for BUG#1247 -- ResultSet.get/setString mashing char 127 - 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 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. Have fun with it! -Mark -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/hAb8tvXNTca6JD8RAoKSAJ9TOpOhxzWEN6W1S2zLZeVgskdTswCgnJLO Cvu/tpY75QUIQGNwq2tJql0= =okMW -END PGP SIGNATURE
MySQL Connector/J
Hi, I am using MySQL Connector/J JDBC Driver to support the=20 ResultSet.CONCUR_UPDATABLE. I am using J2sdk 1.4 Tomcat 4.1.1 with = MySQL: I am using a jsp file to use the Driver. After running the JSP file = following Error has been generated.=20 org.apache.jasper.JasperException: = org.gjt.mm.mysql.Connection.createStatement(II)Ljava/sql/Statement; at = org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav= a:248) at = org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) .. Thanks for your help. eff. Usman -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL Connector/J
Hi, I am using MySQL Connector/J JDBC Driver to support the=20 ResultSet.CONCUR_UPDATABLE. I am using J2sdk 1.4 Tomcat 4.1.1 with = MySQL: I am using a jsp file to use the Driver. After running the JSP file = following Error has been generated.=20 org.apache.jasper.JasperException: = org.gjt.mm.mysql.Connection.createStatement(II)Ljava/sql/Statement; at = org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav= a:248) at = org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) .. Thanks for your help. eff. Usman Somehow you are still using the older org.gjt.mm.mysql drivers not connector/J. When I asked many moons ago I was told that they could not both be used at the same time by Tomcat even in separate contexts, but YMMV. William R. Mussatto, Senior Systems Engineer Ph. 909-920-9154 ext. 27 FAX. 909-608-7061 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J documentation now available online
Documentation for MySQL Connector/J, the MySQL JDBC driver, is now available on the MySQL AB web site in HTML format: http://www.mysql.com/documentation/connector-j/ Links to the document also are available on the main Connector/J page, and the main documentation page: http://www.mysql.com/products/connector-j/ http://www.mysql.com/documentation/ -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J 3.0.8 STABLE Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.8, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-stable.html and mirror sites. Note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site. - From the changelog: - Allow bogus URLs in Driver.getPropertyInfo(). - Return list of generated keys when using multi-value INSERTS with Statement.getGeneratedKeys(). - Use JVM charset with filenames and 'LOAD DATA [LOCAL] INFILE' - Fix infinite loop with Connection.cleanup(). - 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. - Unicode character 0x in a string would cause the driver to throw an ArrayOutOfBoundsException (Bug #378) - Return correct amount of generated keys when using 'REPLACE' statements. - Fix problem detecting server character set in some cases. - Fix row data decoding error when using _very_ large packets. - Optimized row data decoding. - Issue exception when operating on an already-closed prepared statement. - Fixed SJIS encoding bug, thanks to Naoto Sato. - Optimized usage of EscapeProcessor. - Fixed numbering of KEY_SEQ column in DBMD.getImported/Exported keys (thanks to Dave Schoorl). - Allow multiple calls to Statement.close() - Use hex escaping for PreparedStatement.setBytes()/setBinaryStream() when the character set is Shift_JIS, workaround for parsing bug in server. - Added whitespace insensitivity to EscapeProcessor. Have fun with it! -Mark - -- For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+1SYqtvXNTca6JD8RAnCdAKCx+3ldUwo/kYDC5oBk5h4iepmIxgCdFi9d FMLHyUOxQBmx8gN1nVUlnp8= =toBB -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL Connector/J 3.0.8 STABLE Has Been Released
Where does Connector/J fit into the MySQL3.23.x versus MySQL4.x client libraries? Someone mentioned to me today that mod_php is still compiled with the old 3.23 client even though it may be talking to a 4.x server, so I'm wondering if Connector/J does anything different depending on whether it's talking to a 3.23 server or a 4.x server. --- Mark Matthews [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.8, a new version of the Type-IV all-Java JDBC driver for MySQL has been released. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-stable.html and mirror sites. Note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site. - From the changelog: - Allow bogus URLs in Driver.getPropertyInfo(). - Return list of generated keys when using multi-value INSERTS with Statement.getGeneratedKeys(). - Use JVM charset with filenames and 'LOAD DATA [LOCAL] INFILE' - Fix infinite loop with Connection.cleanup(). - 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. - Unicode character 0x in a string would cause the driver to throw an ArrayOutOfBoundsException (Bug #378) - Return correct amount of generated keys when using 'REPLACE' statements. - Fix problem detecting server character set in some cases. - Fix row data decoding error when using _very_ large packets. - Optimized row data decoding. - Issue exception when operating on an already-closed prepared statement. - Fixed SJIS encoding bug, thanks to Naoto Sato. - Optimized usage of EscapeProcessor. - Fixed numbering of KEY_SEQ column in DBMD.getImported/Exported keys (thanks to Dave Schoorl). - Allow multiple calls to Statement.close() - Use hex escaping for PreparedStatement.setBytes()/setBinaryStream() when the character set is Shift_JIS, workaround for parsing bug in server. - Added whitespace insensitivity to EscapeProcessor. Have fun with it! -Mark - -- For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+1SYqtvXNTca6JD8RAnCdAKCx+3ldUwo/kYDC5oBk5h4iepmIxgCdFi9d FMLHyUOxQBmx8gN1nVUlnp8= =toBB -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL Connector/J 3.0.8 STABLE Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 LS wrote: Where does Connector/J fit into the MySQL3.23.x versus MySQL4.x client libraries? Someone mentioned to me today that mod_php is still compiled with the old 3.23 client even though it may be talking to a 4.x server, so I'm wondering if Connector/J does anything different depending on whether it's talking to a 3.23 server or a 4.x server. Connector/J does things differently when talking to 3.23, 4.0 and 4.1, but it's all transparent as far as an end-user is concerned. There are no native libraries used in Connector/J ... It's 100% pure Java, and speaks the MySQL network protocol directly, so it doesn't have the issues with library incompatibility that native applications might have on some operating systems. -Mark - -- For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+1WNftvXNTca6JD8RAmp7AJ0SykjObHYp5xsXjAZIsvaqx00EIQCghUTu xltrrCOZtKbvHbfKlh8pW4U= =op7p -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Connector/J and XADataSources
Mark, I read in the release notes that there is an implementation of XADataSource (MySQLXADataSource), which does exist in the 2.0.14 release. I've looked in the 3.x releases and do not see it. Am I just not seeing it? Is this also planned for the 3.x releases? Thanks, Frank - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL Connector/J 3.0.6 STABLE Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.6 a new version of the Type-IV all-Java JDBC driver for MySQL has been released. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-stable.html and mirror sites. Note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site. This is the first STABLE release for the feature set that has been frozen for version 3.0 of Connector/J. Version 3.0.6 has reached a level of stability that is appropriate for production use. From the changelog: * Fixed ResultSetMetaData to return when catalog not known. Fixes NullPointerExceptions with Sun's CachedRowSet. * Fixed DBMD.getTypeInfo() and DBMD.getColumns() returning different value for precision in TEXT/BLOB types. * Allow ignoring of warning for 'non transactional tables' during rollback (compliance/usability) by setting 'ignoreNonTxTables' property to 'true'. * Fixed SQLExceptions getting swallowed on initial connect. * Fixed Statement.setMaxRows() to stop sending 'LIMIT' type queries when not needed (performance). * Clean up Statement query/method mismatch tests (i.e. INSERT not allowed with .executeQuery()). * More checks added in ResultSet traversal method to catch when in closed state. * Fixed ResultSetMetaData.isWritable() to return correct value. * Add 'window' of different NULL sorting behavior to DBMD.nullsAreSortedAtStart (4.0.2 to 4.0.10, true, otherwise, no). * Implemented Blob.setBytes(). You still need to pass the resultant Blob back into an updatable ResultSet or PreparedStatement to persist the changes, as MySQL does not support 'locators'. * Backported 4.1 charset field info changes from Connector/J 3.1 Have fun with it! -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+UpHqtvXNTca6JD8RAjNLAKCGAF2+6R0UzgblEr4G482iUYlOxwCdHP9j FZFNo7Yk/S/lr7M241QLkYM= =2MpI -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL Connector/J 3.1.0 ALPHA Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.1.0 a new version of the Type-IV all-Java JDBC driver for MySQL has been released. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-dev.html and mirror sites. Note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site. This is an ALPHA release for the feature set that is in line with the features MySQL-4.1 is offering, including Unicode character sets and server-side prepared statements. From the changelog: * Added 'requireSSL' property. * Added 'useServerPrepStmts' property (default 'false'). The driver will use server-side prepared statements when the server version supports them (4.1 and newer) when this property is set to 'true'. It is currently set to 'false' by default until all bind/fetch functionality has been implemented. Currently only DML prepared statements are implemented for 4.1 server-side prepared statements. * Track open Statements, close all when Connection.close() is called (JDBC compliance). Have fun with it! -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+UpJqtvXNTca6JD8RAs6BAJ92gLQCwv3IaZdD7CqS9j38ykBCFQCeL6/e 5jLINCBQz8y6HT2wsYQG06Q= =fGwb -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL Connector/J 3.0.5 GAMMA Has Been Released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 3.0.5 a new version of the Type-IV all-Java JDBC driver for MySQL has been released. It is now available in source and binary form from the Connector/J download pages at http://www.mysql.com/downloads/api-jdbc-dev.html and mirror sites. Note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site. This is a bugfix release for the feature set that has been frozen for version 3.0 of Connector/J. This will most likely be the last GAMMA version of the 3.0 series, and 3.0.6 is expected to be declared STABLE. From the changelog: * Fixed Buffer.fastSkipLenString() causing ArrayIndexOutOfBounds exceptions with some queries when unpacking fields. * Implemented an empty TypeMap for Connection.getTypeMap() so that some third-party apps work with MySQL (IBM WebSphere 5.0 Connection pool). * Added missing LONGTEXT type to DBMD.getColumns(). * Retrieve TX_ISOLATION from database for Connection.getTransactionIsolation() when the MySQL version supports it, instead of an instance variable. * Quote table names in DatabaseMetaData.getColumns(), getPrimaryKeys(), getIndexInfo(), getBestRowIdentifier() * Greatly reduce memory required for setBinaryStream() in PreparedStatements. * Fixed ResultSet.isBeforeFirst() for empty result sets. * Added update options for foreign key metadata. * - Fixed Connection.getTransactionIsolation() not picking up isolation levels for servers older than 4.0.x. * Backport 4.1 protocol and authentication changes from Connector/J 3.1.x -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+OAm9tvXNTca6JD8RAlUSAKCZXviyE00ZcLhytizzeKw0wWz6/gCglbgT x+SN4VZyRE4YP8m3R9IDCrI= =baH0 -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How-To-Repeat: MySql Connector J 3.x Problem
How-To-Repeat: MySql Connector J 3.x Problem Dear Sir, I have download MySQL Connector/J 3.x (mysql-connector-java-3.0.3-beta mysql-connector-java-3.0.4-gamma) and well install them on my java (JSDK 1.4.1) system (Win XP). When I try to get the result set from the database, the result value character have be change. For example, if the right result string is '01', it return 'pq'. But, when I just replace with the stable verion mysql-connector-java-2.0.14, the result character is correct. For example, if the right result string is '01', it return '01'. Please explain what happen !! Thomas Chan [EMAIL PROTECTED] == ¿Dªù®È¹C®T¼Ö¸ê°T ºÉ¦b·s®ö¿Dªù¯¸ - http://macau.sina.com $8 ¥i¥H¶RÉA ...? - http://sinaplay.sina.com.hk/easypay - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: How-To-Repeat: MySql Connector J 3.x Problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas Chan wrote: How-To-Repeat: MySql Connector J 3.x Problem Dear Sir, I have download MySQL Connector/J 3.x (mysql-connector-java-3.0.3-beta mysql-connector-java-3.0.4-gamma) and well install them on my java (JSDK 1.4.1) system (Win XP). When I try to get the result set from the database, the result value character have be change. For example, if the right result string is '01', it return 'pq'. But, when I just replace with the stable verion mysql-connector-java-2.0.14, the result character is correct. For example, if the right result string is '01', it return '01'. Please explain what happen !! Can you create a reproducible test case? What character set is your database set to? What character set is your computer set to? -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+JWvQtvXNTca6JD8RAkqHAKDH0+xI83kykgaCMze0m8sE9NbqYwCeNDhF QS+04+7KosDN9Mma/YfSZvw= =ysZh -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Cannot download MySQL Connector/J from www.mysql.com
I am using IE5 and Windows 2000. I am trying to download the Type 4 JDBC driver for MySQL for a MySQL/Java/Linux project from the link http://www.mysql.com/downloads/api-jdbc-stable.html. The download I get as a result is about 45KB. However, it is not recognised by tar or gzip utilities as a valid archive. Examining the file with a binary editor suggests that it is an html document, detailing links to your mirror sites. Please advise how I can get the download I require. Thanks in advance! Richard. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Cannot download MySQL Connector/J from www.mysql.com
On Fri, 3 Jan 2003, Richard Mayebo wrote: I am using IE5 and Windows 2000. I am trying to download the Type 4 JDBC driver for MySQL for a MySQL/Java/Linux project from the link http://www.mysql.com/downloads/api-jdbc-stable.html. The download I get as a result is about 45KB. However, it is not recognised by tar or gzip utilities as a valid archive. Examining the file with a binary editor suggests that it is an html document, detailing links to your mirror sites. Please advise how I can get the download I require. Thanks in advance! Richard, click the site, pick your mirror and then download the requested archive. You downloaded the html site giving you a choice of mirrors. Regards, Thomas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Cannot download MySQL Connector/J from www.mysql.com
Thomas, Thanks - I got it now. Regards, Richard. -Original Message- From: Thomas Spahni [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 6:52 PM To: Richard Mayebo Cc: '[EMAIL PROTECTED]' Subject: Re: Cannot download MySQL Connector/J from www.mysql.com On Fri, 3 Jan 2003, Richard Mayebo wrote: I am using IE5 and Windows 2000. I am trying to download the Type 4 JDBC driver for MySQL for a MySQL/Java/Linux project from the link http://www.mysql.com/downloads/api-jdbc-stable.html. The download I get as a result is about 45KB. However, it is not recognised by tar or gzip utilities as a valid archive. Examining the file with a binary editor suggests that it is an html document, detailing links to your mirror sites. Please advise how I can get the download I require. Thanks in advance! Richard, click the site, pick your mirror and then download the requested archive. You downloaded the html site giving you a choice of mirrors. Regards, Thomas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Error with MySql Connector/J 3.0
I get the following error using either the 3.0 or 3.01 jars of the Connector/J: com.mysql.jdbc.NotUpdatable: Result Set not updateable. The query that generated this result s et must select only one table, and must select all primary keys from that table. See the JDBC 2.1 API Specification, section 5.6 for more details. at com.mysql.jdbc.ResultSet.updateObject(ResultSet.java:4252) at com.mysql.jdbc.ResultSet.updateObject(ResultSet.java:4295) at com.bromsoft.soccer.batch.SelectDistinctPlayerAddress.initalize(SelectDistinctPlayerAddress.java:88) at com.bromsoft.soccer.batch.SelectDistinctPlayerAddress.init(SelectDistinctPlayerAddress.java:41) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)com.bromsoft.soccer.batch.SelectDistinctPlayerAddress.initalize(SelectDistinctPlayerAddress.java:88) at com.bromsoft.soccer.batch.SelectDistinctPlayerAddress.init(SelectDistinctPlayerAddress.java:41) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) I under stand the error but I am not using join and by doing a select *, I should be including the primary key... This is the snipplet of code that is causing the problem: Connection con = ConnectIO.getStaticConnection(Soccer.getDBString()); ConnectIO.executePreparedStatement(con, update players set selected = \F\ ); cat_.info(Players selected field has been cleared.); ResultSet rs = ConnectIO.getResultSet(con, select id, zipcode, state, city, address, lastname, firstname, selected, status from players where status = \A\ order by ZipCode, State, City, Address, LastName, FirstName ); while (rs.next()) { Integer id = (Integer) rs.getObject(ID); String firstName = (String) rs.getObject(FirstName); String lastName = (String) rs.getObject(LastName); String address = (String) rs.getObject(Address); String city = (String) rs.getObject(City); String state = (String) rs.getObject(State); String zipCode = (String) rs.getObject(ZipCode); if (!address.equals(lastAddress) || !city.equals(lastCity) || !state.equals(lastState) || !zipCode.equals(lastZipCode)) { rs.updateObject(Selected, T); rs.updateRow(); v1.clear(); v1.add(lastName); v1.add(firstName); msg = pf.print(%s %s has been selected.,v1); cat_.info(msg); count++; } lastAddress = address; lastCity = city; lastState = state; lastZipCode = zipCode; } v1.clear(); pf.setPattern(%i players have been selected.); v1.add(new Integer(count)); msg = pf.print(v1); cat_.info(msg); This is the table that is being updated: -- -- Table structure for table 'players' -- DROP TABLE IF EXISTS players; CREATE TABLE players ( ID int(9) NOT NULL auto_increment, Selected char(1) default 'F', FirstName varchar(30) default NULL, LastName varchar(30) default NULL, Address varchar(30) default NULL, City varchar(20) default NULL, State char(2) default NULL, ZipCode varchar(10) default NULL, Sex char(1) default NULL, BirthDate date default NULL, Coach varchar(30) default NULL, YearsPlayed int(2) default NULL, LastyearPlayed varchar(4) default NULL, LastSeasonPlayed varchar(10) default NULL, LastYearEligible varchar(4) default NULL, Phone varchar(15) default NULL, LastGrade char(2) default NULL, Shirt_Size char(3) default NULL, Speed_Rating int(2) default NULL, Soccer_Rating int(2) default NULL, Attitude_Rating int(2) default NULL, Overall_Rating int(2) default NULL, Comments varchar(100) default NULL, Players_Comments varchar(100) default NULL, PayType enum('NotPaid','Cash','Check','MoneyOrder','Reg-NoCharge','Reg-NonPay') default 'NotPaid', PayId varchar(10) default NULL, PayAmount decimal(6,2) unsigned zerofill default '.00', PayDate date default NULL, Print char(1) default 'F', AddDate date default NULL, ChangeDate date default NULL, WillCoach char(1) default 'F', WillSponsor char(1) default 'F', WillVolunteer char(1) default 'F', Status char(1) default 'A', PRIMARY KEY (ID) ) TYPE=MyISAM; I do not understand why I am getting the error. Please advise. This does work with the 2.14 drivers. --Steve Bromley
MySQL Connector/J 2.0.14 issue
Hi, I have redhat 7.1 and I am using mysql server 3.23.36 and I could login as a user to the linux server and run mysql program from the command line and connect to database I want to and do all SQL commands without any problems... But when I run a program that has Class.forName(org.gjt.mm.mysql.Driver).newInstance(); Connection connection = java.sql.DriverManager.getConnection( jdbc:mysql://localhost:3306/test); I am getting this error when I run this code java.sql.SQLException: Invalid authorization specification: Access denied for us er: '[EMAIL PROTECTED]' (Using password: NO) at com.mysql.jdbc.MysqlIO.init(Unknown Source) at com.mysql.jdbc.Connection.connectionInit(Unknown Source) at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source) at com.mysql.jdbc.Driver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:199) at DateTest.main(DateTest.java:20) But I can connect to this database from command line prompt without any problems Thanks Anand _ Chat with friends online, try MSN Messenger: http://messenger.msn.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQL Connector/J 2.0.14 issue
I think you're missing a few things: 1) Does your user have a password set? If it does, u need to use the following line to pass your username and password: Connection connection = java.sql.DriverManager.getConnection( jdbc:mysql://localhost:3306/test, username, password); 2) You need to allow your user 'icecream' to connect. I don't really understand the fine grain details of the grant statement, but u need to grant permissions in mysql similar to the following: GRANT ALL ON test.* TO 'icecream'@'localhost.localdomain'; FLUSH PRIVILEGES; Have a look at the grant command. I have a question about myCC. I can't connect to a local linux machine for the life of me from my win2k box. I've done the following: GRANT ALL ON test.* TO 'fred'@'192.168.0.230'; FLUSH PRIVILEGES; but, in my mysql.log I still get: 020816 14:11:18 6 Connect Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) My user table looks like: mysql select user,host from user; ++---+ | user | host | ++---+ | root | 192.168.0.230 | | fred | 192.168.0.230 | || lancelot | | root | lancelot | || localhost | | fred | localhost | | root | localhost | ++---+ If anyone has an idea, please let me know. Cheers, Fred -Original Message- From: anand v [mailto:[EMAIL PROTECTED]] Sent: 22 August 2002 04:58 To: [EMAIL PROTECTED] Subject: MySQL Connector/J 2.0.14 issue Hi, I have redhat 7.1 and I am using mysql server 3.23.36 and I could login as a user to the linux server and run mysql program from the command line and connect to database I want to and do all SQL commands without any problems... But when I run a program that has Class.forName(org.gjt.mm.mysql.Driver).newInstance(); Connection connection = java.sql.DriverManager.getConnection( jdbc:mysql://localhost:3306/test); I am getting this error when I run this code java.sql.SQLException: Invalid authorization specification: Access denied for us er: '[EMAIL PROTECTED]' (Using password: NO) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php