MySQL Connector/J 5.1.49 GA has been released

Dear MySQL Users,

MySQL Connector/J 5.1.49, 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 repositories.

MySQL Connector/J (Commercial) is 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.49 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-49.html

Changes in MySQL Connector/J 5.1.49 (2020-04-29, General
Availability)

   Version 5.1.49 is a maintenance release of the production 5.1
   branch. It is suitable for use with MySQL Server versions
   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

     * Default value of the connection property
       allowLoadLocalInfile has been changed to false.
       Applications that use the LOAD DATA LOCAL INFILE
       (https://dev.mysql.com/doc/refman/8.0/en/load-data.html)
       statement on MySQL Servers need to set this property to
       true explicitly. (Bug #29261254, Bug #30866178)

     * The allowable versions of TLS protocol used for
       connecting to the server, when no restrictions have been
       set using the connection properties enabledTLSProtocols,
       have been changed to:

          + TLSv1, TLSv1.1, and TLSv1.2 for MySQL Community
            Servers 8.0, 5.7.28 and later, and 5.6.46 and later,
            and for commercial versions of MySQL Server 5.6,
            5.7, and 8.0.

          + TLSv1 and TLSv1.1 for all other versions of MySQL
            Servers.

     * The following third-party libraries have been removed
       from the distribution bundles for Connector/J:

          + C3P0 (required for building Connector/J from source)

          + JBoss common JDBC wrapper (required for building
            Connector/J from source)

          + Simple Logging Facade API (required for using the
            logging capabilities provided by the default
            implementation of org.slf4j.Logger.Slf4JLogger by
            Connector/J, and for building Connector/J from
            source)
       Users who need those libraries have to obtain them on
       their own. See Installing Connector/J from a Binary
       Distribution
(https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-binary-installation.html)
       and Installing from Source
(https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-installing-source.html)
       for details.

Bugs Fixed


     * When trying to set a parameter for a PreparedStatement
       using the method
       PreparedStatement.setObject(parameterIndex, “false”,
       Types.BOOLEAN), the value was set to true instead of
       false. (Bug #30911870, Bug #98237)

     * In line with good XML practices, DTD processing has been
       disabled for Connector/J’s MySQL Fabric XML parser. (Bug
       #30657312)

     * Methods of the ResultSetUtil class that are no longer
       used in Connector/J 5.1 have been removed. (Bug
       #30636056)

     * For some prepared statements, calling getMetaData() on
       them resulted in an Incorrect DATE error, even when no
       DATE values were involved. This was due to some recent
       changes on the MySQL Server, to which this patch adjusts
       Connector/J. (Bug #30151808, Bug #96442)
       References: See also: Bug #29025656, Bug #28940878.

     * When working with a load balancing setup, if the
       connection property loadBalanceStrategy was set to
       bestResponseTime and connections to all the hosts in the
       original setup failed, Connector/J hung, even if there
       were actually newly-added hosts available. This was
       because Connector/J mishandled the host whitelist, and
       this patch corrects the problem. (Bug #23143279)

     * Inserting values in batch using a PreparedStatement
       failed for an INSERT …VALUE
       (https://dev.mysql.com/doc/refman/8.0/en/insert.html)
       statement but worked for an INSERT … VALUES
       (https://dev.mysql.com/doc/refman/8.0/en/insert.html)
       statement, while they are synonymous for MySQL. (Bug
       #21181501, Bug #77183)


On Behalf of Oracle/MySQL Release Engineering Team,
Sreedhar S

MySQL Connector/J 8.0.20 has been released

Dear MySQL users,

MySQL Connector/J 8.0.20 is the latest General Availability release of
the MySQL Connector/J 8.0 series.  It is suitable for use with MySQL
Server versions 8.0, 5.7, and 5.6.  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-20.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.20 GA, see the “General Availability
(GA) Releases” tab at http://dev.mysql.com/downloads/connector/j/

Enjoy!

Changes in MySQL Connector/J 8.0.20 (2020-04-27, General Availability)

* Functionality Added or Changed

* Bugs Fixed

Functionality Added or Changed

* X DevAPI: Connector/J now supports data compression for X Protocol
connections (https://dev.mysql.com/doc/refman/8.0/en/x-plugin-connection- compression.html). See Connection Compression Using X DevAPI (https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-connection-compression-xdevapi.html) for details.

* A new method, getElapsedTime(), has been added to
Connector/J ‘s implementation of the Statement interface,
to expose the elapsed time for a query. Thanks to Matti
Sillanpää for contributing the code. (Bug #30570249, Bug
#97714)

Bugs Fixed

* When a custom Calendar was used in the setDate method for
a PreparedStatement, it was being used by subsequent
calls of the same method that did not use the same
calendar, resulting in the wrong date being set. It was
because the SimpleDateFormat object created internally
with the custom calendar was cached and reused. With this
fix, the object is no longer cached. (Bug #30877755)

* Setting the connection property clientInfoProvider
without using the fully qualified class name for
ClientInfoProviderSP caused a NullPointerException. This
was due to some wrong exception handling, which has been
corrected by this fix. (Bug #30832513)

* Authentication failed when a client tried to connect to a
server that used Windows Authentication Plugin and the
Kerberos protocol. It was because the implementation of
the NativeAuthenticationProvider class by Connector/J did
not interact correctly with a custom-made Kerberos
authentication plugin, and this patch fixes the issue.
(Bug #30805426)

* Methods from the ResultSetUtil class are no longer used
in Connector/J 8.0.20; the class has therefore been
removed. (Bug #30636056)

* A NullPointerException was returned when the connection
had cacheResultSetMetadata=true and a query containing
any SET statements was executed. This fix corrects the
issue by adding the missing variable assignment, and also
a null check. (Bug #30584907, Bug #97757)

* A DataConversionException was thrown when an application
tried to store a string starting with “d.” [d was any
digit] into a VARCHAR column. It was due to a parsing
error in the AbstractNumericValueFactory, which has been
fixed by this patch. Thanks to Nick Pollett for
contributing the code. (Bug #30570721, Bug #97724)

* When creating a Statement, the specification for the
resultSetType parameter was not honored, so that the
ResultSet type was always set to
ResultSet.TYPE_FORWARD_ONLY. With this fix, the
resultSetType parameter is now honored. Also, type
validation has been added so that calling the methods
beforeFirst, afterLast, first, last, absolute, relative,
or previous results in an exception if the ResultSet type
is ResultSet.TYPE_FORWARD_ONLY. (Bug #30474158)

* When a Calendar was not used, a java.sql.Date value could
not always be stored into and then retrieved from a MySQL
server consistently. It was because Connector/J always
converted a Date value to the server’s time zone when
storing it on the server as a MySQL DATE; but since a
MySQL DATE does not have any time value, the hour,
minute, and second parts of the original date was
effectively lost. If the converted value is one day ahead
of or behind the original value, when the value was
retrieved through Connector/J and converted back to the
local time zone, there was no time value for adjusting
the date back to its original value, resulting in a
one-day error. With this fix, any Date value is converted
to MySQL DATE value using the JVM’s time zone, so that
the value is always consistent when being stored and then
read back.
Also, the cacheDefaultTimezone connection property,
previously removed from Connector/J 8.0, has now been
restored so that when it is set to false, Connector/J
becomes aware of the time zone changes of the JVM during
runtime and converts dates with the updated time zone.
(Bug #28125069, Bug #91112)

On Behalf of MySQL Release Engineering Team,
Surabhi Bhat

MySQL Connector/J 8.0.19 has been released

Dear MySQL users,

MySQL Connector/J 8.0.19 is the latest General Availability release of
the MySQL Connector/J 8.0 series.  It is suitable for use with MySQL
Server versions 8.0, 5.7, and 5.6.  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-19.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.19 GA, see the “General Availability
(GA) Releases” tab at http://dev.mysql.com/downloads/connector/j/

Enjoy!

Changes in MySQL Connector/J 8.0.19 (2020-01-13, General Availability)

Functionality Added or Changed


     * Connector/J now supports the use of DNS SRV records for
       connections.  Here is a brief summary for Connector/J’s support
       for DNS SRV records:

          + These new schemas in the connection URLs enable DNS
            SRV support:
               o jdbc:mysql+srv: For ordinary and basic failover
                 JDBC connections that make use of DNS SRV
                 records.
               o jdbc:mysql+srv:loadbalance: For load-balancing
                 JDBC connections that make use of DNS SRV
                 records.
               o jdbc:mysql+srv:replication: For replication
                 JDBC connections that make use of DNS SRV
                 records.
               o mysqlx+srv: For X DevAPI connections that make
                 use of DNS SRV records.

          + Besides using the new schemas in the connection
            URLs, DNS SRV record support can also be enabled or
            disabled using the two new connection properties,
            dnsSrv and xdevapi.dns-srv, for JDBC and X DevAPI
            connections respectively.
       See Support for DNS SRV Records
(https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-dns-srv.html)
       in the Connector/J 8.0 Developer Guide
(https://dev.mysql.com/doc/connector-j/8.0/en/) for
       details.

     * X DevAPI: The server failover support for connections
       using X DevAPI has been enhanced with the following features:

          + When the priority property is NOT set for each host
            in the connection URL, failover connections are
            attempted on the hosts in a random order, until a
            connection is successfully established (Connector/J
            used to attempt connections to the hosts in the
            sequence they appear in the connection URL).

          + Once all hosts have been tried and no connections
            can be made, Connector/J throws a
            com.mysql.cj.exceptions.CJCommunicationsException
            and returns the message Unable to connect to any of
            the target hosts.

          + When using connection pooling, Connector/J keeps
            track of any host it failed to connect to and, for a
            short waiting period after the failure, avoids
            connecting to it during the creation or retrieval of
            a Session. However, if all other hosts have already
            been tried, those excluded hosts will be retried
            without waiting. Once all hosts have been tried and
            no connections can be established, Connector/J
            throws a
            com.mysql.cj.exceptions.CJCommunicationsException
            and returns the message Unable to connect to any of
            the target hosts.

     * X DevAPI: The allowed TLS versions and cipher suites for
       X DevAPI connections can now be restricted by two new
       connection properties:

          + xdevapi.tls-versions restricts the allowable TLS
            protocol versions to be used for X DevAPI
            connections.

          + xdevapi.tls-ciphersuites restricts the allowable
            cipher suites to be used for X DevAPI connections.
       See the descriptions for them in Configuration Properties
(https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html)
       and also Connecting Securely Using SSL
(https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-using-ssl.html)
       for details.

     * MySQL Server 8.0.17 deprecated the display width for the
       TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT data types when the
       ZEROFILL modifier is not used, and MySQL Server 8.0.19 has
       removed the display width for those data types from results of
       SHOW CREATE TABLE, SHOW CREATE FUNCTION, and queries on
       INFORMATION_SCHEMA.COLUMNS, INFORMATION_SCHEMA.ROUTINES, and
       INFORMATION_SCHEMA.PARAMETERS (except for the display width for
       signed TINYINT(1)). This patch adjusts Connector/J to those
       recent changes of MySQL Server and, as a result,
       DatabaseMetaData, ParameterMetaData, and ResultSetMetaData now
       report identical results for all the above-mentioned integer
       types and also for the FLOAT and DOUBLE data types.
       (Bug #30477722)

     * The cipher suites usable by Connector/J are now
       pre-restricted by a properties file that can be found at
       src/main/resources/com/mysql/cj/TlsSettings.properties inside the
       src folder on the source tree or in the platform-independent
       distribution archive (in .tar.gz or .zip format) for Connector/J.
       See Connecting Securely Using SSL
(https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-using-ssl.html)
       for details.

     * The allowable versions of TLS protocol used for
       connecting to the server, when no restrictions have been set
       using the connection properties enabledTLSProtocols, have been
       changed to:

          + TLSv1, TLSv1.1, TLSv1.2, and TLSv1.3 for MySQL
            Community Servers 8.0, 5.7.28 and later, and 5.6.46
            and later, and for all commercial versions of MySQL
            Servers.

          + TLSv1 and TLSv1.1 for all other versions of MySQL
            Servers.

Bugs Fixed


     * The RPM package for Connection/J provided by the MySQL
       Yum repository did not have its epoch set; as a result, the
       package could not be installed on an Enterprise Linux or Fedora
       system even if the MySQL Yum repository has been enabled, because
       the Connector/J package in the native repository had the epoch
       set to 1. This fix sets the epoch also to 1 for the RPM package
       provided by the MySQL Yum repository, in order to prevent the
       installation problem. (Bug #30566384, Bug #97700)

     * For some prepared statements, calling getMetaData() on
       them resulted in an Incorrect DATE error, even when no DATE
       values were involved. This was due to some recent changes on the
       MySQL 8.0 Server, to which this patch adjusts Connector/J. (Bug
       #30151808, Bug #96442) References: See also: Bug #29025656,
       Bug #28940878.

     * When retrieving TIME values using
       ResultSet.getTimestamp(), the fractional seconds are truncated
       when useCursorFetch=true. This patch corrects the problem by
       fixing the TIME value decoding in the MysqlBinaryValueDecoder. It
       also corrects some inconsistencies in formatting the fractional
       seconds when returning the TIME values as strings.
       (Bug #30119545, Bug #96383)

     * Streaming of multiple result sets failed with an error.
       It was due to an error in switching the streamer source from one
       result set to another, and this fix corrects the issue.
       (Bug #29999318, Bug #96059)

Enjoy and thanks for the support!

On behalf of the MySQL Release Team,
Nawaz Nazeer Ahamed

MySQL Connector/J 8.0.18 has been released

Dear MySQL users,

MySQL Connector/J 8.0.18 is the latest General Availability release of
the MySQL Connector/J 8.0 series.  It is suitable for use with MySQL
Server versions 8.0, 5.7, and 5.6.  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.18.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.18 GA, see the “General Availability
(GA) Releases” tab at http://dev.mysql.com/downloads/connector/j/

Enjoy!

Changes in MySQL Connector/J 8.0.18 (2019-10-14, General
Availability)

Bugs Fixed


     * A minor code improvement has been put into
       DatabaseMetaDataUsingInfoSchema.getColumns(). (Bug #29898567,
       Bug #95741)

     * For a replication setup, when the connection property
       loadBalanceAutoCommitStatementThreshold was set to any values
       other than 0, load-balancing server switching failed. It was
       because in this case, LoadBalancedAutoCommitInterceptor did not
       have the required access to the parent connection proxy that
       had established the connection, and this fix enables such access.
       (Bug #25223123, Bug #84098)

     * An attempt to retrieve multiple result sets returned by
       asynchronous executions of stored procedures resulted in an
       ExecutionException. With this fix, Connector/J now works properly
       when asynchronous executions return multiple result sets.
       (Bug #23721537)

Enjoy and thanks for the support!

On behalf of the MySQL Release Team,
Nawaz Nazeer Ahamed

MySQL Connector/J 5.1.48 GA has been released

Dear MySQL Users,

MySQL Connector/J 5.1.48, 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 repositories.

MySQL Connector/J (Commercial) is 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.48 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-48.html

Changes in MySQL Connector/J 5.1.48 (2019-07-29, General Availability)

   Version 5.1.48 is a maintenance release of the production 5.1

   branch. It is suitable for use with MySQL Server versions

   5.6, 5.7, and 8.0. It supports the Java Database Connectivity

   (JDBC) 4.2 API.

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)

     * The collation utf8mb4_zh_0900_as_cs has been added to the

       CharsetMapping class. (Bug #29244101)

     * The list of MySQL Server reserved words, stored as the

       MYSQL_KEYWORDS string in the DatabaseMetaData class, has

       been updated. (Bug #28268619, Bug #91435)

     * A number of private parameters of ProfilerEvents (for

       example, hostname) had no getters for accessing them from

       outside of the class instance. Getter methods have now

       been added for all the parameters of the class. (Bug

       #20010454, Bug #74690)

     * Added support for the utf8mb4_0900_bin collation, which

       is now supported by MySQL Server 8.0.17.

Bugs Fixed

     * When a CallableStatement was used to call a stored

       procedure or function that did not exist on the server or

       that the client had no rights to access its parameters’

       metadata, Connector/J tried to infer the parameter

       metadata from the SQL call string itself, but did so

       wrongly. It was because Connector/J did not distinguish

       between a stored procedure and a stored function in its

       inference, and this fix makes Connector/J do so now. (Bug

       #29907618)

     * ResultSetMetaData.getTableName() returned null when no

       applicable results could be returned for a column.

       However, the JDBC documentation specified an empty string

       to be returned in that case. This fix makes the method

       behave as documented. The same correction has been made

       for getCatalogName() and getSchemaName(). (Bug #29452669,

       Bug #94585)

     * Because the SHOW PROCESSLIST

       (https://dev.mysql.com/doc/refman/8.0/en/show-processlist.html)

       statement might cause the server to fail sometimes,

       Connector/J now avoids using the statement, but queries

       the performance scheme instead for the information it

       needs. (Bug #29329326)

     * Enabling logSlowQueries resulted in many unnecessary

       calls of LogUtils.findCallingClassAndMethod(). With this

       fix, LogUtils.findCallingClassAndMethod() is called only

       when profileSQL is true and even in that case, the number

       of calls are reduced to a minimal to avoid the excessive

       stack trace data the function used to generate. Thanks to

       Florian Agsteiner for contributing to the fix. (Bug

       #29277648, Bug #94101, Bug #17640628, Bug #70677)

     * For an SSL connection, after a client disconnected from a

       server by calling Connection.close(), the TCP connection

       remained in the TIME_WAIT

       (https://dev.mysql.com/doc/refman/8.0/en/can-not-connect-to-server.html)

       state on the server side. With this fix, the connection

       remains in the TIME_WAIT

       (https://dev.mysql.com/doc/refman/8.0/en/can-not-connect-to-server.html)

       state on the client side instead, in most cases.

       (Bug #29054329, Bug #93590)

     * 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)

     * PreparedStatement.setTimestamp threw a

       NullPointerException if getParameterMetaData() was called

       before the statement was executed. This fix adds the

       missing null checks to getParameterMetaData() to avoid

       the exception. (Bug #28529781, Bug #92089)

     * Setting the connection property characterEncoding to an

       encoding that maps to the MySQL character set latin1 or

       utf8mb4 did not result in the corresponding default

       connection collation (latin1_swedish_ci or

       utf8mb4_0900_ai_ci, respectively) to be used on the

       server. With this fix, the server default is used in the

       situation. (Bug #28207422)

     * Characters returned in a ResultSet were garbled when a

       server-side PreparedStatement was used, and the query

       involved concatenation of a number and a string with

       multi-byte characters. That was due to an issue with the

       number-to-string conversion involved, which has been

       corrected by this fix. (Bug #27453692)

     * ResultSet.updateRow() failed with a

       MySQLSyntaxErrorException when the server was in

       NO_BACKSLASH_ESCAPES SQL mode and some but not all text

       columns were updated. It was because Connector/J sent the

       strings as hex literals in that case and added to them

       unnecessary quotes for escapes. This fix add checks to

       avoid quotes for being added unnecessarily. (Bug

       #22850444, Bug #80441)

     * PreparedStatement.executeUpdate() failed with a

       MySQLSyntaxErrorException when the server was in

       NO_BACKSLASH_ESCAPES SQL mode and BLOB data types were

       involved in the statement. It was because Connector/J did

       not escape single quotes in BLOB value properly in

       NO_BACKSLASH_ESCAPES mode, and the problem has been

       corrected by this fix. (Bug #20913289)

     * When a procedure and a function with the same name

       existed in a database, Connector/J retrieved parameter

       information from both at the same time by default,

       causing various errors at statement executions. This fix

       leverages the JDBC 4 DatabaseMetaData methods to return

       parameter information only from the procedure or function

       of interest, so that statements are executed without

       errors. (Bug #19531305, Bug #73774)

     * Calling ProfilerEvent.pack() resulted in an

       ArrayIndexOutOfBoundsException. It was due to a

       mishandling of data types, which has been corrected by

       this fix. (Bug #11750577, Bug #41172)

On Behalf of Oracle/MySQL Release Engineering Team,

Hery Ramilison

MySQL Connector/J 8.0.17 has been released

Dear MySQL users,

MySQL Connector/J 8.0.17 is the latest General Availability
release of the MySQL Connector/J 8.0 series.  It is suitable
for use with MySQL Server versions 8.0, 5.7, and 5.6.
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-17.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.17 GA, see the “Generally Available
(GA) Releases” tab at http://dev.mysql.com/downloads/connector/j/

Enjoy!

———————————————————————–

Changes in MySQL Connector/J 8.0.17 (2019-07-22, General
Availability)

Functionality Added or Changed

     * X DevAPI: The following methods have been deprecated:

          + Collection.find().where()

          + Collection.modify().where()

          + Collection.remove().where()

     * X DevAPI: Two new operators for JSON objects and arrays,
       overlaps and not_overlaps, are now supported. See the X
       DevAPI User Guide
       (https://dev.mysql.com/doc/x-devapi-userguide/en/) for
       details.

     * X DevAPI: Indexing for array fields is now supported. See
       Indexing Array Fields
       (https://dev.mysql.com/doc/x-devapi-userguide/en/collecti
       on-indexing.html#collection-indexing-array) in the X
       DevAPI User Guide
       (https://dev.mysql.com/doc/x-devapi-userguide/en/) for
       details.

     * The README and LICENSE files are now included inside the
       Connector/J JAR archive delivered in the
       platform-independent tarballs and zip files. (Bug
       #29591275)

     * A number of private parameters of ProfilerEvents (for
       example, hostname) had no getters for accessing them from
       outside of the class instance. Getter methods have now
       been added for all the parameters of the class. (Bug
       #20010454, Bug #74690)

     * A new connection property, databaseTerm, sets which of
       the two terms is used in an application to refer to a
       database. The property takes one of the two values
       CATALOG or SCHEMA and uses it to determine which
       Connection methods can be used to set/get the current
       database, which arguments can be used within the various
       DatabaseMetaData methods to filter results, and which
       fields in the ResultSet returned by DatabaseMetaData
       methods contain the database identification information.
       See the entry for databaseTerm in Configuration
       Properties
(https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html)
       for details. Also, the connection property
       nullCatalogMeansCurrent has been renamed to
       nullDatabaseMeansCurrent. The old name remains an alias
       for the connection property. Thanks to Harald Aamot for
       contributing to the patch.
       (Bug #11891000, Bug #27356869, Bug #89133)

     * A new CONTRIBUTING file has been added to the Connector/J
       repository on GitHub
       (https://github.com/mysql/mysql-connector-j), which
       provides guidelines for code contribution and bug
       reporting.

     * The MySQL Connector/J X DevAPI Reference can now be
       generated from the Connector/J source code as an Ant
       target, xdevapi-docs.

     * Added support for host names that are longer than 60
       characters (up to 255 characters), as they are now
       supported by MySQL Server 8.0.17.

     * Added support for the utf8mb4_0900_bin collation, which
       is now supported by MySQL Server 8.0.17.

     * A cached server-side prepared statement can no longer be
       effectively closed by calling Statement.close() twice. To
       close and de-cache the statement, do one of the
       following:

          + Close the connection (assuming the connection is
            tracking all open resources).

          + Use the implementation-specific method
            JdbcPreparedStatement.realClose().

          + Set the statement as non-poolable by calling the
            method Statement.setPoolable(false) before or after
            closing it.

Bugs Fixed

     * X DevAPI: The IN operator in X DevAPI expressions, when
       followed by a square bracket ([), got mapped onto the
       wrong operation in X Protocol. (Bug #29821029)

     * When using a replication connection, retrieving data from
       BlobFromLocator resulted in a ClassCastException. It was
       due to some wrong and unnecessary casting, which has been
       removed by this fix. (Bug #29807741, Bug #95210)

     * ResultSetMetaData.getTableName() returned null when no
       applicable results could be returned for a column.
       However, the JDBC documentation specified an empty string
       to be returned in that case. This fix makes the method
       behave as documented. The same correction has been made
       for getCatalogName() and getSchemaName(). (Bug #29452669,
       Bug #94585)

     * ResultSetImpl.getObject(), when autoboxing a value of a
       primitive type retrieved from a column, returned a
       non-null object when the retrieved value was null. (Bug
       #29446100, Bug #94533)

     * ResultSetImpl.getDouble() was very inefficient because it
       called FloatingPointBoundsEnforcer.createFromBigDecimal,
       which needlessly recreated BigDecimal objects for the
       fixed minimum and maximum bounds. With this fix, the
       objects BigDecimal.valueOf(min) and
       BigDecimal.valueOf(max) are cached after they are first
       created, thus avoiding their recreations. (Bug #29446059,
       Bug #94442)

     * Enabling logSlowQueries resulted in many unnecessary
       calls of LogUtils.findCallingClassAndMethod(). With this
       fix, LogUtils.findCallingClassAndMethod() is called only
       when profileSQL is true and even in that case, the number
       of calls are reduced to a minimal to avoid the excessive
       stack trace data the function used to generate. Thanks to
       Florian Agsteiner for contributing to the fix. (Bug
       #29277648, Bug #94101, Bug #17640628, Bug #70677)

     * Characters returned in a ResultSet were garbled when a
       server-side PreparedStatement was used, and the query
       involved concatenation of a number and a string with
       multi-byte characters. That was due to an issue with the
       number-to-string conversion involved, which has been
       corrected by this fix. (Bug #27453692)

     * Calling ProfilerEvent.pack() resulted in an
       ArrayIndexOutOfBoundsException. It was due to a
       mishandling of data types, which has been corrected by
       this fix. (Bug #11750577, Bug #41172)

Enjoy and thanks for the support!

On Behalf of MySQL/ORACLE RE Team
Sreedhar S