MySQL Shell 8.0.19 for MySQL Server 8.0 and 5.7 has been released

Dear MySQL users,

MySQL Shell 8.0.19 is a maintenance release of MySQL Shell 8.0 Series (a
component of the MySQL Server). The MySQL Shell is provided under
Oracle’s dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0 and
5.7. Please upgrade to MySQL Shell 8.0.19.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a document
store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing an
integrated solution for high availability and scalability using InnoDB
based MySQL databases, without requiring advanced MySQL expertise. For
more information about how to configure and work with MySQL InnoDB
cluster see

https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html

The X DevAPI enables you to create “schema-less” JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language.  For more
information about how to use MySQL Shell and the MySQL Document Store
support see

https://dev.mysql.com/doc/refman/en/document-store.html

For more information about the X DevAPI see

https://dev.mysql.com/doc/x-devapi-userguide/en/

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see

https://dev.mysql.com/doc/index-connectors.html

For more information on the APIs provided with MySQL Shell see

https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/

and

https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/

Using MySQL Shell’s SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see

https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.19, see the
“General Availability (GA) Releases” tab at

http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see

http://bugs.mysql.com/

Enjoy and thanks for the support!




Changes in MySQL Shell 8.0.19 (2020-01-13, General Availability)

InnoDB Cluster Added or Changed Functionality


     * Incompatible Change: The AdminAPI now includes InnoDB
       ReplicaSets, that enables you to administer asynchronous
       replication set ups in a similar way to InnoDB cluster.
       The addition of InnoDB ReplicaSet means that the InnoDB
       cluster metadata schema has been upgraded to version 2.0.
       Regardless of whether you plan to use InnoDB ReplicaSet
       or not, to use MySQL Shell 8.0.19 and AdminAPI you must
       upgrade the metadata of your clusters. Connect MySQL
       Shell’s global session to your cluster and use the new
       dba.upgradeMetadata() operation to upgrade the cluster’s
       metadata to use the new metadata.
       Warning
       Without upgrading the metadata you cannot use MySQL Shell
       8.0.19 to change the configuration of a cluster created
       with earlier versions. You can only read the
       configuration of the cluster, for example using
       Cluster.status().
       The dba.upgradeMetadata() operation upgrades any
       automatically created MySQL Router users to have the
       correct privileges. Manually created MySQL Router users
       with a name not starting with mysql_router_ are not
       automatically upgraded. This is an important step in
       upgrading your cluster, only then can the MySQL Router
       application be upgraded.
       Warning
       A cluster which is using the new metadata cannot be
       administered by earlier MySQL Shell versions, for example
       once you upgrade to version 8.0.19 you can no longer use
       version 8.0.18 or earlier to administer the cluster.
       To get information on which of the MySQL Router instances
       registered with a cluster require the metadata upgrade,
       issue
       cluster.listRouters({‘onlyUpgradeRequired’:’true’}).

     * AdminAPI now supports socket connections to be used for
       cluster and replica set operations. (Bug #26265826)

     * You can now get information about the MySQL Router
       instances registered with a InnoDB cluster, and
       unregister a Router from a cluster, for example when you
       stop using it. The list of Routers registered with a
       cluster contains information about whether the Router
       instance is compatible with the version of MySQL on the
       cluster instances, which guides you when upgrading a
       cluster. Use the Cluster.listRouters() operation to show
       a list of all Routers registered with the cluster. The
       returned JSON object provides information such as the
       hostname, ports, and if an upgrade is required. To filter
       the list to only show Router instances that do not
       support the latest metadata version use the
       onlyUpgradeRequired option, for example by issuing
       Cluster.listRouters({‘onlyUpgradeRequired’:’true’}). To
       remove a registered Router from a cluster, use the
       Cluster.removeRouterMetadata(router) operation.

     * The AdminAPI includes support for InnoDB ReplicaSet, that
       enables you to administer asynchronous replication sets
       in a similar way to InnoDB cluster. InnoDB ReplicaSet
       enables you to deploy an asynchronous replication set
       consisting of a single primary and multiple secondaries
       (traditionally referred to as the MySQL replication
       master and slaves). You administer a ReplicaSet using
       AdminAPI operations, for example to check the status of
       the InnoDB ReplicaSet, and manually failover to a new
       primary in the event of a failure. Similar to InnoDB
       cluster, MySQL Router supports bootstrapping against
       InnoDB ReplicaSet, which means you can automatically
       configure MySQL Router to use your InnoDB ReplicaSet
       without having to manually configure files. This makes
       InnoDB ReplicaSet a quick and easy way to get MySQL
       replication and MySQL Router up and running, making it
       well suited to scaling out reads, development
       environments, and applications that do not require the
       high availability offered by InnoDB cluster.

InnoDB Cluster Bugs Fixed


     * The dba.configureLocalInstance() operation could fail
       with a key not found (LogicError) error when executed on
       a non-sandbox instance where it did not have access to
       the my.cnf option file and the operation requested an
       output configuration file to be specified. (Bug
       #30657204)

     * If a cluster had been deployed with MySQL Shell version
       8.0.14 or earlier, the metadata contained an invalid port
       number for X Protocol connections. The metadata upgrade
       catches such ports and removes the invalid number. To
       avoid problems with routing due to this incorrect port,
       upgrade your cluster’s metadata. (Bug #30618264)

     * When a replication slave was configured to read from an
       InnoDB cluster primary, even with the appropriate
       replication filtering to ignore the metadata replication
       was failing when an instance was added to the cluster
       using MySQL Clone as the recovery method. This was
       because the recovery process was granting a privilege on
       an account, which failed and broke replication. (Bug
       #30609075)

     * The Cluster.removeInstance() operation was issuing a
       misleading error message when the instance was
       unreachable, indicating that it did not belong to the
       cluster when an alternative valid host or IP was used.
       Now, the error indicates that the instance is
       unreachable. (Bug #30580393)

     * Although MySQL Shell version 8.0.18 added support for
       IPv6 in WL#12758
       (https://dev.mysql.com/worklog/task/?id=12758), using an
       InnoDB cluster which consisted of MySQL Shell version
       8.0.18 and MySQL Router 8.0.18 with IPv6 addresses was
       not possible. With the release of version 8.0.19 of both
       MySQL Shell and MySQL Router, be aware that:

          + combining MySQL Shell version 8.0.18 with MySQL
            Router 8.0.18 causes Router to fail, due to no IPv6
            support. (BUG#30354273)

          + combining MySQL Shell version 8.0.18 with Router
            8.0.19 in a cluster which uses X Protocol
            connections, results in AdminAPI storing mysqlX IPv6
            values incorrectly in the metadata, causing Router
            to fail. (BUG#30548843) However, combining MySQL
            Shell version 8.0.18 with Router 8.0.19 in a cluster
            which uses MySQL classic protocol connections, is
            possible.
       Therefore, to use InnoDB cluster with IPv6 addresses,
       regardless of the protocol used, the recommended
       deployment is MySQL Shell 8.0.19 and MySQL Router 8.0.19.
       (Bug #30548843)
       References: See also: Bug #30354273.

     * When using automatic rejoin, if a target instance was
       rejoining the cluster, operations such as
       dba.rebootClusterFromCompleteOutage(), Cluster.status(),
       and so on were failing. Now, clusters consider automatic
       rejoin as an instance state instead of a check that
       always aborts the operation. This ensures that
       Cluster.status() is reported even for instances which are
       rejoining the cluster, and that
       dba.rebootClusterFromCompleteOutage() can detect
       instances which are rejoining the cluster and override
       the rejoin operation so that the cluster can be properly
       rebooted. (Bug #30501590)

     * SSL client certificate options for the clusterAdmin user
       were not being copied when setting up connection options,
       which made them fail when connecting. (Bug #30494198)

     * When the automatically calculated localAddress is not
       valid, for example when it exceeds the valid range, the
       error message has now been improved. See Configuring
       Ports
       (https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-production-deployment.html#configuring-instance-ports).
       (Bug #30405569)

     * The AdminAPI ensures that all members of a cluster have
       the same consistency level as configured at cluster
       creation time. However, when high and non-default
       consistency levels were chosen for the cluster, adding
       instances to it resulted in an error 3796 which indicates
       that group_replication_consistency cannot be used on the
       target instance. This happened because the consistency
       values of BEFORE, AFTER and BEFORE_AND_AFTER cannot be
       used on instances that are RECOVERING and several
       transactions happen while the instance is in the
       RECOVERING phase. Other AdminAPI commands result in the
       same error for the same scenario (high global consistency
       levels) whenever at least one member of the cluster is
       RECOVERING. For example, dba.getCluster(). The fix
       ensures that all sessions used by the AdminAPI use the
       consistency level of EVENTUAL when the cluster’s
       consistency level is BEFORE, AFTER or BEFORE_AND_AFTER.
       (Bug #30394258, Bug #30401048)

     * Some privileges required for persisting configuration
       changes on MySQL 8.0 servers were missing for the
       clusterAdmin users created by AdminAPI. In particular, an
       Access Denied error was being issued indicating the
       SYSTEM_VARIABLES_ADMIN and PERSIST_RO_VARIABLES_ADMIN
       privileges were required. Now these privileges are added
       for the clusterAdmin user on MySQL 8.0 servers. (Bug
       #30339460)

     * When using MySQL Clone as the recovery method, trying to
       add an instance that did not support RESTART to a cluster
       caused MySQL Shell to stop unexpectedly. Now, in such a
       situation a message explains that Cluster.rescan() must
       be used to ensure the instance is added to the metadata.
       (Bug #30281908)

     * The autocommit and sql_mode system variables are session
       settings, but they can be set globally to different
       values. AdminAPI was failing if these variables had
       non-default values in several different ways, for example
       DML was failing, system variables could not be set and so
       on. (Bug #30202883, Bug #30324461)

     * Attempting to bootstrap MySQL Router against an InnoDB
       cluster which had had the cluster administration user
       modified or removed was failing. This was caused by the
       privileges granted on the InnoDB cluster metadata table.
       The recommended solution is to upgrade to metadata 2.0,
       which changes the privileges on the metadata to ensure
       this issue does not occur. (Bug #29868432)

     * When you created a multi-primary cluster, the
       group_replication_enforce_update_everywhere_checks system
       variable was not being set automatically. However,
       switching to multi-primary mode automatically enables
       group_replication_enforce_update_everywhere_checks and
       switching to single-primary disables it. Now, the
       dba.createCluster() operation sets the
       group_replication_enforce_update_everywhere_checks
       variable as appropriate for single-primary or
       multi-primary clusters. (Bug #29794779)

     * In version 8.0.16, the autoRejoinTries option was added
       to define the number of times an instance attempts to
       rejoin the cluster after being expelled. The option is a
       valid cluster setting, configurable through the AdminAPI
       like many other options. However, the autoRejoinTries
       option was not being listed by Cluster.options(). (Bug
       #29654346)

     * The InnoDB cluster metadata now supports host names up to
       265 characters long, where 255 characters can be the host
       part and the remaining characters can be the port number.
       (Bug #29507913)

     * dba.createCluster() could fail if the instance had been
       started with innodb_default_row_format=COMPACT or
       innodb_default_row_format=REDUNDANT. This was because no
       ROW_FORMAT was specified on the InnoDB cluster metadata
       tables, which caused them to use the one defined in
       innodb_default_row_format. The metadata schema has been
       updated to use ROW_FORMAT = DYNAMIC. (Bug #28531271)

     * When an instance restarted, for example after a complete
       outage, it could have super_read_only disabled. This
       meant that instances which were not the primary could be
       written to, resulting in the instances no longer being in
       synchrony. This could result in
       dba.rebootClusterFromCompleteOutage() failing with a
       Conflicting transaction sets error. The fix ensures that
       all instances have super_read_only=1 persisted while they
       belong to the cluster, either through SET PERSIST_ONLY,
       or through dba.configureLocalInstance() for instances
       which do not support persisting. (Bug #97279, Bug
       #30545872)

     * The Cluster.status() operation could report an error
       get_uint(24): field value out of the allowed range
       because it was always expecting a positive value for some
       fields that could in fact have negative values. For
       example, this could happen when the clocks of different
       instances were offset. (Bug #95191, Bug #29705983)

     * If you changed the name of the clusterAdmin user once a
       cluster had been created, you could encounter an error
       such as The user specified as a definer does not exist.
       This was because the clusterAdmin user was used as the
       DEFINER of the views required by InnoDB cluster, and if
       this user is renamed then the definer is in effect
       missing. In version 8.0.19 the InnoDB cluster metadata
       has been changed to avoid this problem, use
       dba.upgradeMetadata() to upgrade the cluster. Clusters
       deployed with 8.0.19 and later do not suffer from this
       issue. (Bug #92128, Bug #28541069)

     * It was not possible to create a multi-primary cluster due
       to to cascading constraints on the InnoDB cluster
       metadata tables. This has been fixed in version 8.0.19
       and so to solve this issue upgrade your cluster using
       dba.upgradeMetadata(). (Bug #91972, Bug #29137199)

Functionality Added or Changed


     * The JavaScript function require() has been improved in
       MySQL Shell to support loading of local modules, in
       addition to built-in modules and modules that are on
       module search paths already known to MySQL Shell. If you
       specify the module name or path prefixed with ./ or ../,
       MySQL Shell now searches for the specified module in the
       folder that contains the JavaScript file or module
       currently being executed, or in interactive mode,
       searches in the current working directory. If the module
       is not found in that folder, MySQL Shell proceeds to
       check the well-known module search paths specified by the
       sys.path variable.

     * MySQL Shell’s upgrade checker utility (the
       util.checkForServerUpgrade() operation) includes the
       following new and extended checks:

          + The utility now flags all date, datetime, and
            timestamp columns that have a default value of zero,
            and states if the SQL mode (either global or for the
            current session) allows the insertion of zero values
            for these column types. By default, these are no
            longer permitted in MySQL, and it is strongly
            advised to replace zero values with valid ones, as
            they might not work correctly in the future.

          + The check for usage of removed functions now
            includes the PASSWORD() function.

          + The utility now checks for any orphaned tables which
            are recognized by InnoDB, but the SQL layer thinks
            they are handled by a different storage engine. This
            situation can happen if manual updates are made in
            the data directory. Orphaned tables can stall the
            upgrade process if they are present.

     * In MySQL Shell’s interactive mode, for JavaScript,
       Python, or SQL, the \source command or its alias \. can
       be used to execute code from a script file at a given
       path. For compatibility with the mysql client, in SQL
       mode only, you can now execute code from a script file
       using the source command with no backslash and an
       optional SQL delimiter. source can be used both in MySQL
       Shell’s interactive mode for SQL, to execute a script
       directly, and in a file of SQL code processed in batch
       mode, to execute a further script from within the file.
       In SQL mode only, you can also now use the \source
       command’s alias \. (which does not use a SQL delimiter)
       in a file of SQL code processed in batch mode. So with
       MySQL Shell in SQL mode, you could now execute the script
       in the /tmp/mydata.sql file from either interactive mode
       or batch mode using any of these three commands:
        source /tmp/mydata.sql;
        source /tmp/mydata.sql
        \. /tmp/mydata.sql

       The command \source /tmp/mydata.sql is also valid, but in
       interactive mode only.

Bugs Fixed


     * When searching for startup scripts in the platform’s
       standard global configuration path (in the folder
       %PROGRAMDATA%\MySQL\mysqlsh on Windows, or
/etc/mysql/mysqlsh/ on Unix), MySQL Shell checked for the
       incorrect script name shellrc, rather than the correct
       name mysqlshrc. (Bug #30656548)

     * On Windows, MySQL Shell passed UTF-8 encoded strings to
       the NTFS file system, which stores file names in UTF-16
       encoding. The mismatch caused files and folders to be
       incorrectly named or located when non-ASCII characters
       were used. MySQL Shell now converts all strings used in
       operations on NTFS from UTF-8 to UTF-16, and converts
       back to UTF-8 all strings received from Unicode function
       versions of Windows API calls. (Bug #30538516)

     * Some host names were not parsed correctly in the
       connection data provided when running MySQL Shell’s
       upgrade checker utility checkForServerUpgrade(). (Bug
       #30536355)

     * If the MySQL Server environment variable MYSQL_UNIX_PORT
       (which specifies the default Unix socket file) was
       updated by the same process that was then used to create
       a MySQL Shell connection to a MySQL server using a socket
       file, MySQL Shell cached and connected using the socket
       file path that had previously been set, but reported that
       a connection had been made using the updated socket file
       path. The correct socket file used for the connection is
       now displayed. (Bug #30533318)

     * If a prompt theme file used to customize the MySQL Shell
       prompt contained an ill-formed UTF-8 sequence, on startup
       an error message was displayed in place of the prompt
       text. MySQL Shell now validates the prompt theme file
       before loading it, and if there is a problem, uses a
       default prompt instead and issues an error message. (Bug
       #30406283)

     * If MySQL Shell was installed on Microsoft Windows at a
       non-default location, and subsequently uninstalled, files
       created after installation by the Python library used by
       MySQL Shell were not removed. These files are now removed
       when MySQL Shell is uninstalled from any location. (Bug
       #30333801)

     * Previously, most MySQL Shell options that expected an
       integer value could be set with an empty value, in which
       case the value 1 was applied. The exception was the
       logLevel option, which required a value. The behavior has
       now been standardized so all MySQL Shell options that
       expect a non-string value must be specified with a value,
       with the exception of options set on the command line.
       The affected options are dba.gtidWaitTimeout, dba.logSql,
       history.maxSize, and verbose. (Bug #30320839)

     * When using MySQL Shell in interactive mode, using a
       template literal in a multiple-line JavaScript statement
       resulted in an error. The issue has now been fixed. (Bug
       #30248651)

     * In Python mode, when multiple statements were input to
       MySQL Shell at the same time for execution in interactive
       mode, only the first statement was executed correctly.
       (Bug #30029568)

     * The Debian control file for MySQL Shell has been
       corrected to remove packaging errors that occurred when
       certain variables were not defined. Thanks to Evgeniy
       Patlan for the fix. (Bug #29802600, Bug #95158)

     * In MySQL Shell’s parser for URI-like connection strings,
       handling of path separators was previously platform
       dependent. Unified parsing has now been introduced so
       that Windows named pipes can be parsed correctly on Unix
       platforms, and Unix socket files can be parsed correctly
       on Windows platforms. (Bug #29456981)

     * MySQL Shell now looks up host names by obtaining the
       fully qualified domain name of the provided address and
       using the absolute form of this name (with a trailing
       dot). This method avoids potential issues caused by some
       network configurations that resolve host names as
       loopback addresses when they are actually addressable
       externally. (Bug #27704559)


On Behalf of Oracle/MySQL Release Engineering Team,
Hery Ramilison

MySQL Shell 8.0.18 for MySQL Server 8.0 and 5.7 has been released

Dear MySQL users,

MySQL Shell 8.0.18 is a maintenance release of MySQL Shell 8.0 Series (a
component of the MySQL Server). The MySQL Shell is provided under
Oracle’s dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0 and
5.7. Please upgrade to MySQL Shell 8.0.18.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a document
store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing an
integrated solution for high availability and scalability using InnoDB
based MySQL databases, without requiring advanced MySQL expertise. For
more information about how to configure and work with MySQL InnoDB
cluster see

  https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html

The X DevAPI enables you to create “schema-less” JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language.  For more
information about how to use MySQL Shell and the MySQL Document Store
support see

  https://dev.mysql.com/doc/refman/en/document-store.html

For more information about the X DevAPI see

  https://dev.mysql.com/doc/x-devapi-userguide/en/

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see

  https://dev.mysql.com/doc/index-connectors.html

For more information on the APIs provided with MySQL Shell see

  https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/

and

  https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/

Using MySQL Shell’s SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see

  https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.18, see the
“General Availability (GA) Releases” tab at

  http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see

  http://bugs.mysql.com/

Enjoy and thanks for the support!


Changes in MySQL Shell 8.0.18 (2019-10-14, General Availability)

     * InnoDB Cluster Added or Changed Functionality

     * InnoDB Cluster Bugs Fixed

     * Functionality Added or Changed

     * Bugs Fixed

InnoDB Cluster Added or Changed Functionality


     * MySQL Shell can now optionally log SQL statements that
       are executed by AdminAPI operations, and output them to
       the console if the –verbose option is set. The
       dba.logSql MySQL Shell configuration option or
       –dba-log-sql command line option activates logging for
       these statements. Statements executed by sandbox
       operations are excluded. Viewing the statements lets you
       observe the progress of the AdminAPI operations in terms
       of SQL execution, which can help with problem diagnosis
       for any errors.

     * AdminAPI now supports IPv6 addresses if the target MySQL
       Server version is higher than 8.0.13. When using MySQL
       Shell 8.0.18 or higher, if all cluster instances are
       running 8.0.14 or higher then you can use an IPv6 or
       hostname that resolves to an IPv6 address for instance
       connection strings and with options such as localAddress,
       groupSeeds and ipWhitelist. For more information on using
       IPv6 see Support For IPv6 And For Mixed IPv6 And IPv4
       Groups
(https://dev.mysql.com/doc/refman/8.0/en/group-replication-ipv6.html).
       References: See also: Bug #29557250, Bug #30111022, Bug
       #28982989.

     * You can now reset the passwords for the internal recovery
       accounts created by InnoDB cluster, for example to follow
       a custom password lifetime policy. Use the
       Cluster.resetRecoveryAccountsPassword() operation to
       reset the passwords for all internal recovery accounts
       used by the cluster. The operation sets a new random
       password for the internal recovery account on each
       instance which is ONLINE. If an instance cannot be
       reached, the operation fails. You can use the force
       option to ignore such instances, but this is not
       recommended, and it is safer to bring the instance back
       online before using this operation. This operation only
       applies to the passwords created by InnoDB cluster and
       cannot be used to update manually created passwords.
       Note
       The user which executes this operation must have all the
       required clusterAdmin privileges, in particular CREATE
       USER, in order to ensure that the password of recovery
       accounts can be changed regardless of the password
       verification-required policy. In other words, independent
       of whether the password_require_current system variable
       is enabled or not.

     * MySQL Shell now supports specifying TLS version 1.3 and
       TLS cipher suites for classic MySQL protocol connections.
       You can use:

          + the –tls-version command option to specify TLS
            version 1.3.

          + the –tls-ciphersuites command option to specify
            cipher suites.

          + the tls-versions and tls-ciphersuites connection
            parameters as part of a URI-type connection string.
       Note
       tls-versions (plural) does not have a key-value
       equivalent, it is only supported in URI-type connection
       strings. Use tls-version to specify TLSv1.3 in a
       key-value connection string.
       To use TLS version 1.3, both MySQL Shell and MySQL server
       must have been compiled with OpenSSL 1.1.1 or higher. For
       more information see Using Encrypted Connections
(https://dev.mysql.com/doc/refman/8.0/en/encrypted-connections.html).


InnoDB Cluster Bugs Fixed


     * The Cluster.rejoinInstance() operation was not setting
       the auto increment values defined for InnoDB cluster,
       leading to the use of the default Group Replication
       behavior if the instance configuration was not properly
       persisted, for example on 5.7 servers. The fix ensures
       that the Cluster.rejoinInstance() operation updates the
       auto increment settings of the target instance. (Bug
       #30174191)

     * The output of Cluster.status() now includes the
       replicationLag field. The value is displayed in HH:MM:SS
       format and shows the time difference between the last
       transaction commit timestamp and the last transaction
       applied timestamp. This enables you to monitor the amount
       of time between the most recent transaction being
       committed and being applied on an instance. (Bug
       #30003034)

     * Cluster.addInstance() did not ensure that the MySQL Clone
       plugin was installed or loaded on all cluster instances,
       when available and not disabled. This meant that whenever
       a cluster was created using an older MySQL Shell version,
       on a target MySQL instance supporting clone, the instance
       would not have the clone plugin installed. The result was
       that any Cluster.addInstance() call that used clone would
       fail. The same issue happened if an instance was added to
       a cluster consisting of one instance using the
       incremental recovery type and afterwards the seed
       instance was removed. This resulted in all cluster
       instances not having the clone plugin installed and
       therefore any instance added using the clone recovery
       method would fail. The fix ensures that the clone plugin
       is installed on all cluster members (if available and not
       disabled) at cluster creation time and also whenever an
       instance is added to a cluster. (Bug #29954085)

     * The Cluster.rejoinInstance() operation was not checking
       the GTID consistency of an instance being rejoined to a
       cluster, which could result in data diverging. Now, the
       GTID consistency checks conducted as part of the
       Cluster.rejoinInstance() operation have been improved to
       check for irrecoverable or diverged data-sets and also
       for empty GTID sets. If an instance is found to not be
       consistent with the cluster, it is not rejoined and the
       operation fails with a descriptive error. You are also
       shown the list of errant transactions, possible outcomes
       and solutions. (Bug #29953812)

     * Cluster.describe() was retrieving information about the
       cluster’s topology and the MySQL version installed on
       instances directly from the current session. Now, the
       information is retrieved from the Metadata schema, and
       the MySQL version is not included in the information
       output by Cluster.describe(). (Bug #29648806)

     * Using a password containing the ‘ character caused
       dba.deploySandbox() to fail. Now, all sensitive data is
       correctly wrapped to avoid such issues. (Bug #29637581)

     * The Cluster.addInstance() operation creates internal
       recovery users which are required by the Group
       Replication recovery process. If the
       Cluster.addInstance() operation failed, for example
       because Group Replication could not start, the created
       recovery users were not removed. Now, in the event of a
       failure any internal users are removed. (Bug #25503159)

     * When a cluster had lost quorum and the majority of the
       cluster instances were offline except the primary, after
       reestablishing quorum and adding a new instance to the
       cluster, it was not possible to remove and add the
       previous primary instance to the cluster. This was
       because the operation failed when trying to contact
       offline instances, which was because the feature to
       verify if a Group Replication protocol upgrade is
       required was not considering the possibility of some
       cluster instances being offline (not reachable). The fix
       improves the Group Replication protocol upgrade handling
       for the Cluster.removeInstance() operation, which now
       attempts to connect to other cluster instances and use
       the first reachable instance for this purpose. (Bug
       #25267603)

     * The dba.configureInstance() operation was not setting the
       binlog_checksum option with the required value (NONE) in
       the option file for instances that did not support SET
       PERSIST (for example instances running MySQL 5.7), when
       the option file path was not provided as an input
       parameter but instead specified though the operation
       wizard in interactive mode. (Bug #96489, Bug #30171090)

Functionality Added or Changed


     * MySQL Shell’s upgrade checker utility (the
       util.checkForServerUpgrade() operation) includes the
       following new and extended checks:

          + The utility now checks for tablespace names
            containing the string “FTS”, which can be
            incorrectly identified as tablespaces of full-text
            index tables, preventing upgrade. The issue has been
            fixed in MySQL 8.0.18, but affects upgrades to
            earlier MySQL 8.0 releases.

          + The check for database objects with names that
            conflict with reserved keywords now covers the
            additional keywords ARRAY, MEMBER, and LATERAL.

          + – The checks for obsolete sql_mode flags now check
            the global sql_mode setting.
       Running the upgrade checker utility no longer alters the
       gtid_executed value, meaning that the utility can be used
       on Group Replication group members without affecting
       their synchronization with the group. The upgrade checker
       also now works correctly with the ANSI_QUOTES SQL mode.
       (Bug #30002732, Bug #30103683, Bug #96351)
       References: See also: Bug #29992589.

     * MySQL Shell has two new built-in reports, which provide
       information drawn from various sources including MySQL’s
       Performance Schema:

          + threads lists the current threads in the connected
            MySQL server which belong to the user account that
            is used to run the report. Using the report-specific
            options, you can choose to show foreground threads,
            background threads, or all threads. You can report a
            default set of information for each thread, or
            select specific information to include in the report
            from a larger number of available choices. You can
            filter, sort, and limit the output.

          + thread provides detailed information about a
            specific thread in the connected MySQL server. By
            default, the report shows information on the thread
            used by the current connection, or you can identify
            a thread by its ID or by the connection ID. You can
            select one or more categories of information, or
            view all of the available information about the
            thread.
       You can run the new reports using MySQL Shell’s \show and
       \watch commands. The reports work with servers running
       all supported MySQL 5.7 and MySQL 8.0 versions. If any
       item of information is not available in the MySQL Server
       version of the target server, the reports leave it out.

     * MySQL Shell has two new control commands:

          + The \edit (\e) command opens a command in the
            default system editor for editing. If you specify an
            argument to the command, this text is placed in the
            editor, and if you do not, the last command in the
            MySQL Shell history is placed in the editor. When
            you have finished editing, MySQL Shell presents your
            edited text ready for you to execute or cancel. The
            command can also be invoked using the short form \e
            or the key combination Ctrl-X Ctrl-E.

          + The \system (\!) command runs the operating system
            command that you specify as an argument to the
            command, then displays the output from the command
            in MySQL Shell. MySQL Shell returns an error if it
            was unable to execute the command.

     * MySQL Shell now uses Python 3. For platforms that include
       a system supported installation of Python 3, MySQL Shell
       uses the most recent version available, with a minimum
       supported version of Python 3.4.3. For platforms where
       Python 3 is not included, MySQL Shell bundles Python
       3.7.4. MySQL Shell maintains code compatibility with
       Python 2.6 and Python 2.7, so if you require one of these
       older versions, you can build MySQL Shell from source
       using the appropriate Python version.

Bugs Fixed


     * In debug mode, MySQL Shell raised an assertion when
       handling a character contained in SQL strings. (Bug
       #30286680)

     * If a Python lambda was added as a member of a MySQL Shell
       extension object, the Python object was not released
       correctly when MySQL Shell shut down, causing a
       segmentation fault. (Bug #30156304)

     * A memory leak could occur when Python code was executed
       in interactive mode. (Bug #30138755)

     * Help information for a MySQL Shell report could not be
       displayed unless there was an active session. MySQL Shell
       now checks for an open session only before actually
       running the report. (Bug #30083371)

     * If a default schema was set for the MySQL Shell
       connection, and a different default schema was set after
       the connection was made, MySQL Shell’s \reconnect command
       attempted to use the default schema from the original
       connection. The user’s current default schema is now used
       for the reconnection attempt. (Bug #30059354)

     * Due to a bug introduced by a change in MySQL Shell
       8.0.16, the MSI file that is used by Windows Installer to
       install MySQL Shell overwrote the Windows PATH
       environment variable with the path to the application
       binary (mysqlsh), removing any other paths present. The
       issue has now been fixed. (Bug #29972020, Bug #95432)

     * When the \reconnect command is used to attempt
       reconnection to a server, if the last active schema set
       by the user appears to be no longer available, MySQL
       Shell now attempts to connect with no schema set. (Bug
       #29954572)

     * In interactive mode, MySQL Shell now handles multiline
       comments beginning with a slash and asterisk (/*) and
       ending with an asterisk and slash (*/). (Bug #29938424)

     * The MySQL Shell \source command was not handled correctly
       when used in combination with SQL statements. (Bug
       #29889926)

     * With MySQL Shell in SQL mode, if multiple SQL statements
       including a USE statement were issued on a single line
       with delimiters, the USE statement was not handled
       correctly. (Bug #29881615)

     * If MySQL Shell’s JSON import utility was used to send a
       large number of JSON documents to a server with
       insufficient processing capacity, the utility could fill
       up the write queue with batches of prepared documents,
       causing the connection to time out and the import to
       fail. The utility now waits to read the response from the
       server before sending the next batch of prepared
       documents to the server. (Bug #29878964)

     * When MySQL Shell was built from source with a bundled
       OpenSSL package, the required linker flags were not set.
       The issue has now been fixed. (Bug #29862189)

     * If a new query was executed in MySQL Shell while a result
       was still active, resulting in rows being cached, not all
       rows were returned by the old query. (Bug #29818714)


On Behalf of Oracle/MySQL Release Engineering Team,
Balasubramanian Kandasamy

MySQL Shell 8.0.17 for MySQL Server 8.0 and 5.7 has been released

Dear MySQL users,

MySQL Shell 8.0.17 is a maintenance release of MySQL Shell 8.0 Series (a
component of the MySQL Server). The MySQL Shell is provided under
Oracle’s dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0 and
5.7. Please upgrade to MySQL Shell 8.0.17.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a document
store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing an
integrated solution for high availability and scalability using InnoDB
based MySQL databases, without requiring advanced MySQL expertise. For
more information about how to configure and work with MySQL InnoDB
cluster see

https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html

The X DevAPI enables you to create “schema-less” JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language.  For more
information about how to use MySQL Shell and the MySQL Document Store
support see

https://dev.mysql.com/doc/refman/en/document-store.html

For more information about the X DevAPI see

https://dev.mysql.com/doc/x-devapi-userguide/en/

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see

https://dev.mysql.com/doc/index-connectors.html

For more information on the APIs provided with MySQL Shell see

https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/

and

https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/

Using MySQL Shell’s SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see

https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.17, see the
“Generally Available (GA) Releases” tab at

http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see

http://bugs.mysql.com/

Enjoy and thanks for the support!


Changes in MySQL Shell 8.0.17 (2019-07-22, General Availability)


InnoDB Cluster Added or Changed Functionality


     * Important Change: The handling of internal recovery
       accounts created by InnoDB cluster has been changed so that by
       default accounts are always created as
       “mysql_innodb_cluster_server_id@%”, where server_id is instance
       specific. This generated recovery account name is stored in the
       InnoDB cluster metadata, to ensure the correct account is always
       removed if the instance is removed from the cluster.  The
       previous behavior where multiple accounts would be created if
       ipWhitelist was given has been removed. In addition
       Cluster.removeInstance() no longer removes all recovery accounts
       on the instance being removed. It now removes the recovery
       account of the instance being removed on the primary and waits
       for the changes to be replicated before actually removing the
       instance from the group. Similarly, Cluster.rejoinInstance() no
       longer drops any recovery accounts. It only creates the recovery
       account of the instance being rejoined if it no longer exists on
       the primary (which it should in normal circumstances). If the
       recovery account already exists, it is reused by
       Cluster.rejoinInstance().  When a cluster is adopted from an
       existing Group Replication deployment, new recovery accounts are
       created and set for each member. Pre-existing accounts configured
       by the user are left unchanged and not dropped, unless they have
       the “mysql_innodb_cluster_” prefix.  As part of this work, the
       behavior of dba.createCluster() and
       Cluster.rebootClusterFromCompleteOutage() operations has been
       changed. Now, if these operations encounter an instance which has
       super_read_only=ON, it is disabled automatically. Therefore the
       clearReadOnly option has been deprecated for these operations.
       References: See also: Bug #29629121, Bug #29559303.

     * The dba.createCluster() operation has been improved, and
       as part of this work the order in which some steps of the
       operation are executed was changed. Now, the creation of the
       recovery (replication) user and updates to the Metadata are
       performed after bootstrapping the Group Replication group. As
       part of this work, the dba.createCluster() operation has been
       updated to support the interactive option, which is a boolean
       value that controls the wizards provided. When interactive is
       true, prompts and confirmations are displayed by the operation.
       The default value of interactive is equal to useWizards option.

     * The compatibility policies that Group Replication
       implements for member versions in groups now consider the patch
       version of a member’s MySQL Server release. Previously, when
       combining instances running different MySQL versions, only the
       major version was considered.  InnoDB cluster has been updated to
       support cluster operations where these compatibility policies
       have an impact. Using the patch version ensures better
       replication safety for mixed version groups during group
       reconfiguration and upgrade procedures. As part of this work the
       information provided about instances has been extended.  The
       following InnoDB cluster changes have been made to support the
       compatibility policies:

          + The Cluster.addInstance() operation now detects
            incompatibilities due to MySQL versions and in the
            event of an incompatibility aborts with an
            informative error.

          + The Cluster.status() attribute mode now considers
            the value of super_read_only and whether the cluster
            has quorum.

          + The Cluster.status() output now includes the boolean
            attribute autoRejoinRunning, which is displayed per
            instance belonging to the cluster and is true when
            automatic rejoin is running.

          + The extended option has been changed to accept
            integer or Boolean values. This makes the behavior
            similar to the queryMembers option, so that option
            has now been deprecated.
       References: See also: Bug #29557250.

     * InnoDB cluster supports the new MySQL Clone plugin on
       instances running 8.0.17 and later. When an InnoDB cluster is
       configured to use MySQL Clone, instances which join the cluster
       choose whether to use Group Replication’s distributed recovery or
       MySQL Clone to recover the transactions processed by the cluster.
       You can optionally configure this behavior, for example to force
       cloning, which replaces any transactions already processed. You
       can also configure how Cluster.addInstance() behaves, letting
       cloning operations proceed in the background or showing different
       levels of progress in MySQL Shell. This enables you to
       automatically provision instances in the most efficient way. In
       addition, the output of Cluster.status() for members in
       RECOVERING state has been extended to include recovery progress
       information to enable you to easily monitor recovery operations,
       whether they be using MySQL Clone or distributed recovery.

InnoDB Cluster Bugs Fixed


     * Important Change: The sandboxes deployed using the
       AdminAPI did not support the RESTART statement. Now, the wrapper
       scripts call mysqld in a loop so that there is a monitoring
       process which ensures that RESTART is supported. (Bug #29725222)

     * The Cluster.addInstance() operation did not validate if
       the server_id of the joining instance was not unique among all
       cluster members. Although the use of a unique server_id is not
       mandatory for Group Replication to work properly (because all
       internal replication channels use –replicate-same-server-id=ON),
       it was recommended that all instances in a replication stream
       have a unique server_id. Now, this recommendation is a
       requirement for InnoDB cluster, and when you use the
       Cluster.addInstance() operation if the server_id is already used
       by an instance in the cluster then the operation fails with an
       error. (Bug #29809560)

     * InnoDB clusters do not support instances that have binary
       log filters configured, but replication filters were being
       allowed. Now, instances with replication filters are also blocked
       from InnoDB cluster usage. (Bug #29756457) References: See also:
       Bug #28064729, Bug #29361352.

     * On instances running version 8.0.16, the
       Cluster.rejoinInstance() operation failed when one or more
       cluster members were in RECOVERING state, because the Group
       Replication communication protocol could not be obtained. More
       specifically, the group_replication_get_communication_protocol()
       User-Defined function (UDF) failed because it could only be
       executed if all members were ONLINE. Now, in the event of the UDF
       failing when rejoining an instance a warning is displayed and
       AdminAPI proceeds with the execution of the operation.  Starting
       from MySQL 8.0.17, the
       group_replication_get_communication_protocol() UDF no longer
       issues an error if a member is RECOVERING. (Bug #29754915)

     * On Debian-based hosts, hostname resolves to the IP
       address 127.0.1.1 by default, which does not match a real network
       interface. This is not supported by Group Replication, which made
       sandboxes deployed on such hosts unusable unless a manual change
       to the configuration file was made. Now, the sandbox
       configuration files created by MySQL Shell contain the following
       additional line: report_host = 127.0.0.1 In other words the
       report_host variable is set to the loopback IP address. This
       ensures that sandbox instances can be used on Debian-based hosts
       without any additional manual changes. (Bug #29634828)

     * If the binary logs had been purged from all cluster
       instances, Cluster.checkInstanceState() lacked the ability to
       check the instance’s state, resulting in erroneous output values.
       Now, Cluster.checkInstanceState() validates the value of
       GTID_PURGED on all cluster instances and provides the correct
       output and also an informative message mentioning the possible
       actions to be taken. In addition, Cluster.addInstance() and
       Cluster.rejoinInstance() were not using the checks performed by
       Cluster.checkInstanceState() in order to verify the GTID status
       of the target instance in relation to the cluster.  In the event
       of all cluster instances having their binary logs purged, the
       Cluster.addInstance() command would succeed but the instance
       would never be able to join the cluster as distributed recovery
       failed to execute. Now, both operations make use of the checks
       performed by Cluster.checkInstanceState() and provide informative
       error messages. (Bug #29630591, Bug #29790569)

     * When using the dba.configureLocalInstance() operation in
       interactive mode, if you provided the path to an option file it
       was ignored. (Bug #29554251)

     * Calling cluster.removeInstance() on an instance that did
       not exist, for example due to a typo or because it was already
       removed, resulted in a prompt asking whether the instance should
       be removed anyway, and the operation then failing.
       (Bug #29540529)

     * To use an instance for InnoDB cluster, whether it is to
       create a cluster on it or add it to an existing cluster, requires
       that the instance is not already serving as a slave in
       asynchronous (master-slave) replication. Previously,
       dba.checkInstanceConfiguration() incorrectly reported that a
       target instance which was running as an asynchronous replication
       slave as valid for InnoDB cluster usage. As a consequence,
       attempting to use such instances with operations such as
       dba.createCluster() and Cluster.addInstance() failed without
       informative errors.  Now, dba.checkInstanceConfiguration()
       verifies if the target instance is already configured as a slave
       using asynchronous replication and generates an error if that is
       the case. Similarly, the dba.createCluster(),
       Cluster.addInstance(), and Cluster.rejoinInstance() operations
       detect such instances and block them from InnoDB cluster usage.
       Note that this does not prevent instances which belong to a
       cluster also functioning as the master in asynchronous
       replication. (Bug #29305551)

     * The dba.createCluster() operation was allowed on a target
       instance that already had a populated Metadata schema, when the
       instance was already in that Metadata. The Metadata present on
       the target instance was being overridden, which was unexpected.
       Now, in such a situation the dba.createCluster() throws an
       exception and you can choose to either drop the Metadata schema
       or reboot the cluster. (Bug #29271400)

     * When a sandbox instance of MySQL had been successfully
       started from MySQL Shell using dba.startSandboxInstance(),
       pressing Ctrl+C in the same console window terminated the sandbox
       instance. Sandbox instances are now launched in a new process
       group so that they are not affected by the interrupt.
       (Bug #29270460)

     * During the creation of a cluster using the AdminAPI, some
       internal replication users are created with user names which
       start with “mysql_innodb_cluster”. However, if the MySQL server
       had a global password expiration policy defined, for example if
       default_password_lifetime was set to a value other than zero,
       then the passwords for the internal users expired after reaching
       the specified period. Now, the internal user accounts are created
       by the AdminAPI with password expiration disabled.
       (Bug #28855764)

     * The dba.checkInstanceConfiguration() and
       dba.configureInstance() operations were not checking the validity
       of persisted configurations, which can be different from the
       corresponding system variable value, in particular when changed
       with SET PERSIST_ONLY. This could lead these operations to report
       wrong or inaccurate results, for example reporting that the
       instance configuration is correct when in reality the persisted
       configuration was invalid and wrong settings could be applied
       after a restart of the server, or inaccurately reporting that a
       server update was needed when only a restart was required. (Bug
       #28727505) References: See also: Bug #29765093.

     * When you removed an instance’s metadata from a cluster
       without removing the metadata from the instance itself (for
       example because of wrong authentication or when the instance was
       unreachable) the instance could not be added again to the
       cluster. Now, another validation has been added to
       Cluster.addInstance() to verify if the instance already belongs
       to the cluster’s underlying group but is not in the InnoDB
       cluster metadata, issuing an error if it already belongs to the
       ReplicaSet. Similarly, an error is issued when the default port
       automatically set for the local address is invalid (out of range)
       instead of using a random port. (Bug #28056944)

     * When issuing dba.configureInstance() in interactive mode
       and after selecting option number 2 “Create a new admin account
       for InnoDB cluster with minimal required grants” it was not
       possible to enter a password for the new user.

Functionality Added or Changed


     * MySQL Shell has a new function for SQL query execution
       for X Protocol sessions that works in the same way as the
       function for SQL query execution in classic MySQL protocol
       sessions. The new function, Session.runSql(), can be used in
       MySQL Shell only as an alternative to X Protocol’s Session.sql()
       to create a script that is independent of the protocol used for
       connecting to the MySQL server. Note that Session.runSql() is
       exclusive to MySQL Shell and is not part of the standard X
       DevAPI. As part of this change, the ClassicSession.query function
       for SQL query execution, which is a synonym of
       ClassicSession.runSQL(), is now deprecated.  A new function
       fetchOneObject() is also provided for the classic MySQL protocol
       and X Protocol to return the next result as a scripting object.
       Column names are used as keys in the dictionary (and as object
       attributes if they are valid identifiers), and row values are
       used as attribute values in the dictionary. This function enables
       the query results to be browsed and used in protocol-independent
       scripts. Updates made to the returned object are not persisted on
       the database.

     * MySQL Shell’s new parallel table import utility provides
       rapid data import to a MySQL relational table for large data
       files. The utility analyzes an input data file, divides it into
       chunks, and uploads the chunks to the target MySQL server using
       parallel connections. The utility is capable of completing a
       large data import many times faster than a standard
       single-threaded upload using a LOAD DATA statement.  When you
       invoke the parallel table import utility, you specify the mapping
       between the fields in the data file and the columns in the MySQL
       table. You can set field- and line-handling options as for the
       LOAD DATA command to handle data files in arbitrary formats. The
       default dialect for the utility maps to a file created using a
       SELECT … INTO OUTFILE statement with the default settings for
       that statement. The utility also has preset dialects that map to
       the standard data formats for CSV files (created on DOS or UNIX
       systems), TSV files, and JSON, and you can customize these using
       the field- and line-handling options as necessary.

     * MySQL Shell has a number of new display options for query
       results:

          + The shell.dumpRows() function can format a result
            set returned by a query in any of the output formats
            supported by MySQL Shell, and dump it to the
            console. Note that the result set is consumed by the
            function. This function can be used in MySQL Shell
            to display the results of queries run by scripts to
            the user in the same ways as the interactive SQL
            mode can.

          + The new MySQL Shell output format json/array
            produces raw JSON output wrapped in a JSON array.
            The output format ndjson is added as a synonym for
            json/raw, and both those output formats produce raw
            JSON output delimited by newlines. You can select
            MySQL Shell output formats by starting MySQL Shell
            with the –result-format=[value] command line
            option, or setting the MySQL Shell configuration
            option resultFormat.
       A new function shell.unparseUri() is also added, which converts a
       dictionary of URI components and connection options into a valid
       URI string for connecting to MySQL.

     * You can now extend MySQL Shell with plugins that are
       loaded at startup. MySQL Shell plugins can be written in either
       JavaScript or Python, and the functions they contain are
       available in MySQL Shell in both JavaScript and Python modes. The
       plugins can be used to contain functions that are registered as
       MySQL Shell reports, and functions that are members of extension
       objects that are made available as part of user-defined MySQL
       Shell global objects.  You can create a MySQL Shell plugin by
       storing code in a subfolder of the plugins folder in the MySQL
       Shell user configuration path, with an initialization file that
       MySQL Shell locates and executes at startup. You can structure a
       plugin group, with a collection of related plugins that can share
       common code, by placing the subfolders for multiple plugins in a
       containing folder under the plugins folder.

     * You can now extend the base functionality of MySQL Shell
       by defining extension objects and making them available as part
       of additional MySQL Shell global objects. Extension objects can
       be written in JavaScript or Python.  When you create and register
       an extension object, it is available in MySQL Shell in both
       JavaScript and Python modes. You construct and register extension
       objects using functions provided by the built-in global object
       shell.

     * You can now configure MySQL Shell to send logging
       information to the console, in addition to sending it to the
       application log. The –verbose command-line option and the
       verbose MySQL Shell configuration option activate this function.
       By default, when the option is set, internal error, error,
       warning, and informational messages are sent to the console,
       which is the equivalent to a logging level of 5 for the
       application log. You can add three further levels of debug
       messages, up to the highest level of detail.

     * MySQL Shell’s upgrade checker utility (the
       util.checkForServerUpgrade() operation) carries out two new
       checks. When checking for upgrade from any MySQL 5.7 release to
       any MySQL 8.0 release, the utility identifies partitioned tables
       that use storage engines other than InnoDB or NDB and therefore
       rely on generic partitioning support from the MySQL server, which
       is no longer provided. When checking for upgrade from any release
       to MySQL 8.0.17, the utility identifies circular directory
       references in tablespace data file paths, which are no longer
       permitted.

     * X DevAPI now supports indexing array fields. A single
       index field description can contain a new member name array that
       takes a Boolean value. If set to true, the field is assumed to
       contain arrays of elements of the given type. In addition, the
       set of possible index field data types (used as values of member
       type in index field descriptions) is extended with type CHAR(N),
       where the length N is mandatory.

     * MySQL Shell now supports the ability to send connection
       attributes (key-value pairs that application programs can pass to
       the server at connect time). MySQL Shell defines a default set of
       attributes, which can be disabled or enabled. In addition,
       applications can specify attributes to be passed in addition to
       the default attributes. The default behavior is to send the
       default attribute set.  You specify connection attributes as a
       connection-attributes parameter in a connection string.  The
       connection-attributes parameter value must be empty (the same as
       specifying true), a Boolean value (true or false to enable or
       disable the default attribute set), or a list or zero or more
       key=value specifiers separated by commas (to be sent in addition
       to the default attribute set). Within a list, a missing key value
       evaluates as an empty string. Examples:
       “mysqlx://user@host?connection-attributes”
       “mysqlx://user@host?connection-attributes=true”
“mysqlx://user@host?connection-attributes=false”
“mysqlx://user@host?connection-attributes=[attr1=val1,attr2,attr3=]”
       “mysqlx://user@host?connection-attributes=[]”

       You can specify connection attributes for both X Protocol
       connections and MySQL classic protocol connections. The
       default attributes set by MySQL Shell are:
> \sql SELECT ATTR_NAME, ATTR_VALUE FROM performance_schema.session_ac
count_connect_attrs;
+———————–+——————–+
| ATTR_NAME       | ATTR_VALUE |
+———————–+——————–+
| _pid            | 28451      |
| _platform       | x86_64     |
| _os             | Linux      |
| _client_name    | libmysql   |
| _client_version | 8.0.17     |
| program_name    | mysqlsh    |
+———————-+——————–+

       Application-defined attribute names cannot begin with _ because
       such names are reserved for internal attributes.  If connection
       attributes are not specified in a valid way, an error occurs and
       the connection attempt fails.  For general information about
       connection attributes, see Performance Schema Connection
       Attribute Tables
 (https://dev.mysql.com/doc/refman/8.0/en/performance-schema-connection-attribute-tables.html).

     * MySQL Shell now supports the OVERLAPS and NOT OVERLAPS
       operators for expressions on JSON arrays or objects:
expr OVERLAPS expr
expr NOT OVERLAPS expr

       These operators behave in a similar way to the
       JSON_OVERLAPS() function. Suppose that a collection has
       these contents:
mysql-js> myCollection.add([{ “_id”: “1”, “list”: [1, 4] }, { “_id”: ”
2″, “list”: [4, 7] }])

       This operation:
mysql-js> var res = myCollection.find(“[1, 2, 3] OVERLAPS $.list”).fie
lds(“_id”).execute();
mysql-js> res

       Should return:
{
“_id”: “1”
}
1 document in set (0.0046 sec)

       This operation:
mysql-js> var res = myCollection.find(“$.list OVERLAPS [4]”).fields(“_
id”).execute();
mysql-js> res

       Should return:
{
“_id”: “1”
}
{
“_id”: “2”
}
2 documents in set (0.0031 sec)

       An error occurs if an application uses either operator
       and the server does not support it.

Bugs Fixed


     * With MySQL Shell in Python mode, using auto-completion on
       a native MySQL Shell object caused informational messages about
       unknown attributes to be written to the application log file.
       (Bug #29907200)

     * The execution time for statements issued in MySQL Shell
       in multiple-line mode has been reduced by reparsing the code only
       after the delimiter is found. (Bug #29864587)

     * Python’s sys.argv array was only initialized when MySQL
       Shell was started in batch mode, and was not initialized when
       MySQL Shell was started in interactive mode. (Bug #29811021)

     * MySQL Shell incorrectly encoded the CAST operation as a
       function call rather than a binary operator, resulting in SQL
       syntax errors. (Bug #29807711)

     * MySQL Shell now supports the unquoting extraction
       operator ->> for JSON. (Bug #29794340)

     * Handling of empty lines in scripts processed by MySQL
       Shell in batch mode has been improved. (Bug #29771369)

     * On Windows, when a MySQL Shell report was displayed using
       the \watch command, pressing Ctrl+C to interrupt execution of the
       command did not take effect until the end of the refresh interval
       specified with the command.  The interrupt now takes effect
       immediately. Also, any queries executed by reports run using the
       \show or \watch commands are now automatically cancelled when
       Ctrl+C is pressed. (Bug #29707077)

     * In Python mode, native dictionary objects created by
       MySQL Shell did not validate whether they contained a requested
       key, which could result in random values being returned or in a
       SystemError exception being thrown. Key validation has now been
       added, and a KeyError exception is thrown if an invalid key is
       requested. (Bug #29702627)

     * When using MySQL Shell in interactive mode, if raw JSON
       output was being displayed from a source other than a terminal
       (for example a file or a pipe), in some circumstances the prompt
       was shown on the same line as the last line of the output. The
       issue has now been corrected, and a new line is printed before
       the prompt message if the last line of the output did not end
       with one. (Bug #29699640)

     * The MySQL Shell \sql command, which executes a single SQL
       statement while another language is active, now supports the \G
       statement delimiter to print result sets vertically.
       (Bug #29693853)

     * Some inconsistencies in MySQL Shell’s choice of stdout or
       stderr for output have been corrected, so that only expected
       output that is intended to be processed by other programs goes to
       stdout, and all informational messages, warnings, and errors go
       to stderr. (Bug #29688637)

     * When MySQL Shell was started with the option
       –quiet-start=2 to print only error messages, warning messages
       about the operation of the upgrade checker utility
       checkForServerUpgrade() were still printed. (Bug #29620947)

     * In Python mode, native dictionary objects created by
       MySQL Shell did not provide an iterator, so it was not possible
       to iterate over them or use them with the in keyword.
       Functionality to provide Python’s iterator has now been added.
       (Bug #29599261)

     * When a MySQL Shell report was displayed using the \watch
       command, the screen was cleared before the report was rerun. With
       a report that executed a slow query, this resulted in a blank
       screen being displayed for noticeable periods of time. The screen
       is now cleared just before the report generates its first text
       output. (Bug #29593246)

     * MySQL Shell’s upgrade checker utility
       checkForServerUpgrade() returned incorrect error text for each
       removed system variable that was detected in the configuration
       file. (Bug #29508599)

     * MySQL Shell would hang when attempting to handle output
       from a stored procedure that produced results repeatedly from a
       single statement. The issues have now been corrected. (Bug
       #29451154, Bug #94577)

     * You can now specify the command line option –json to
       activate JSON wrapping when you start MySQL Shell to use the
       upgrade checker utility. In this case, JSON output is returned as
       the default, and you can choose raw JSON format by specifying
       –json=raw. Also, warning and error messages relating to running
       the utility have been removed from the JSON output.
       (Bug #29416162)

     * In SQL mode, when MySQL Shell was configured to use an
       external pager tool to display output, the pager was invoked
       whether or not the query result was valid. For an invalid query,
       this resulted in the pager displaying an empty page, and the
       error message was only visible after quitting the pager. The
       pager tool is now only invoked when a query returns a valid
       result, otherwise the error message is displayed.
       (Bug #29408598, Bug #94393)

     * MySQL Shell did not take the ANSI_QUOTES SQL mode into
       account when parsing quote characters. (Bug #27959072)

     * Prompt theme files for MySQL Shell that were created on
       Windows could not be used on other platforms. The issue, which
       was caused by the parser handling the carriage return character
       incorrectly, has now been fixed. (Bug #26597468)

     * The use of the mysqlsh command-line option –execute (-e)
       followed by –file (-f) when starting MySQL Shell is now
       disallowed, as these options are mutually exclusive. If the
       options are specified in that order, an error is returned. Note
       that if –file is specified first, –execute is treated as an
       argument of the processed file, so no error is returned.
       (Bug #25686324)

     * Syntax errors returned by MySQL Shell’s JavaScript
       expression parser have been improved to provide context and
       clarify the position of the error. (Bug #24916806)

On Behalf of Oracle/MySQL Release Engineering Team,
Nawaz Nazeer Ahamed

MySQL Shell 8.0.16 for MySQL Server 8.0 and 5.7 has been released

Dear MySQL users,

MySQL Shell 8.0.16 is a maintenance release of MySQL Shell 8.0 Series (a
component of the MySQL Server). The MySQL Shell is provided under
Oracle’s dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0 and
5.7. Please upgrade to MySQL Shell 8.0.16.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a document
store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing an
integrated solution for high availability and scalability using InnoDB
based MySQL databases, without requiring advanced MySQL expertise. For
more information about how to configure and work with MySQL InnoDB
cluster see

https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html

The X DevAPI enables you to create “schema-less” JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language. For more
information about how to use MySQL Shell and the MySQL Document Store
support see

https://dev.mysql.com/doc/refman/en/document-store.html

For more information about the X DevAPI see

https://dev.mysql.com/doc/x-devapi-userguide/en/

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see

https://dev.mysql.com/doc/index-connectors.html

For more information on the APIs provided with MySQL Shell see

https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/

and

https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/

Using MySQL Shell’s SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see

https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.16, see the
“Generally Available (GA) Releases” tab at

http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see

http://bugs.mysql.com/

Enjoy and thanks for the support!

Changes in MySQL Shell 8.0.16 (2019-04-25, General Availability)

* Functionality Added or Changed

* Bugs Fixed

Functionality Added or Changed

* Important Change: Attempting to connect to an X Protocol
port, 33060 by default, using the classic MySQL protocol resulted
in the following error: ERROR 2013 (HY000): Lost connection to
MySQL server at 'reading initial communication packet', system
error: 0 This was because of differences in X Protocol and
classic MySQL protocol clients expectations on how connections
were initialized. Now, in such a situation the generated error
message is ERROR 2007 (HY000): Protocol mismatch; server version
= 11, client version = 10. If you encounter this error then you
are probably trying to use the wrong port for the protocol your
client is using. As part of this improvement the
mysqlx_enable_hello_notice system variable has been added, which
controls messages sent to classic MySQL protocol clients that try
to connect over X Protocol. When enabled, clients which do not
support X Protocol that attempt to connect to the server X
Protocol port receive an error explaining they are using the
wrong protocol. Set mysqlx_enable_hello_notice to false to permit
clients which do not recognize the hello message to still
connect.

* MySQL Shell's upgrade checker utility can now check the
configuration file (my.cnf or my.ini) for the server instance.
The utility checks for any system variables that are defined in
the configuration file but have been removed in the target MySQL
Server release, and also for any system variables that are not
defined in the configuration file and will have a different
default value in the target MySQL Server release. For these
checks, when you invoke checkForServerUpgrade(), you must provide
the file path to the configuration file. If you omit the file
path and the upgrade checker utility needs to run a check that
requires the configuration file, that check fails with a message
informing you that you must specify the file path. (Bug
#27801824, Bug #29222179)

* MySQL InnoDB cluster automatically and transparently
manages the communication protocol versions of its members,
whenever the cluster topology is changed using AdminAPI
operations. An InnoDB cluster always uses the most recent
communication protocol version that is supported by all instances
that are part of the cluster or joining it.

+ When an instance is added to, removed from, or
rejoins the cluster, or a rescan or reboot operation
is carried out on the cluster, the communication
protocol version is automatically set to a version
supported by the instance that is now at the
earliest MySQL Server version.

+ When you carry out a rolling upgrade by removing
instances from the cluster, upgrading them, and
adding them back into the cluster, the communication
protocol version is automatically upgraded when the
last remaining instance at the old MySQL Server
version is removed from the cluster prior to its
upgrade.
To see the communication protocol version in use in an
InnoDB cluster, use the Cluster.status() function with
the 'extended' option enabled. The communication protocol
version is returned in the 'GRProtocolVersion' field,
provided that the cluster has quorum and no cluster
members are unreachable.

* MySQL Shell now has a framework and commands that you can
use to set up and run reports to display live information from a
MySQL server, such as status and performance information. Reports
can be run once using the MySQL Shell \show command, or run then
refreshed continuously in a MySQL Shell session using the \watch
command. They can also be accessed as API functions in the
shell.reports object. The reporting facility supports both
built-in reports and user-defined reports. User-defined reports
can be created in the supported scripting languages JavaScript
and Python, and can be run in any MySQL Shell mode (JavaScript,
Python, or SQL), regardless of the language that the report was
written in. Reports can be saved in a folder in the MySQL Shell
configuration path and automatically loaded at startup. You can
also create a report directly in the MySQL Shell prompt. You
register a report to MySQL Shell using the shell.registerReport
method to provide information about the report and the options
and arguments that it supports. For more information, see
Reporting with MySQL Shell
(http://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-reporting.html).

* When running MySQL Shell in interactive mode, you can now
execute an SQL statement without switching to SQL mode and back
again afterwards. This function enables you to conveniently issue
some SQL statements in the context of a longer AdminAPI workflow
in JavaScript or Python mode. Use the \sql command immediately
followed by the SQL statement, for example:
\sql select * from sakila.actor limit 3;
The SQL statement does not need any additional quoting, and the
statement delimiter is optional. With this format, MySQL Shell
does not switch mode as it would if you entered the \sql command.
After the SQL statement has been executed, MySQL Shell remains in
JavaScript or Python mode.
You cannot use multiple line mode when you use the \sql command
with a query to execute single SQL statements while another
language is active. The command only accepts a single SQL query
on a single line.

* MySQL Shell history is now split per active language
which the command was issued under. This means that your history
now matches the active language, for example when you are running
in JavaScript mode having issued \js, the history contains the
previous JavaScript statements you issued, and when you issue
\sql to change to SQL mode your history contains the previous SQL
statements you issued. Similarly, now any history related
commands such as \history clear or \history delete are performed
on the history of the current active language. When you install
this version, any existing MySQL Shell history files are
duplicated to ensure that existing history is not lost.
Subsequent operations are then added to the language specific
history file.

* The new autoRejoinTries option enables you to configure
how many times an instance tries to rejoin a group after being
expelled. In scenarios where network glitches happen but recover
quickly, setting this option prevents you from having to manually
add the expelled instance back to the group. The autoRejoinTries
option accepts positive integer values between 0 and 2016 and the
default value is 0, which means that instances do not try to
automatically rejoin. Set the value to a valid integer to
configure the number of attempts expelled instances should make
to rejoin the group. You can pass the autoRejoinTries option to
these AdminAPI operations:

+ dba.createCluster()

+ Cluster.addInstance()

+ Cluster.setOption()

+ Cluster.setInstanceOption()
When you configure the autoRejoinTries option, it sets
the group_replication_autorejoin_tries system variable.
Passing the option to dba.createCluster(),
Cluster.addInstance() or Cluster.setInstanceOption()
configures the automatic rejoin for specific cluster
instances. Passing the option to Cluster.setOption()
configures the automatic rejoin for all cluster
instances.
For more information, see Responses to Failure Detection
and Network Partitioning
(http://dev.mysql.com/doc/refman/8.0/en/group-replication-responses-failure.html).

* When resultFormat was set to json or json/raw, every
result was being returned as a JSON document. This behavior was
expected when JSON wrapping is off (in other words the --json
command option was not used when starting MySQL Shell). Now, for
consistency reasons when JSON wrapping is off and resultFormat is
set to json or json/raw, every record is printed in a separate
document and statistics and warnings are printed in plain text.
For example if MySQL Shell is started without --json and
resultFormat=json/raw:
mysqlsh-sql> SHOW DATABASES;
{"Database":"information_schema"}
{"Database":"mysql"}
{"Database":"performance_schema"}
{"Database":"sys"}
4 rows in set (0.0035 sec)

If MySQL Shell is started with --json and with
resultFormat=json/raw:
mysqlsh-sql> SHOW DATABASES;
{
"hasData": true,
"rows": [
{
"Database": "information_schema"
},
{
"Database": "mysql"
},
{
"Database": "performance_schema"
},
{
"Database": "sys"
}
],
"executionTime": "0.0018 sec",
"affectedRowCount": 0,
"affectedItemsCount": 0,
"warningCount": 0,
"warningsCount": 0,
"warnings": [],
"info": "",
"autoIncrementValue": 0
}

* AdminAPI now reports information about the version of
MySQL running on instances. This information is available from
the following operations:

+ Cluster.status()

+ Cluster.describe()

+ Cluster.rescan()

See Checking the MySQL Version on Instances
(http://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-working-
with-cluster.html#checking-version-on-instances) for
more information.

Bugs Fixed

* Removing an instance from a cluster when the instance to
be removed had no user defined for the group_replication_recovery
channel resulted in dropping users on the remaining instances of
the cluster. (Bug #29617572)

* MySQL Shell could be installed in an environment where
Python was not present, but the application has a dependency on
many standard Python modules, resulting in error messages at
startup. The RPM and Debian packages for MySQL Shell now
explicitly specify the dependency on Python. (Bug #29469201)

* The MSI file that is used by Windows Installer to install
MySQL Shell now adds the path to the application binary (mysqlsh)
to the Windows PATH environment variable, so that the application
can be started from a command prompt. (Bug #29457639)

* In the instructions to build MySQL Shell from source (the
INSTALL document), the required version of the optional V8
dependency has been updated from 3.28.71.19 to 6.7.288.46. Thanks
to Evgeniy Patlan for spotting this. (Bug #29430049, Bug #94529)

* The failoverConsistency option has been deprecated and a
new option named consistency has been added, to make it more
consistent with the target Group Replication
group_replication_consistency system variable name. The MySQL
Shell online documentation now also correctly describes all of
the values you can assign to the consistency option. (Bug
#29356599)

* The dba.configureLocalInstance() operation would remove
any section that did not start with mysqld from the provided
option file. This could remove sections such as the client
section from the option file. (Bug #29349014)

* MySQL Shell's upgrade checker utility
checkForServerUpgrade() could incorrectly report a schema
inconsistency error for a table whose name included a special
character such as a hyphen. (Bug #29346836, Bug #94303)

* When an instance with X Plugin disabled was added to an
InnoDB cluster, if the instance was later removed from the
cluster using Cluster.removeInstance() the operation failed with
LogicError "get_string(7): field is NULL". This was a regression
introduced by the fix for Bug#27677227. (Bug #29304183)

* There was an inconsistency between the behavior of
dba.checkInstanceConfiguration() and the commands to add
instances to the cluster (dba.createCluster() and
Cluster.addInstance()) regarding the localhost and loopback
address validation. In particular, a simple error was printed by
dba.checkInstanceConfiguration() but the execution of the
operation continued showing that everything was correct at the
end of the operation, while an error was issued and the execution
stopped for dba.createCluster() and Cluster.addInstance(). As
part of fixing this issue, it was decided that the existing
localhost and loopback address validations are no longer needed
and should be removed. In particular, whatever address is
specified for report_host, even if it is localhost or the
loopback address (127.0.0.1), should be allowed, because it was
explicitly specified by the user to use it. (Bug #29279941)

* The dba.rebootClusterFromCompleteOutage() operation was
not preserving the existing Group Replication configurations
previously set for the instances. In particular, the Group
Replication local address and exit state action values were being
changed. Now all settings are read at the time of rebooting the
cluster. (Bug #29265869)

* On Windows, MySQL Shell's upgrade checker utility
checkForServerUpgrade() incorrectly reported a schema
inconsistency error for partitioned tables. (Bug #29256562)

* Using either Cluster.setOption() or
Cluster.setInstanceOption() to set an option which only exists in
MySQL 8.0 on an instance running MySQL 5.7 was not being caught
correctly. (Bug #29246657)

* On Debian-based platforms (such as Ubuntu), if the
hostname resolved to 127.0.1.1 - which is the default on these
platforms - it was not possible to create a cluster using the
default settings. Now, in such situations a proper validation of
the instance is performed before creating a cluster and adding
instances to it. (Bug #29246110)

* MySQL Shell stopped unexpectedly if Python code was
running in interactive mode and threw exceptions from C++
libraries. These exceptions are now caught and translated to
Python's built-in RuntimeError exceptions. (Bug #29057116)

* The dba.checkInstanceConfiguration() operation did not
validate host restrictions for the account provided for cluster
administration, for example if the account could actually connect
to all of the instances in the cluster. In particular, now an
error is issued if the provided user account is only able to
connect through localhost. (Bug #29018457)

* When a connection is specified using key-value pairs in
MySQL Shell's shell.connect() method, the host name cannot be an
empty string. MySQL Shell now handles this situation consistently
and returns an error if the supplied host name is an empty
string. (Bug #28899522)

* InnoDB cluster configured auto_increment_increment and
auto_increment_offset on instances for clusters running in
multi-primary mode and consisting of up to 7 instances based on
the logic described at InnoDB cluster and Auto-increment
(http://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-working-with-
cluster.html#mysql-innodb-cluster-auto-increment). But Group
Replication permits groups to contain up to 9 members, and
Cluster.addInstance() and Cluster.removeInstance() were not
following the logic used for other operations. Now, InnoDB
cluster uses the same logic for auto increment regardless of the
operation used and correctly handles multi-primary clusters with
more than 7 instances. (Bug #28812763)

* MySQL Shell's JSON import utility can now accept input
from FIFO special files (named pipes) when you invoke the utility
using the util.importJSON function, so you can carry out large
imports by this method without needing to put the data into a
file. (Bug #28785527)

* When you use the MySQL Shell command \help (or \h, or \?)
with a search pattern to search for help on a specific subject,
multiple help topic titles can match the pattern and be returned
as a list, to be selected by entering the command again with an
extended search pattern. With this system, it was possible for
help topics with a single-word title to be inaccessible from such
a list because there was nothing further to add to the search
pattern. To avoid this situation, the handling of multiple
matches has now been improved. If a topic title is found that
matches the given search pattern exactly (case-sensitive in the
event of multiple topic matches, and case-insensitive in the
event of no case-sensitive matches), the topic is identified as
the exact match and its help data is printed. The rest of the
topics with pattern matches in their titles are listed in a "see
also" section and can be selected by further pattern matching.
(Bug #28393119)

* MySQL Shell uses the host value of the provided
connection parameters as the target hostname used for AdminAPI
operations, namely to register the instance in the metadata (for
the dba.createCluster() and cluster.addInstance() operations).
However, the host used for the connection parameters might not
match the hostname that is used or reported by Group Replication,
which uses the value of the report_host system variable when it
is defined (in other words it is not NULL), otherwise the value
of hostname is used. Therefore, AdminAPI now follows the same
logic to register the target instance in the metadata and as the
default value for the group_replication_local_address variable on
instances, instead of using the host value from the instance
connection parameters. During this fix it was detected that when
the report_host variable was set to empty, Group Replication uses
an empty value for the host but AdminAPI (for example in commands
such as dba.checkInstanceConfiguration(),
dba.configureInstance(), dba.createCluster()) reports the
hostname as the value used which is inconsistent with the value
reported by Group Replication. An error is now issued by AdminAPI
if an empty value is set for the report_host system variable.
(Bug #28285389)

* In the event that dba.createCluster() failed and a
rollback was performed to remove the created replication
(recovery) users, the account created at localhost and any of the
ipWhitelist addresses were not being removed. The fix ensures
that the replication accounts are removed whenever a rollback
related to dba.createCluster() is performed. This work was based
on a code contribution from Bin Hong. (Bug #94182, Bug #29308037)

 

On Behalf of Oracle/MySQL Release Engineering Team,
Nawaz Nazeer Ahamed

MySQL Shell 8.0.15 for MySQL Server 8.0 and 5.7 has been released

Dear MySQL users,

MySQL Shell 8.0.15 is a maintenance release of MySQL Shell 8.0 Series
(a component of the MySQL Server). The MySQL Shell is provided under
Oracle’s dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0
and 5.7. Please upgrade to MySQL Shell 8.0.15.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a
document store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing
an integrated solution for high availability and scalability using
InnoDB based MySQL databases, without requiring advanced MySQL
expertise. For more information about how to configure and work with
MySQL InnoDB cluster see

https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html

The X DevAPI enables you to create “schema-less” JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language.
For more information about how to use MySQL Shell and the MySQL Document
Store support see

https://dev.mysql.com/doc/refman/en/document-store.html

For more information about the X DevAPI see

https://dev.mysql.com/doc/x-devapi-userguide/en/

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see

https://dev.mysql.com/doc/index-connectors.html.

For more information on the APIs provided with MySQL Shell
see

https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/

and

https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/

Using MySQL Shell’s SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see

https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.15, see
the “Generally Available (GA) Releases” tab at

http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see

http://bugs.mysql.com/

Enjoy and thanks for the support!

Changes in MySQL Shell 8.0.15 (2019-02-01)

This release contains no functional changes and is published
to align version number with the MySQL Server 8.0.15 release.

On Behalf of Oracle/MySQL Release Engineering Team,
Balasubramanian Kandasamy

MySQL Shell 8.0.14 for MySQL Server 8.0 and 5.7 has been released

Dear MySQL users,

MySQL Shell 8.0.14 is a maintenance release of MySQL Shell 8.0 Series
(a component of the MySQL Server). The MySQL Shell is provided under Oracle’s dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7. Please upgrade to MySQL Shell 8.0.14.

MySQL Shell is an interactive JavaScript, Python and SQL console interface, supporting development and administration for the MySQL Server. It provides APIs implemented in JavaScript and Python that enable you to work with MySQL InnoDB cluster and use MySQL as a document store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing an integrated solution for high availability and scalability using InnoDB based MySQL databases, without requiring advanced MySQL expertise. For more information about how to configure and work with MySQL InnoDB cluster see

https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html

The X DevAPI enables you to create “schema-less” JSON document collections and perform Create, Update, Read, Delete (CRUD) operations on those collections from your favorite scripting language.
For more information about how to use MySQL Shell and the MySQL Document Store support see

https://dev.mysql.com/doc/refman/en/document-store.html

For more information about the X DevAPI see

https://dev.mysql.com/doc/x-devapi-userguide/en/

If you want to write applications that use the the CRUD based X DevAPI you can also use the latest MySQL Connectors for your language of choice. For more information about Connectors see

https://dev.mysql.com/doc/index-connectors.html

For more information on the APIs provided with MySQL Shell see

https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/

and

https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/

Using MySQL Shell’s SQL mode you can communicate with servers using the legacy MySQL protocol. Additionally, MySQL Shell provides partial compatibility with the mysql client by supporting many of the same command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see

https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.14, see the “Generally Available (GA) Releases” tab at

http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see

http://bugs.mysql.com/

Enjoy and thanks for the support!

==================================================

Changes in MySQL Shell 8.0.14 (2019-01-21)

     * Functionality Added or Changed

     * Bugs Fixed

Functionality Added or Changed

     * When started from the command line, MySQL Shell prints
       information about the product, information about the
       session (such as the default schema and connection ID),
       warning messages, and any errors that are returned during
       startup and connection. You can now suppress printing of
       information that you do not need by using the
       --quiet-start[=1|2] mysqlsh command-line option. With a
       value of 1 (the default when the option is specified),
       information about the MySQL Shell product is not printed,
       but session information, warnings, and errors are
       printed. With a value of 2, only errors are printed.
       As part of this work, the printed information was tidied
       up so that the information about the MySQL Shell product
       is printed before the information about the session.
       Also, the handling of error printing was normalized to
       send diagnostic data to stderr, and errors to stdout.
       (Bug #28833718, Bug #28855291)

     * MySQL Shell connections using classic MySQL protocol now
       support compression for information sent between the
       client and the server. You can specify compression when
       you start MySQL Shell and connect using command line
       options, or in a URI string or a key-value pair when you
       create a session using other interfaces. You can also use
       the MySQL Shell configuration option defaultCompress to
       enable compression for every global session.
       For MySQL Shell connections that use Unix socket files,
       the --socket command line option can now be specified
       with no argument to connect using the default Unix socket
       file for the protocol. (Bug #28730149)

     * The Cluster.status() operation has been extended to
       enable you to display information about the underlying
       Group Replication group used by the cluster. Now you can
       retrieve information from all members of a cluster
       without having to connect to each member individually.
       To see information about the groupName and memberId; and
       general statistics about the number of transactions
       checked, proposed, and rejected by members issue:

         Cluster.status(extended:true)

       To see information about recovery and regular transaction
       I/O, applier worker thread statistics and any lags;
       applier coordinator statistics, if parallel apply is
       enabled; error, and other information from I/O and
       applier threads issue

         Cluster.status(queryMembers:true)

       In addition, in previous versions the URI-type string
       shown for groupInformationSourceMember in the output of
       Cluster.status() could be the cluster's MySQL Router
       address, rather than the address of the instance which
       provided the displayed group information. This has been
       improved to ensure groupInformationSourceMember always
       shows the correct hostname, or report_host, value and
       port, or report_port, value of the instance which
       provided the group information.
       As part of this work, the integration of MySQL Router to
       InnoDB cluster has been improved.
       (Bug #28636963, Bug #26519466, Bug #27824265, Bug #28366027)

     * The MySQL Shell JSON import utility can now process BSON
       (binary JSON) data types that are represented in JSON
       documents. The data types used in BSON documents are not
       all natively supported by JSON, but can be represented
       using extensions to the JSON format. The import utility
       can process documents that use JSON extensions to
       represent BSON data types, convert them to an identical
       or compatible MySQL representation, and import the data
       value using that representation. The resulting converted
       data values can be used in expressions and indexes, and
       manipulated by SQL statements and X DevAPI functions.
       To convert JSON extensions for BSON types into MySQL
       types in this way, you must specify the convertBsonTypes
       option when you run the import utility. Additional
       options are available to control the mapping and
       conversion for specific BSON data types. If you import
       documents with JSON extensions for BSON types and do not
       use this option, the documents are imported in the same
       way as they are represented in the input file.

     * A MySQL Shell configuration option showColumnTypeInfo and
       command line option --column-type-info have been added to
       display metadata for each column in a returned result
       set, such as the column type and collation. The metadata
       is printed before the result set, and is only shown in
       SQL mode.
       In the metadata, the column type is returned as both the
       type used by MySQL Shell (Type), and the type used by the
       original database (DBType). For MySQL Shell connections
       using classic MySQL protocol, DBType is as returned by
       the protocol, and for X Protocol connections, DBType is
       inferred from the available information. The column
       length (Length) is returned in bytes.

     * The upgrade checker utility provided by MySQL Shell,
       which is the checkForServerUpgrade() function of the util
       global object, has several enhancements:

          + The utility can now select and provide advice and
            instructions for relevant checks that cannot be
            automated, and must be performed manually. The
            manual checks are rated as either warning or notice
            (informational) level, and are listed after the
            automated checks. In MySQL Shell 8.0.14, the utility
            provides advice where relevant about the change of
            default authentication plugin in MySQL 8.0.

          + A check has been added for the removed log_syslog_*
            system variables that previously configured error
            logging to the system log (the Event Log on Windows,
            and syslog on Unix and Unix-like systems).

          + A check has been added for specific schema
            inconsistencies that can be caused by the deletion
            or corruption of a file, including the removal of
            the directory for a schema and the removal of a .frm
            file for a table.

       You can access the upgrade checker utility from within
       MySQL Shell or start it from the command line. For
       instructions and further information, see MySQL Shell
       Utilities
       (http://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities.html).

     * MySQL Shell can print results in table, tabbed, or
       vertical format, or as pretty or raw JSON output. From
       MySQL Shell 8.0.14, the new MySQL Shell configuration
       option resultFormat can be used to specify any of these
       output formats as a persistent default for all sessions,
       or just for the current session. Changing this option
       takes effect immediately. Alternatively, the new command
       line option --result-format can be used at startup to
       specify the output format for a session. The existing
       command line options --table, --tabbed, and --vertical
       are now aliases for the --result-format option given with
       the corresponding value.
       The existing command line option --json controls JSON
       wrapping for all MySQL Shell output from a session.
       Specifying --json or --json=pretty turns on JSON wrapping
       and generates pretty-printed JSON. Specifying --json=raw
       turns on JSON wrapping and generates raw JSON. With any
       of these options, the value of the resultFormat MySQL
       Shell configuration option is ignored. Specifying
       --json=off or not specifying the --json option turns off
       JSON wrapping, and result sets are output as normal in
       the format specified by the resultFormat configuration
       option.
       The outputFormat MySQL Shell configuration option is now
       deprecated. This option combined the JSON wrapping and
       result printing functions, which have now been separated.
       If this option is still specified in your MySQL Shell
       configuration file or scripts, the behavior is as
       follows:

          + With the json or json/raw value, outputFormat
            activates JSON wrapping with pretty or raw JSON
            respectively.

          + With the table, tabbed, or vertical value,
            outputFormat turns off JSON wrapping and sets the
            resultFormat MySQL Shell configuration option for
            the session to the appropriate value.

     * The V8 library used by MySQL Shell has been updated to
       version 6.7.288.46.

     * AdminAPI no longer relies on the mysqlprovision check
       command. This work has resulted in the following:

          + The errors field in the JSON returned by
            dba.checkInstanceConfiguration() has been removed,
            because it was only used to hold errors issued by
            mysqlprovision. Any errors are now reported
            directly, for example as RuntimeError.

          + The dba.verbose value no longer influences the
            amount of debug information displayed for
            dba.checkInstanceConfiguration() and
            dba.configureLocalInstance() because it was only
            used to control the verbosity of the information
            displayed from mysqlprovision. Instead, the generic
            verbose value from MySQL Shell is used to control
            the verbosity level for those functions.

          + In addition, the messages returned have been
            generally improved to make them more accurate.
       References: See also: Bug #28737777, Bug #27305806,
       Bug #28768627, Bug #27702439, Bug #28733883.

     * When you create a cluster, you can set the timeout before
       instances are expelled from the cluster, for example when
       they become unreachable. Pass the new expelTimeout option
       to the dba.createCluster() operation, which configures
       the group_replication_member_expel_timeout variable on
       the seed instance. All instances running MySQL server
       8.0.13 and later which are added to the cluster are
       automatically configured to have the same
       group_replication_member_expel_timeout value as defined
       when the cluster was created using expelTimeout.

     * You can configure an InnoDB cluster's underlying Group
       Replication group while the cluster remains online. This
       enables you to choose a specific instance as the single
       primary, or to change between single-primary and
       multi-primary mode without taking the cluster offline.
       This uses the group coordinator and the equivalent UDFs
       added in WL#10378 (https://dev.mysql.com/worklog/task/?id=10378),
       see "Configuring an Online Group"
       (http://dev.mysql.com/doc/refman/8.0/en/group-replication-configuring-online-group.html).

       Use the following Cluster object operations:

          + Cluster.switchToSinglePrimaryMode([instance]), which runs
            group_replication_switch_to_single_primary_mode() on
            the underlying group, using instance as the primary,
            all other instances become secondaries

          + Cluster.switchToMultiPrimaryMode(), which runs
            group_replication_switch_to_multi_primary_mode() on
            the underlying group, all instances become primaries

          + Cluster.setPrimaryInstance(instance), which runs
            group_replication_set_as_primary() on the underlying
            group, configuring instance as the new primary

     * You can now configure the InnoDB cluster options of
       instances at a cluster level, while instances remain
       online. This avoids the need to remove, reconfigure and
       then again add the instance to change InnoDB cluster
       options. Use the following operations:

          + Cluster.options() to verify the settings of a
            cluster and its instances

          + Cluster.setOption(option, value) to change settings
            of all cluster instances globally

          + Cluster.setInstanceOption(instance, option, value)
            to change settings of individual cluster instances
       The way which you use InnoDB cluster options with the
       operations listed depends on whether the option can be
       changed to be the same on all instances or not. These
       options are changeable at both the cluster (all
       instances) and per instance level:

          + exitStateAction

          + memberWeight

       This option is changeable at the per instance level only:

          + label

       These options are changeable at the cluster level only:

          + failoverConsistency

          + expelTimeout

          + clusterName

     * The cluster.rescan() operation has been extended to
       enable you to detect changes to the cluster's topology,
       and modfiy the cluster metadata, for example to remove
       old instance data. Now you can:

          + use the updateTopologyMode option to detect if the
            Group Replication mode (single-primary or
            multi-primary mode) registered in the metadata
            matches the current mode of the cluster, updating
            that information in the metadata if requested
            through a new option or by a prompt confirmation.
            You can use this option to update the metadata after
            using the
            Cluster.switchToSinglePrimaryMode([instance]) and
            Cluster.switchToMultiPrimaryMode() options added in
            WL#12052
            (https://dev.mysql.com/worklog/task/?id=12052).

          + use the addInstances option to specify a list of new
            instances to add to the metadata, or the
            removeInstances option to specify a list of obsolete
            instances to remove from the metadata. Pass the auto
            value to these options to automatically add or
            remove instances from the metadata, without having
            to specify an explicit list of instances. This
            enables the function to update the metadata even in
            non-interactive mode, making it consistent with the
            other AdminAPI operations.

          + In addition, a new interactive option has been added
            to the cluster.rescan() operation, to enable or
            disable interactive mode prompts specifically for
            the cluster.rescan() command.

       References: See also: Bug #28997465, Bug #28529362,
       Bug #28889563.

Bugs Fixed

     * The TAR build of MySQL Shell comes with Python 2.7. When
       attempting to include the site package, an error was
       emitted because of missing build files needed by the
       include. (Bug #28973138)

     * Handling procedures for user-supplied data in MySQL Shell
       were refactored to ensure correct cleanup after use.
       (Bug #28915716)

     * The exception type and error messages returned by MySQL
       Shell functions for parameter errors have been
       standardized across the different functions.
       (Bug #28838958)

     * MySQL Shell stopped unexpectedly if the
       shell.setCurrentSchema() method was called to set the
       default schema before an active session had been
       established. MySQL Shell now validates that there is an
       active session when the operation takes place.
       (Bug #28814112)

     * The MySQL Shell JSON import utility no longer requires an
       empty dictionary to be supplied if there are no import
       options. (Bug #28768585)

     * In SQL mode, MySQL Shell does not add statements to the
       history if they include the strings IDENTIFIED or
       PASSWORD, or other strings that you configure using the
       --histignore command option or
       shell.options["history.sql.ignorePattern"]. However, this
       previously meant that filtered-out statements were not
       available to be corrected immediately after entry, and
       had to be re-typed in case of any errors. MySQL Shell now
       always makes the last executed statement available to be
       recalled by pressing the Up arrow, regardless of the
       filters set in the history ignore list. If filtering
       applies to the last executed statement, it is removed
       from the history as soon as another statement is entered,
       or if you exit MySQL Shell immediately after executing
       the statement. (Bug #28749037)

     * The result printing logic in MySQL Shell has been
       refactored to use back-end rather than high-level result
       data, delivering performance improvements for all types
       of result data and more accurate representation for JSON
       data. (Bug #28710831)

     * A memory leak was fixed that occurred when the new MySQL
       Shell command-line syntax was used. (Bug #28705373)

     * The check for partitioned tables in shared tablespaces in
       the upgrade checker utility provided by MySQL Shell (the
       util.checkForServerUpgrade() operation) did not return
       correct results for the 8.0.11 and 8.0.12 target
       versions. The check now uses alternative Information
       Schema tables that are populated with the required
       information in these versions. (Bug #28701423)

     * The default value for group_replication_exit_state_action
       is ABORT_SERVER, but AdminAPI now overrides this and sets
       the default on instances to READ_ONLY. This ensures that
       instances which leave the group unexpectedly continue
       running and can be rejoined to the cluster.
       (Bug #28701263)

     * The MySQL Shell command \option ignored additional
       arguments separated by spaces that were specified for an
       option after the initial value. (Bug #28658632)

     * MySQL Shell permitted newline characters (line feed and
       carriage return) in passwords to be passed to a Secret
       Store Helper using the shell.storeCredential method,
       resulting in an error in the Secret Store Helper. MySQL
       Shell now returns an exception if newline characters are
       used in supplied passwords for the shell.storeCredential
       method, and does not pass them to the Secret Store
       Helper. (Bug #28597766)

     * On the Windows platform, UTF-8 encoded strings were
       printed to the console using the cout object, which
       transfers a byte at a time. This resulted in multi-byte
       Unicode characters, such as a single quotation mark,
       being displayed and handled incorrectly. MySQL Shell now
       uses alternative functions for printing, and verifies
       that multi-byte UTF-8 characters are emitted as a
       complete unit. (Bug #28596692)

     * When executing an SQL script in MySQL Shell, an
       inaccurate line number was reported for the location of
       syntax errors in the script. The number referenced the
       current SQL block rather than the line number in the
       script. The error message now uses the global line
       number. (Bug #28545982)

     * The SQL statement splitting logic in MySQL Shell has been
       refactored to fix a number of issues and to match
       behaviors of the MySQL command-line tool mysql:

          + The backslash character (\) is no longer accepted in
            the delimiter string.

          + The use of the word "delimiter" in contexts other
            than as a command is now handled correctly.

          + In scripts, comments are not discarded, and groups
            of comments and statements are now split in the same
            way as mysql would split them.

          + Large scripts can now be successfully split into
            incremental chunks even when some tokens span across
            more than one chunk.

          + Scripts can now be parsed in the ANSI_QUOTES SQL
            mode.

          + Multi-line strings and comments that contain quotes
            are now parsed correctly.

          + Inline commands are handled in the same way as by
            mysql, as follows:

               o A \ character appearing at the beginning of a
                 statement is interpreted as the start of a
                 multi-letter MySQL Shell command.

               o A \ character appearing within a statement is
                 interpreted as the start of a single-letter
                 command. The command is executed immediately,
                 then stripped out of the input statement.

               o A \ character appearing after the end of a
                 statement is interpreted as the start of a
                 single-letter command.

       (Bug #27959016, Bug #25689071)

     * When a cluster was created on a server that did not have
       the X Plugin enabled, a silent assumption was being made
       about the X Protocol port value. Now the value of an X
       Protocol port is only stored for instances on which X
       Plugin is enabled. (Bug #27677227)

     * The handling of Windows named pipe connections by MySQL
       Shell has been improved and systematized. Now, if you
       specify the host name as a period (.) on Windows, MySQL
       Shell connects using a named pipe.

          + If you are connecting using a URI type string,
            specify user@.

          + If you are connecting using a data dictionary,
            specify {"host": "."}

          + If you are connecting using individual parameters,
            specify --host=. or -h .

       By default, the pipe name MySQL is used. You can specify
       an alternative named pipe using the --socket option or as
       part of the URI type string. If a URI type string is
       used, the named pipe must be prepended with the
       characters \\.\ as well as being either encoded using
       percent encoding or surrounded with parentheses, as shown
       in the following examples:

         (\\.\named:pipe)
         \\.\named%3Apipe

       (Bug #27381738)

     * The dba.checkInstanceConfiguration() operation was not
       checking if the Performance Schema was enabled on the
       target instance. This could result in a situation where
       you could create a cluster but could not run several
       management operations on it, for example the
       Cluster.status() operation. Now,
       dba.checkInstanceConfiguration() checks that the
       Performance Schema is enabled on instances.
       (Bug #25867733)

     * When JSON format output was enabled for MySQL Shell, the
       properties of the Shell API Options class (shell.options)
       and AdminAPI Cluster class (dba.getCluster) were not
       printed, only the class name. (Bug #25027181)

     * When Cluster.checkInstanceState() was executed on an
       instance which was already a member of the current
       cluster, the output indicated that the instance was fully
       recoverable. This was misleading and was caused by a
       missing validation to ensure the instance does not belong
       to a cluster. (Bug #24942875)

     * The dba.checkInstanceConfiguration() operation did not
       recognize privileges when they were associated to a user
       through a role (available in MySQL server 8.0 and
       higher). In such a case, a missing privileges error was
       being incorrectly issued despite the user possessing all
       the required privileges. Now users with their privileges
       assigned by roles are recognized by AdminAPI operations
       correctly. (Bug #91394, Bug #28236922)

On Behalf of Oracle/MySQL Release Engineering Team,
Kent Boortz