-
The following are deprecated in this version and subject to removal in a future version of MySQL Shell:
ociParManifestandociParExpireTime: these dump utility options have been superseded by more efficient methods of creating and using Pre-Authenticated Requests.--import: superseded by theimportJsonutility, which is also available from the command line.--recreate-schema: no longer required.
Deprecation warnings will be displayed when any of these are used. (WL #15863)
-
AdminAPI support for MySQL Server 5.7 is deprecated and subject to removal in a future version. AdminAPI commands will emit a deprecation warning if run against a 5.7 instance.
The following AdminAPI methods are deprecated in this release, and subject to removal in a future version:
dba.configureLocalInstance(): this method is only required by MySQL versions which did not support remote persisting of variables. MySQL Server 5.7 is currently the only supported version with that limitation.Cluster.checkInstanceState(): the checks implemented by this method are now integrated into methods which require it, such asCluster.addInstance(),Cluster.rejoinInstance(), and so on.
The following AdminAPI options are deprecated and subject to removal in a future version:
interactiveis deprecated on all AdminAPI methods which use it.-
passwordis deprecated on the following methods:dba.rebootClusterFromCompleteOutage()dba.configureInstance()dba.configureLocalInstance()dba.configureReplicaSetInstance()Cluster.checkInstanceConfiguration()Cluster.removeInstance()Cluster.addInstance()Cluster.forceQuorumUsingPartitionOf()Cluster.rejoinInstance()
-
waitRecoveryis deprecated on all AdminAPI methods which use it, userecoveryProgressinstead.The
recoveryProgressoption is also added toCluster.addInstance(),ReplicaSet.addInstance(), andReplicaSet.rejoinInstance(). -
clearReadOnlyoption is deprecated indba.configureInstance(),dba.configureLocalInstance(), anddba.dropMetadataSchema.super_read_onlyis checked, and automatically disabled.
Deprecation warnings will be emitted in MySQL Shell 8.2 for each of these deprecated features, methods, and options. (WL #15862)
-
AdminAPI now supports the configuration of the following replication options:
-
SOURCE_CONNECT_RETRYcan be configured using the following options:clusterSetReplicationConnectRetryofandclusterSet.createReplicaCluster().cluster.setOption()replicationConnectRetryofandreplicaSet.addInstance().replicaSet.setInstanceOption()
-
SOURCE_RETRY_COUNTcan be configured using the following options:clusterSetReplicationRetryCountofandclusterSet.createReplicaCluster().cluster.setOption()replicationRetryCountofandreplicaSet.addInstance().replicaSet.setInstanceOption()
-
SOURCE_HEARTBEAT_PERIODcan be configured using the following options:clusterSetReplicationHeartbeatPeriodofandclusterSet.createReplicaCluster().cluster.setOption()replicationHeartbeatPeriodofandreplicaSet.addInstance().replicaSet.setInstanceOption()
-
SOURCE_COMPRESSION_ALGORITHMScan be configured using the following options:clusterSetReplicationCompressionAlgorithmsofandclusterSet.createReplicaCluster().cluster.setOption()replicationCompressionAlgorithmsofandreplicaSet.addInstance().replicaSet.setInstanceOption()
-
SOURCE_ZSTD_COMPRESSION_LEVELcan be configured using the following options:clusterSetReplicationZstdCompressionLevelofandclusterSet.createReplicaCluster().cluster.setOption()replicationZstdCompressionLevelofandreplicaSet.addInstance().replicaSet.setInstanceOption()
-
SOURCE_BINDcan be configured using the following options:clusterSetReplicationBindofandclusterSet.createReplicaCluster().cluster.setOption()replicationBindofandreplicaSet.addInstance().replicaSet.setInstanceOption()
-
NETWORK_NAMESPACEcan be configured using the following options:clusterSetReplicationNetworkNamespaceofandclusterSet.createReplicaCluster().cluster.setOption()replicationNetworkNamespaceofandreplicaSet.addInstance().replicaSet.setInstanceOption()
For more information on the replication options and their values, see CHANGE REPLICATION SOURCE TO Statement.
andcluster.optionsare extended to display these options and their values for each instance in the cluster.replicaSet.optionsis extended for Replica Clusters to display an error in theclusterset.statusclusterErrorsarray for any replication channel which is not correctly configured according to the Cluster's metadata. Similarly forif the Cluster is a Replica Cluster in a ClusterSet. (WL #13687)cluster.status -
-
The following methods are extended to include information on the MySQL Router Read/Write Splitting Port,
rwSplitPort:cluster.listRouters()clusterSet.listRouters()replicaSet.listRouters()
(WL #15552)
-
is extended with the optioncluster.setRoutingOption()unreachable_quorum_allowed_traffic. This option enables configuration of MySQL Router's routing policy in the event of a loss of quorum on the only reachable Cluster partition.See Routing Options.
is extended to list the value ofcluster.routingOptions()unreachable_quorum_allowed_traffic. (WL #15842)
-
Using
-- clusterset listRouterson the command line, without providing a parameter forlistRouters, resulted in the following error in MySQL Shell 8.0.34:ERROR: Argument #1 is expected to be a string(Bug #35747208)
References: This issue is a regression of: Bug #35068427.
-
If multiple Read Replicas are added with the same label, only one of the Read Replicas was listed in the
output.Cluster.status()As of this release, Read Replica labels must be unique within the Cluster and can only contain alphanumeric values, or _ (underscore), . (period), - (hyphen), or : (colon) characters. If the label is not unique within the Cluster, or invalid characters are detected, an error is returned. (Bug #35739776)
If
memberAuthTypewas set toCERT_ISSUERorCERT_SUBJECT, the values defined for the ClusterSet optionclusterSetReplicationSslModeand ReplicaSet optionreplicationSslModewere ignored and automatically set toVERIFY_CA. (Bug #35621465)-
did not check if the target instance was the primary of a Replica Cluster, resulting in a misconfigured replication channel. An error similar to the following was returned:Cluster.setPrimaryInstance()WARNING: The Cluster's Replication Channel is misconfigured or stopped, topology changes will not be allowed on the InnoDB Cluster 'clusterName' NOTE: To restore the Cluster and ClusterSet operations, the Replication Channel must be fixed using rejoinCluster()As of this release,
checks if the target instance is a configured primary and stops if it is, returning an error to the user. (Bug #35594376)Cluster.setPrimaryInstance() -
If a switchover occurred in a ClusterSet where one of the replica clusters was entirely offline, attempting to reboot the cluster produced errors relating to rejoining the offline cluster to the ClusterSet.
As of this release, no attempt is made to rejoin the offline cluster to the ClusterSet and warnings are displayed to advise the user that the replica cluster is invalid and must be rejoined manually. (Bug #35548072)
replicationSslModewas not returned byorReplicaSet.status(). (Bug #35523549)ReplicaSet.options()If a Replica Cluster with Read Replicas had a major outage,
ClusterSet.status({extended:1})showed the Read Replicas as Cluster members with thememberRoleofSECONDARY. (Bug #35449470)-
If a Cluster was rebooted using the
dba.rebootClusterFromCompleteOutage()method, without specifying theswitchCommunicationStackoption, the Cluster was rebooted using the defaults for thexcomcommunication stack, even if the Cluster was configured to usemysql. As a result, recovery accounts were not recreated andmysql-specific checks were not performed.As of this release,
dba.rebootClusterFromCompleteOutage()checks the configured communication stack and proceeds using the configured value. (Bug #35444206) -
could not use an instance with the applier state OFF as a potential primary. An error similar to the following was returned:ReplicaSet.forcePrimaryInstanceERROR: Replication applier is OFF at instance instanceName:3306. ERROR: Replication applier is OFF at instance instanceName:3306. ERROR: Replication errors found for one or more SECONDARY instances. Use the 'invalidateErrorInstances' option to perform the failover anyway by skipping and invalidating instances with errors. ReplicaSet.forcePrimaryInstance: One or more instances have replication applier errors. (MYSQLSH 51145)It was not possible to use such an instance even if
invalidateErrorInstanceswas set totrue.As of this release,
treats such instances as valid candidates for promotion.ReplicaSet.forcePrimaryInstanceinvalidateErrorInstancesis not required and the command does not wait for transactions to be applied to the instance. (Bug #35434959) -
It was not possible to retrieve a Cluster handle, using
dba.getCluster(), from a Read Replica connected to a Cluster which had lost quorum. An error similar to the following was returned:Dba.getCluster: Dba.getCluster: Unable to find a cluster PRIMARY member from the active shell session because the cluster has too many UNREACHABLE members and no quorum is possible. Use Dba.getCluster(null, {connectToPrimary:false}) to get a read-only cluster handle. (RuntimeError)As of this release,
dba.getCluster()establishes a connection to a Cluster member and returns the Cluster handle. (Bug #35391093) -
It is not possible for an instance to join a Cluster if the instance's local address, as generated by the AdminAPI or defined in
localAddress, is not compatible with the automatically-generated Group Replication allow list.As of this release,
dba.createCluster()andverify the local address (supplied or generated) is compatible with the automatically generated allow list. If the list is manually defined, no test is performed.cluster.addInstance()NoteThis only applies if the communication stack is XCOM.
Additionally, on Windows platforms, if the allow list is not automatically generated, a warning is issued regarding the server trying to connect to itself. (Bug #31357039)
Instance dump utility now excludes the
mysql_firewallschema ifocimds: true. (Bug #35805866)-
MySQL Shell was updated for compatibility with the privilege changes made in MySQL HeatWave Service.
The following privileges were added to MySQL HeatWave Service:
AUDIT_ADMINBACKUP_ADMINFLUSH_OPTIMIZER_COSTSFLUSH_STATUSFLUSH_TABLESFLUSH_USER_RESOURCESROLE_ADMIN
The following privileges were removed from MySQL HeatWave Service
RESOURCE_GROUP_ADMINRESOURCE_GROUP_USER
For more information on MySQL HeatWave Service privileges, see Default MySQL Privileges. (Bug #35668544)
Operations resulting in the curl errors
52: CURLE_GOT_NOTHINGand56: CURLE_RECV_ERRORare retried for all supported cloud vendors, for all utilities which support them. (Bug #35659057)-
MySQL Shell utilities which connect to Object Storage now use dedicated endpoints.
For more information, see OCI Object Storage Dedicated Endpoints. (Bug #35561100)
util.checkForServerUpgrade()has been updated to check for columns which have foreign keys referencing columns in tables using different database storage engines, such as MyISAM. (Bug #35155064)The
@.done.jsongenerated byutil.dumpSchemas()now includes the number of rows dumped for each table, in thetableRowsfield. (Bug #34904657)-
As of MySQL Server 8.2.0,
SET_USER_IDis deprecated and subject to removal in a future version.SET_USER_IDis replaced bySET_ANY_DEFINERandALLOW_NONEXISTENT_DEFINER. This change impacts the way MySQL Shell handles dumps for use in MySQL HeatWave Service (ocimds: true) because the administrator user will have theSET_ANY_DEFINERprivilege and is now able to execute statements with theDEFINERclause. This was not possible in previous versions and users had to use thestrip_definerscompatibility option.As of this release, a new option,
targetVersionis added to theutil.dumpInstance(),util.dumpSchemas(), andutil.dumpTables()methods. You must use this method to manually define the version of the target MySQL instance, in n.n.n format. Such as 8.1.0, for example. If the value is not set, the MySQL Shell version is used.The compatibility checks are adjusted depending on the value of
targetVersion.NoteThis option is not required by the
util.copyInstance(),util.copySchemas(), andutil.copyTables()methods, which can detect the version of the target instance automatically.If
ocids:trueandtargetVersionis set to a version which supports theSET_ANY_DEFINER, the compatibility optionstrip_definersis not required.If the compatibility option
strip_restricted_grantsis used, andtargetVersionis set to a version which supports theSET_ANY_DEFINER,SET_USER_IDis replaced bySET_ANY_DEFINERinstead of being stripped. (WL #15887)
When dumping an instance, with
ocimds: true, MySQL Shell reported warnings relating to users with privileges on system schemas. As these schemas are always present in both source and target, the warnings were unnecessary and have been removed. (Bug #35680824)Under certain circumstances, when loading a file larger than
maxBytesPerTransaction, (or 1.5 *bytesPerChunkifmaxBytesPerTransactionwas not used) a memory leak could occur. (Bug #35600174)-
When loading a very large file with
util.importTable(), the progress was displayed as 100% complete although the process was not yet complete and the server continued to process the imported data. This could lead a user to believe the process had failed and result in manual attempts to cancel the process.As of this release, thread activity is now displayed for the commit process, and an animated hyphen (-) is used to indicate progress. (Bug #35590038)
-
Importing a large file to a non-existent schema, using
util.importTable(), took a long time to return an unknown database error. This was caused by MySQL Shell chunking the entire file into smaller chunks without checking for errors until the entire file was chunked.As of this release, errors generated by other threads are checked during the chunking process. (Bug #35541522)
-
util.debug.collectDiagnostics()failed if run on an InnoDB Cluster created with an older version of MySQL Shell. An error similar to the following was generated:An error occurred during data collection. Partial output deleted. debug.collectDiagnostics: ClassicSession.run_sql: Table 'mysql_innodb_cluster_metadata.v2_cs_clustersets' doesn't exist (MySQL Error 1146)As of this release,
util.debug.collectDiagnostics()collects diagnostics information even if tables are missing. (Bug #35468106) -
Exporting to a bucket using a prefix with
util.exportTable(), required the prefix to exist in the target bucket. The following error was returned if the prefix did not exist:ValueError: Util.export_table: Cannot proceed with the dump, the directory containing 'prefix/filename' does not exist at the target location table-export.As of this release, this requirement has been removed. If the prefix does not exist, it is created. (Bug #35462985)
util.debug.collectDiagnostics()threw an exception if the server was configured to write error logs to stderr. For example, ifmysqldwas started with--console. (Bug #35318770)-
Under certain circumstances,
util.importTable()failed when importing a single, uncompressed file due to how the chunking algorithm handled unescaped sequences of characters used byfieldsTerminatedBy.As of this release, if a single file is imported, additional threads read the file in fixed-size blocks, then the blocks are scanned sequentially for row boundaries. Once read, the file data is stored in memory until loaded by the server. This also applies to compressed files which are now also chunked.
Additionally, chunking and sub-chunking is disabled if
linesTerminatedByis set to an empty string or the same value asfieldsTerminatedBy. (Bug #35279351) The MySQL Shell upgrade checker utility flagged views as corrupt in MySQL 5.7 versions up to 5.7.39. This issue occurred for views whose
fromclause contained a table schema prefix with agroup byclause. (Bug #111813, Bug #35635009)-
util.dumpInstance()generated an empty.pre.sqlfile for invalid views.As of this release, invalid views are detected and generate an error. Such views must be corrected or excluded from the dump using the
excludeTablesoption. (Bug #111092, Bug #35415976) -
The utility,
checkForServerUpgrade, did not recognizeINTERSECTas a reserved word.INTERSECTwas reserved in MySQL Server 8.0.31. (Bug #110824, Bug #35335813)
It was not possible to enter a full-width 8 (unicode 0xFF18) using copy and paste or a Japanese input method. (Bug #35782407)
-
Running redirected commands similar to
mysqlsh.exe --pym pip install --upgrade pip > out.logresulted in an exception containing the following:
File "C:\path\mysql-shell\lib\Python3.10\lib\site-pack ages\pip\_vendor\rich\console.py", line 1990, in _check_buffer self.file.fileno() in _STD_STREAMS_OUTPUT AttributeError: module 'mysqlsh.shell_stdout' has no attribute 'fileno'As of this release, a
fileno()method is exposed in MySQL Shell'sstdoutandstderrwhere it can also be found by redirected commands. (Bug #35528045) -
If an empty string was passed on the command line, MySQL Shell returned
stoiorinvalid stoi argument, depending on platform. For example:>mysqlsh root@localhost?connect-timeout= MySQL Shell 8.1.1-commercial ...... Creating a Classic session to 'root@localhost?connect-timeout=' invalid stoi argumentAs of this release, if parameters such as
connect-timeoutare provided without values on the command line, an error similar to the following is returned:Invalid URI: Invalid value '' for 'connect-timeout'. The timeout value must be a positive integer (including 0).(Bug #35130320)