Dear MySQL users,
MySQL Shell 8.0.23 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.23.
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 and
InnoDB
ReplicaSet, providing integrated solutions 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 and MySQL InnoDB ReplicaSet 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.23,
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.23 (2021-01-18, General Availability)
* AdminAPI Added or Changed Functionality
* AdminAPI Bugs Fixed
* Functionality Added or Changed
* Bugs Fixed
AdminAPI Added or Changed Functionality
* The output of the status() operation has been extended to
provide more information relevant to diagnosing errors.
The following information is available for InnoDB
Clusters and InnoDB ReplicaSets:
+ the memberState field shows the actual status of the
instance as queried locally, which can be one of
offline, error, recovering, or online.
+ a recovery.recoveryChannel field shows instances
performing incremental recovery or in which the
recovery channel status is not off
+ a new instanceErrors field exists for each instance,
displaying any diagnostic information that can be
detected for it
+ when the extended option is set to greater than 0,
the output includes an applierChannel field, with
replication information if the instance is either
online and the applier channel status is not on, or
the status is not recovering or online and the
applier channel status is not off
For more information, see Checking a cluster’s Status
with Cluster.status()
(https://dev.mysql.com/doc/mysql-shell/8.0/en/monitoring-
innodb-cluster.html#check-innodb-cluster-status).
* InnoDB Cluster and InnoDB ReplicaSet now support and
enable parallel replication appliers, sometimes referred
to as a multi-threaded replica. With the advances in
MySQL such as binary log transaction dependency tracking
and XXHASH64 based GTID set extraction, using multiple
replica applier threads improves the throughput of both
the replication applier and incremental recovery.
This has resulted in the following changes:
+ the requirements for instances running 8.0.23 and
later now also include:
o binlog_transaction_dependency_tracking=WRITESET
o slave_preserve_commit_order=ON
o slave_parallel_type=LOGICAL_CLOCK
o transaction_write_set_extraction=XXHASH64
this means that new instances running 8.0.23 have
these options configured by dba.configureInstance()
and dba.configureReplicaSetInstance(). Attempting to
add an instance running version 8.0.23 or later
which does not have these variables configured
results in an error. When you upgrade a cluster or
replica set that has been running a version of MySQL
server and MySQL Shell earlier than 8.0.23, the
parallel replication applier is not enabled on the
instances. This means you are not taking advantage
of this feature, and you should reconfigure your
instances to use the parallel replication applier.
For more information, see Configuring the Parallel
Replication Applier
(https://dev.mysql.com/doc/mysql-shell/8.0/en/config
uring-innodb-cluster.html#configuring-parallel-appli
er).
+ dba.checkInstanceConfiguration() validates if
parallel replication appliers are enabled or not.
+ the new applierWorkerThreads option configures the
number of replication applier threads the instance
uses for replication, and defaults to 4 threads. Use
this option with the dba.configureInstance() and
dba.configureReplicaSetInstance(). You can change
this option while the instance is online, but the
change is only made after the instance is restarted.
+ the output of the .status(extended=1) and options()
operations now includes information about the
configuration of parallel appliers.
AdminAPI Bugs Fixed
* The fix for Bug#29305551 extended the
dba.checkInstanceConfiguration() operation to include a
check to verify if asynchronous replication is configured
and running on the target instance, and print a warning
when that is the case. This check is also used by the
Cluster.addInstance() and Cluster.rejoinInstance()
operations to terminate them with an error when such a
scenario is detected, and is also used by the
dba.rebootClusterFromCompleteOutage() operation whenever
there are instances to be rejoined to the cluster.
However, the dba.createCluster() operation was
erroneously skipping the check, and the
dba.rebootClusterFromCompleteOutage() operation was
skipping the check on the instance being used to
bootstrap the cluster. The fix ensures that the check is
also performed whenever creating or rebooting a cluster
from complete outage. Additionally, it adds support to
override the check for the dba.createCluster() operation
by making use of the force option, and it improves the
error messages. (Bug #32197222)
* The fix for Bug#29305551 extended
dba.checkInstanceConfiguration() to verify if
asynchronous replication is configured and running on the
target instance and print a warning if that was the case.
However, the check missed verifying if the replication
channel was configured but not running. This fix ensures
the verification also considers replication channels
which are configured but are not actively running.
Additionally, an erroneous message which suggested the
possibility of using STOP REPLICA to override this check
has been removed and replaced with an informative message
which explains that unmanaged replication channels are
not supported and the possible dangers of their usage.
(Bug #32197197)
* Based on the terminology changes in WL#14189
(https://dev.mysql.com/worklog/task/?id=14189), AdminAPI
has been aligned with the new terms. Error and log
messages now use the terms source (previously master) and
replica (previously slave). (Bug #32152133)
* During a Cluster.rebootClusterFromCompleteOutage()
operation, the GTID superset is used to detect which
instance should be used to reboot the cluster. If an
instance had a diverging GTID set and you wanted to
explicitly remove it from the cluster, the operation
blocked because it could not determine which instance had
the GTID superset. Previously, in such a situation there
was no way to exclude the instance from the instances
used to detect the GTID superset. Now, if you answer no
during the interactive wizard, or configure the
removeInstances option, the instance is not checked as
part of finding the GTID superset. (Bug #32112864)
* When an instance had left a ReplicaSet, and then its
configuration was changed in a way that made it invalid
for InnoDB ReplicaSet usage, the
ReplicaSet.rejoinInstance() operation did not detect that
the configuration was invalid. Now, instances are checked
to ensure they are valid before rejoining them to a
ReplicaSet. (Bug #31975416)
* When upgrading the metadata using dba.upgradeMetadata(),
if there are MySQL Router instances that need to be
upgraded, the operation waits until all instances are
upgraded before continuing. The operation offers you an
option to re-check for outdated MySQL Router instances
and continue with the metadata upgrade. A MySQL Router
upgrade is only complete after a restart of the
application, however the message printed did not mention
that. This message now includes the information that
MySQL Router instances must be restarted after the
binaries are upgraded. (Bug #31882876)
* When you were connected to a secondary instance,
attempting to issue operations such as
Cluster.rejoinInstance(), Cluster.addInstance(),
Cluster.dissolve() and so on would fail. Now, AdminAPI
always connects to the current primary.
As part of this work the following changes were made:
+ Now, in the event that dba.createCluster() or
Cluster.addInstance() fail with a Group Replication
error, AdminAPI returns the
performance_schema.error_log entries.
+ The Cluster.rejoinInstance() operation has been
changed to succeed if the instance is already in the
cluster, instead of throwing an exception.
+ The dba.rebootCluster() operation has been changed
to not clear super_read_only on the instance.
(Bug #31757737)
* As part of the default settings for InnoDB Cluster, to
ensure that instances automatically rejoin the cluster,
the group_replication_start_on_boot option is
automatically set to true. However, this meant that in
environments with an external tool managing the cluster
life cycle, for example an orchestrator such as
Kubernetes, the automatic enabling of rejoin could cause
conflicts with the tool. In addition, if the automatic
rejoining of an instance was enabled at an unsuitable
time (for example when rebooting, or while repairing a
split-brain, and so on), a deadlock or long freezes could
occur until a timeout happened. In some situations,
instances could even potentially join the wrong cluster
during a reconfiguration.
To avoid such situations, the manualStartOnBoot boolean
option has been added, which defaults to false. To
disable the automatic rejoining of an instance, for
example while repairing a split-brain, set the
manualStartOnBoot option to true. This prevents the
instance rejoining the cluster automatically while you
make changes. You then need to rejoin the instance to the
cluster manually, before setting the manualStartOnBoot
option back to false to ensure instance it rejoins the
cluster automatically again. Similarly, if you are using
an external orchestrator to manage the life cycle of
instances, set the manualStartOnBoot option to true
across the whole cluster, to disable the automatic
rejoining of instances to the cluster. Your orchestrator
should then be configured to rejoin the instances
manually. (Bug #31643595)
* Calling dba.checkInstanceConfiguration() with verifyMyCnf
set to a file which did not exist, the operation
completed successfully saying the configuration file had
been checked. The fix checks if the file specified by
verifyMyCnf exists, prints an error if not, and ensures
the console does not show unnecessary error messages.
(Bug #31468546)
* On an instance with the sql_mode variable set to
ANSI_QUOTES, attempting to upgrade the metadata schema
with dba.upgradeMetadata() failed with the error: Unknown
column ‘MySQL Router’ in ‘field list’. This was related
to a query which uses single quotes to quote strings. As
part of this fix, the upgrade metadata operation now
prepares the session to be used by AdminAPI, and amongst
other sanity checks it ensures that the sql_mode for that
session uses the default value to avoid incompatible user
configured settings. Additionally, the same was done for
the dba.getCluster() and dba.dropMetadataSchema()
operations. (Bug #31428813)
* If the MySQL Shell global session was connected to a
sandbox instance, and that instance was stopped, MySQL
Shell tried to incorrectly reconnect to the instance.
Now, if the active session is connected to a sandbox
instance which is being stopped, MySQL Shell closes the
session. (Bug #31113914)
* The output of Cluster.status() now includes additional
information about instances that are registered in the
metadata but not currently online. MySQL Shell now
connects to offline instances found in the metadata and
attempts to diagnose them, providing additional
information such as their connectivity and status. (Bug
#30501615)
* Instances that are part of the underlying group but are
not identified in the metadata, for example because they
were configured manually and bypassing MySQL Shell, or
because they were previously removed from the InnoDB
Cluster but were not properly decommissioned, are now
shown in the output of Cluster.status(), along with
diagnostic warnings about the metadata discrepancy. This
ensures you can detect situations where an instance is
participating in the group but is not being managed by
MySQL Shell. (Bug #27882663)
* An instance that belongs to an InnoDB Cluster is
identified by its server UUID. If the UUID changed after
the instance had left the cluster, for example because
you used MySQL Enterprise Backup to restore from a
backup, then the instance could not be rejoined to the
cluster. Now, if the cluster encounters this situation,
it checks the metadata to see if the instance can be
identified using its host and port. If found, the
metadata is updated based on the options used for the
rejoin operation. This check is executed during the
Cluster.rejoinInstance() and Cluster.rescan() operations.
Additionally, a check is executed to verify the serverId
of all the instances is registered in the metadata as an
instance attribute. If it is not, the metadata is updated
accordingly. This check is executed on add, rejoin and
rescan operations. (Bug #26649039)
Functionality Added or Changed
* MySQL Shell’s parallel table import utility can now
import a specified list of input data files, and it
supports wildcard pattern matching to include all
relevant files from a location. Multiple files uploaded
by a single run of the utility are placed into a single
relational table, so for example, data that has been
exported from multiple hosts and stored in multiple files
could be merged into a single table to be used for
analytics. The files can be compressed in the gzip or
zstd format, and in that case the utility reads them from
storage in the compressed format, saving bandwidth for
that part of the transfer. The utility then uses its
parallel connections to decompress and upload several
files simultaneously to the target server.
Bugs Fixed
* When MySQL Shell’s instance dump utility
util.dumpInstance() was run with the ocimds option set to
true to check compatibility with MySQL Database Service,
and the users option set to true to include users and
their roles and grants in the dump, the utility reported
some compatibility errors for privileges that actually
were permitted. MySQL Shell’s allowed list of privileges
for MySQL Database Service has now been updated. (Bug
#32213605)
* The behavior of MySQL Shell’s table dump utility
util.dumpTables() and dump loading utility
util.loadDump() regarding the schemas for single table
dumps and loads has been changed. Previously, the dump
files produced for a single table did not contain the SQL
statements to recreate the schema, so the schema had to
exist in the target MySQL instance before the dump
loading utility could load the table. Now, the dumps
produced by the table dump utility contain the schema
statements, and when they are loaded with the dump
loading utility, by default, the schema is created in the
target MySQL instance if it does not already exist. The
schema option can be used to load the table dump into
another schema that exists in the target MySQL instance.
Table dumps created using the earlier version of the
utility still require the schema option and an existing
schema. (Bug #32165101)
* MySQL Shell’s table dump utility util.dumpTables() now
supports the ocimds, compatibility, ociParManifest, and
ociParExpireTime options, so you can check compatibility
with MySQL Database Service, and generate
pre-authenticated request URLs for the dump files. Also,
the ignoreVersion option has been extended to allow the
import of a dump that was created without the ocimds
option into a MySQL DB System. (Bug #32140970)
* If a dump included users that were created with external
authentication plugins, MySQL Shell’s dump loading
utility util.loadDump() was unable to load the dump if
those plugins were not available on the target server
instance. The ocimds option for MySQL Shell’s instance
dump utility util.dumpInstance() and schema dump utility
util.dumpSchemas which checks compatibility with MySQL
Database Service, now checks for accounts using
authentication plugins that are not supported in MySQL
Database Service. The compatibility option has an
additional modification option skip_invalid_accounts,
which removes such user accounts. (Bug #32115948)
* Previously, MySQL Shell’s dump loading utility
util.loadDump() stopped with an error if the loadUsers
option was set to true but the supplied dump files did
not contain user accounts. The utility now displays a
warning and continues in this situation. (Bug #32115861)
* MySQL Shell’s instance dump utility util.dumpInstance(),
schema dump utility util.dumpSchemas(), and table dump
utility util.dumpTables() falls back to using the LOCK
TABLES privilege to lock dumped tables if the consistent
option is set to true, which is the default, and the
RELOAD privilege is not available. However, the locking
operation could cause an implicit commit on active
transactions, meaning that the data was not dumped
consistently. The locking has now been corrected to
ensure consistency in this situation. (Bug #32107327, Bug
#101410)
* When MySQL Shell’s dump loading utility util.loadDump()
used indexes to identify row boundaries, an error
occurred if an index pointed beyond the data in the read
buffer. The utility now checks for this situation and
ignores the index if so. (Bug #32072961)
* When MySQL Shell was attempting to reconnect to a server,
Ctrl + C did not interrupt the operation. The interrupt
now functions and sets the retry attempts counter to zero
so that the sequence exits correctly. (Bug #32041342)
* MySQL Shell can now be built using Python 3.9. (Bug
#32020230)
* The updateGtidSet option for MySQL Shell’s dump loading
utility util.loadDump() could not be used with MySQL DB
System due to a permissions restriction. The utility now
uses a stored procedure that is permitted, so the option
can be used. (Bug #32009225)
* When MySQL Shell’s instance dump utility
util.dumpInstance(), schema dump utility
util.dumpSchemas(), or table dump utility
util.dumpTables() was exporting to an Oracle Cloud
Infrastructure Object Storage bucket, if there was a loss
of connectivity or routing to the Object Storage server,
MySQL Shell stopped unexpectedly. The error is now
handled correctly. (Bug #32005418)
* MySQL Shell’s dump loading utility util.loadDump()
returned an exception if a header value in a response was
empty. (Bug #31979374)
* MySQL Shell did not initialize Python 3.8’s new
cf_feature_version compiler flag field, which could cause
an exception when format strings were used. (Bug
#31926697)
* Where MySQL Shell is using a system installation of
Python rather than the bundled version, the minimum
version that MySQL Shell supports is now Python 3.6.
Python 3.4.3 was the previous minimum for a system
installation. The bundled version is Python 3.7.7. (Bug
#31900744)
* MySQL Shell’s instance dump utility util.dumpInstance(),
schema dump utility util.dumpSchemas(), and table dump
utility util.dumpTables() use table statistics to
identify a suitable default row size. If the statistics
for a table are outdated or not present, this can cause
issues for the chunking process. In this situation, MySQL
Shell now issues a message to suggest using an ANALYZE
TABLE statement to produce up to date statistics. (Bug
#31766490)
* The skipBinlog option for MySQL Shell’s dump loading
utility util.loadDump() skips binary logging on the
target MySQL instance for the import. The option is not
suitable for MySQL DB System as the binary logging status
cannot be changed, and the import now fails with an error
message if the option is used in that situation. For
other MySQL instances, the utility now checks whether the
user has the required privileges to set the sql_log_bin
system variable, and fails with an error message if they
do not. (Bug #31748786)
* MySQL Shell’s instance dump utility util.dumpInstance(),
schema dump utility util.dumpSchemas(), and table dump
utility util.dumpTables() ordered the data fetched for
export using the first column of a unique index for the
table. The same method was used to query data for
chunking purposes. The utilities now use all columns of
the unique index for ordering. In addition, performance
is improved by the addition of a cache to store
frequently-used instance metadata. The cache is populated
for all the schema objects at once, rather than by
individual queries as needed. (Bug #31706755)
* MySQL Shell’s disconnect function was added to the shell
global object. (Bug #31704380)
On Behalf of Oracle/MySQL Release Engineering
Prashant Tekriwal
Tag Archives: shell
MySQL Shell 8.0.22 for MySQL Server 8.0 and 5.7 has been released
Dear MySQL users,
MySQL Shell 8.0.22 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.22.
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 and InnoDB ReplicaSet, providing integrated solutions 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 and MySQL InnoDB ReplicaSet 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.22, see the
“General Availability (GA) Releases” tab at
http://dev.mysql.com/downloads/shell/
We welcome and appreciate your feedback and bug reports, see
Enjoy and thanks for the support!
Changes in MySQL Shell 8.0.22 (2020-10-19, General Availability)
- AdminAPI Bugs Fixed
- Functionality Added or Changed
- Bugs Fixed
AdminAPI Bugs Fixed
- Due to the changes introduced in bug#31467823, AdminAPI user messages have been updated to use the same terminology. (Bug #31798724) References: See also: Bug #31462783, Bug #31467823.
- In 8.0.22, Group Replication deprecates the group_replication_ip_whitelist system variable in favor of group_replication_ip_allowlist. Therefore AdminAPI now includes a new option named ipAllowlist and deprecates the ipWhitelist option used with dba.createCluster(), Cluster.addInstance() and Cluster.rejoinInstance(). Regardless of the target instance version, if ipWhitelist is used MySQL Shell prints a deprecation warning. When the target instance is 8.0.22 or later Group Replication
reports a deprecation warning, but AdminAPI avoids this by ensuring the appropriate variable is set according to the version of MySQL running on the instance. If the target instance is 8.0.22 or later and the old ipWhitelist option is used, AdminAPI updates the new group_replication_ip_allowlist system variable. On instances running MySQL 8.0.21 or earlier, AdminAPI updates the older group_replication_ip_whitelist system variable.
This work also fixes a bug in Cluster.options(), which shows the list of all Group Replication options that are configurable by MySQL Shell. When an option is not set or does not exist (for example in a certain version) it is displayed as having a null value. However, when you passed in the all option to Cluster.options(), such variables were being excluded from the list. (Bug#31798495) - The dba.configureLocalInstance() and dba.configureInstance() operations could not be used against instances that were part of unmanaged replication groups. This made it impossible to create a cluster administrator account, which is required when adopting a Group Replication group into an InnoDB Cluster. Creating cluster administrator accounts is very important for the remote management of InnoDB Clusters, and to avoid having to manually create the user and required privileges on
each instance. The fix ensures that dba.configureLocalInstance() and dba.configureInstance() can be executed against instances belonging to unmanaged
replication groups. Because such instances are ready for InnoDB Cluster usage, a message confirms this. (Bug#31691232) - The dba.rebootClusterFromCompleteOutage() operation was only checking GTID_EXECUTED when validating for the instance that has the most transactions. Transactions that were received (and certified) but not executed yet were not included in that check. Also, transactions received through replication channels other than the Group Replication applier were also not being considered in that check, because the instance was probably the primary while the cluster was running. Ignoring these transactions led to data loss. Now, any known and managed
replication channels are considered as part of the check. (Bug #31673163) - The dba.removeInstance() operation failed if the instance being removed was not only unreachable but also unresolvable, which could be the case when the instance
was running in a container that takes down its own DNS record when removed.
Instances could not be removed even if force was enabled, because of a validation that ensured that the given instance is a valid address by checking if it is
resolvable. If that validation failed, nothing else was attempted. The fix completely removes address resolution from the whole AdminAPI. That check was redundant,
because invalid addresses would eventually lead to an error anyway when a connection was opened. IPv6 address syntax validations were left to remind you that ::1 should be specified as [::1]. (Bug #31632606) - Calling Cluster.rejoinInstance(“host:port”) with no user name specified caused AdminAPI to try and connect using the operating system user name instead of the credentials used to connect the cluster object. Now, if credentials are not provided, they are taken from the target server’s connection options. (Bug #31632554)
- When adding an instance to a cluster using MySQL Clone and monitoring the transfer of data, MySQL Shell could stop unexpectedly. This was due to the assumption that the Performance Schema would provide information on all four stages of cloning, which might not exist if the data set was very small. The fix ensures that updates are performed according to the information which is available
at each time. (Bug #31545728) - When an unreachable primary instance was forcibly removed from a cluster, the group_replication_group_seeds system variable was not updated because the group status was queried from the primary, which was missing. The cluster was left in an inconsistent state, and if any of the instances were restarted, they would not be able to automatically rejoin, because group_replication_group_seeds contained an invalid
address, which caused Group Replication to abort trying to join the group.
(Bug #31531704) - If the validate_password plugin was enabled, the setupAdminAccount() and setupRouterAccount() operations would fail with an error indicating the password did not meet the policy requirements. This happened regardless of whether the password met the policy requirements or not. (Bug #31491092)
- In the event of dba.createCluster() failing, the metadata record was left behind and Group Replication was also started. The cluster was left in an inconsistent state
that could not be recovered from when calling dba.createCluster() again. Now, metadata changes during a dba.createCluster() operation are enclosed in a
transaction, so that both the cluster and instance records are only committed if the operation succeeds. Group Replication is also stopped if the create operation
does not complete successfully. Similarly, Cluster.addInstance() has been changed to ensure that its metadata record is only inserted when everything else has completed successfully. On retry, it skips any steps that would cause conflicts because Group Replication is already running. This introduces a behavior change, where adding an instance that is part of the group but not in the metadata just adds it to the metadata, instead of aborting and requiring you to execute Cluster.rescan(). (Bug #31455419) - If a connection timed out during a Cluster.status() operation, MySQL Shell could appear to hang for a long time. To improve the responsiveness, the default timeout
of AdminAPI operations has been reduced from 10 seconds to 2 seconds. This ensures operations like Cluster.status() do not appear to freeze for a long time
when there are unreachable instances. (Bug #30884174) - Instances operating in an InnoDB Cluster or InnoDB ReplicaSet are all required to have the same password for the administrative account. In a situation where the
password on an instance joining a InnoDB Cluster or InnoDB ReplicaSet did not match the other instances, the error message did not explain this and the instance
failed to join. Now, in such a situation the error is detected and the resulting message mentions that the password is the cause of the failure. It is recommended
that you set up administrator accounts using the setupAdminAccount() operation, see Creating User Accounts for Administration (https://dev.mysql.com/doc/refman/8.0/en/admin-api-overvi ew.html#creating-user-accounts-for-admin-api).
(Bug#30728744)
Functionality Added or Changed
- Two new utilities are available in MySQL Shell to export single tables from a MySQL server instance.
- MySQL Shell’s new table dump utility util.dumpTables() supports the export of a selection of tables or views from a schema, from an on-premise
MySQL instance into an Oracle Cloud Infrastructure Object Storage bucket or a set of local files. It works in the same way as the instance dump utility
util.dumpInstance() and schema dump utility util.dumpSchemas() introduced in 8.0.21, but with a different selection of suitable options. The exported items can then be imported into a MySQL Database Service DB System (a MySQL DB System, for short) or a MySQL Server instance using MySQL Shell’s dump loading utility util.loadDump(). - MySQL Shell’s new table export utility util.exportTable() exports a MySQL relational table into a data file in a variety of formats, either on the local server or in an Oracle Cloud Infrastructure Object Storage bucket. The data can
then be uploaded into a table on a target MySQL server using MySQL Shell’s parallel table import utility util.importTable(), which uses parallel connections to provide rapid data import for large data files. The data file can also be used to import data to a different application, or as a lightweight logical backup for a single data table.
- MySQL Shell’s new table dump utility util.dumpTables() supports the export of a selection of tables or views from a schema, from an on-premise
- From MySQL Shell 8.0.22, when you export schemas to an Oracle Cloud Infrastructure Object Storage bucket using MySQL Shell’s instance dump utility and schema dump utility, util.dumpInstance() and util.dumpSchemas(), during the dump you can generate a pre-authenticated request URL for every item. The utilities do this by default when the ocimds option is set to true, and you can control the feature using the ociParManifest and ociParExpireTime options. The user account that runs MySQL Shell’s dump loading utility util.loadDump() then uses the pre-authenticated request URLs to load the dump files without additional access permissions.
Bugs Fixed
- MySQL Shell’s dump loading utility util.loadDump() would stop with an error if a data file’s size was larger than an applicable server limit relating to the maximum
transaction size, such as the max_binlog_cache_size limit. Now, the utility stops the data load in mid-file if the number of bytes uploaded is about to exceed 1.5 times the bytesPerChunk setting of the utility that created the data files, which is stored in the dump metadata. The data load is then restarted to upload the remainder of the file. Due to this new safeguard, the default bytesPerChunk setting of MySQL Shell’s instance dump utility util.dumpInstance(), schema dump utility util.dumpSchemas(), and table dump utility util.dumpTables() has been increased from 32 MB to 64 MB.
(Bug #31945539) - MySQL Shell’s instance dump utility util.dumpInstance() and schema dump utility util.dumpSchemas() did not take the row size into account when deciding whether to chunk table data, only the number of rows. A table with a smaller number of rows containing large amounts of data might therefore bypass chunking even if the row size exceeded the specified chunk size for the dump. The utilities now carry out chunking regardless of the number of rows, unless the data is estimated to fit in a single chunk of the specified size. (Bug #31938831)
- When MySQL Shell’s instance dump utility util.dumpInstance() or schema dump utility util.dumpSchemas() was splitting a table into chunks, an integer overflow, loop, and consequent out of memory error could occur if the maximum value in the index
column was close to the maximum value of an integer. Extra checks have now been added to avoid this situation. (Bug #31896448) - Corrupted SQL files could occur in MySQL Shell’s dumps if the dumped string was exactly 2048 bytes, due to an internal module error which is now accounted for.
(Bug#31843832) - The administrative user account on an Oracle Cloud Infrastructure Compute instance, which was used when importing data with MySQL Shell’s dump loading utility util.loadDump(), was unable to revoke privileges on MySQL system schemas (mysql and sys) that it did not have itself. Affected REVOKE statements are now stripped from an instance or schema dump created by MySQL Shell’s instance dump utility util.dumpInstance() and schema dump utility util.dumpSchemas() when the strip_restricted_grants compatibility option is used. (Bug #31842532)
- MySQL Shell’s instance dump utility and schema dump utility, dumpInstance() and dumpSchemas(), previously fetched the value of the gtid_executed system variable
before the read lock was established, which could potentially lead to an inconsistency with the dumped data. The GTID set is now retrieved while the read lock is active. (Bug #31706940) - From MySQL Shell 8.0.22, you can use the -pym command-line option to execute a specified Python module as a script in MySQL Shell’s Python mode. –pym works in
the same way as Python’s -m command line option. (Bug#31694202) - In MySQL Shell in Python mode, functions registered in JavaScript could not be called from global extension objects if they had optional arguments that were not
provided. (Bug #31693096) - MySQL Shell treated the character sequence */ as the end of a comment even when it was part of a quoted string. (Bug #31689135)
- MySQL Shell’s instance dump utility and schema dump utility, dumpInstance() and dumpSchemas(), automatically select an index column to order and chunk the data. When an index with a functional key part was present for a table, the query for index columns returned NULL for the column name, causing an exception in the utility. These column names are now filtered out in the query. (Bug#31687059)
- MySQL Shell’s parallel table import utility util.importTable() has a new option decodeColumns, and an enhancement to the columns option, to enable you to
capture columns from the import file for input preprocessing (or to discard them) in the same way as with a LOAD DATA statement. The decodeColumns option
specifies preprocessing transformations for the captured data in the same way as the SET clause of a LOAD DATA statement, and assigns them to columns in the target table. (Bug #31683641) - MySQL Shell’s dump loading utility loadDump() now verifies that it can open and write to the progress state file before it starts to retrieve the dump files, so that
the utility does not spend time fetching the dump files if the import is subsequently going to fail for that reason. (Bug #31667539) - Before MySQL 8.0, user accounts that have all privileges used the statement GRANT ALL PRIVILEGES, rather than the full list of privileges. When MySQL Shell’s instance dump utility dumpInstance() was used to dump an instance, ALL PRIVILEGES was stripped from the statement, leaving the accounts with no privileges. The utility now replaces this grant with the administrator role.
(Bug #31661180) - MySQL Shell’s instance dump utility and schema dump utility, dumpInstance() and dumpSchemas(), and dump loading utility loadDump(), previously timed out after
the main thread had been idle for 8 hours. The timeout has now been extended indefinitely (to 1 year) so that long data load times do not cause the dump or import to fail. (Bug #31652265) - MySQL Shell’s dump loading utility loadDump() now includes a comment in its LOAD DATA statements to identify the data chunk that is currently being loaded.
If you need to cancel the import, you can use this information to decide whether to let the import of this chunk complete or stop it immediately. (Bug #31646650) - Previously, MySQL Shell’s dump loading utility loadDump() closed DDL files after all tables from the schema had finished loading. For a dump with a very large number of DDL files, this could lead to unexplained runtime errors being returned. The utility now closes DDL files immediately after reading them. (Bug #31645896)
- MySQL Shell’s dump loading utility loadDump() previously used only its main thread to execute the DDL scripts for tables. For a dump containing a large number of tables, fetching the DDL scripts could have a significant impact on the time taken. The utility now fetches and executes DDL scripts for tables using all its threads, with the exception of DDL scripts for views, which are fetched in parallel but executed only in the main thread to avoid race conditions. (Bug #31645806)
- MySQL Shell’s dump loading utility loadDump() now loads views in sequence and only after all tables and placeholders from all schemas have been loaded, ensuring
that views do not reference items that do not yet exist. (Bug #31645792) - MySQL Shell now ignores any other available Python installations when a bundled compatible version of the Python interpreter has been installed. (Bug #31642521)
- When MySQL Shell’s dump loading utility loadDump() is importing users and their roles and grants, an error is now returned if the user already exists in the target
instance, and the user’s grants from the dump files are not applied. Previously, the grants were applied to the existing user. (Bug #31627432) - MySQL Shell’s dump loading utility loadDump() now has an option updateGtidSet to apply the gtid_executed GTID set from the source MySQL instance to the gtid_purged GTID set on the target MySQL instance. You can append or replace the GTID set depending on the release of the target MySQL instance. (Bug #31627419)
- MySQL Shell’s instance dump utility dumpInstance() and dump loading utility loadDump() now have options to include (includeUsers) or exclude (excludeUsers ) named user accounts from the dump files or from the import. You can use these options to exclude user accounts that are not accepted for import to a MySQL DB System, or that already exist or are not wanted on the target MySQL instance.
(Bug #31627292) - With the deferTableIndexes option set to all, MySQL Shell’s dump loading utility loadDump() defers creation of all secondary indexes until after the table is loaded.
Previously, a table with a unique key column containing an auto-increment value failed to load in this situation. The utility now also creates indexes defined on columns with auto-increment values when the deferTableIndexes option is set to all. (Bug #31602690) - The upload method used by MySQL Shell’s instance dump utility util.dumpInstance() and schema dump utility util.dumpSchemas() to transfer files to an Oracle Cloud
Infrastructure Object Storage bucket has a file size limit of 1.2 TiB. In MySQL Shell 8.0.21, the multipart size setting means that the numeric limit on multiple file parts applies first, creating a limit of approximately 640 GB. From MySQL Shell 8.0.22, the
multipart size setting has been changed to allow the full file size limit.
(Bug #31589858) - MySQL Shell’s upgrade checker utility checkForServerUpgrade() now checks for the obsolete NO_AUTO_CREATE_USER SQL mode. (Bug #31501981, Bug #99903)
- The parallelization of table loading by MySQL Shell’s dump loading utility loadDump() has been improved. (Bug#31441903)
- If the settings for the server’s global character set variables differed from the settings for the current session, MySQL Shell’s parallel table import utility importTable() could not import data into a table created in the session whose name contained non-ASCII characters. Now, when the utility’s characterSet option is specified, MySQL Shell executes a SET NAMES statement with the given value. (Bug #31412330)
- MySQL Shell’s parallel table import utility importTable() could not import data if the global SQL mode NO_BACKSLASH_ESCAPES was set. The utility now clears the
global SQL mode in sessions created to run the import. (Bug #31407133) - When a function that was defined as a member of a MySQL Shell extension object had a number of optional parameters but no required parameters, in some situations
calling the function with zero parameters or one parameter returned an error.
(Bug #30744994) - MySQL Shell’s db global object did not return the current schema when its properties were queried. (Bug #30296825, Bug #96839)
On Behalf of Oracle/MySQL Release Engineering Team,
Prashant Tekriwal
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
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
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