Release Notes for MariaDB Xpand 6.1.0
This page is part of MariaDB's Documentation.
The parent of this page is: Release Notes for MariaDB Xpand 6.1
Topics on this page:
Overview
MariaDB Xpand is a distributed SQL database. This is the first General Availability (GA) release in the MariaDB Xpand 6.1 series.
MariaDB Xpand 6.1.0 was released on 2023-02-02.
Online Group Changes
Xpand 6.1 adds support for online group changes, which allows the cluster to remain fully online and available while a node is being added. (XPAND-4809)
Xpand uses a distributed group membership protocol to maintain the static set of all nodes known to the cluster and checks that the nodes maintain active communication between each other. Xpand refers to this as a group. When the set of nodes changes, there is a change in the group of nodes in the cluster, which is referred to as a group change.
In Xpand 6.1, depending on the specific state of the cluster and the operation being performed, Xpand goes through either a full group change or an online group change:
During an online group change, the cluster remains fully online and available.
During a full group change, there is a brief period of unavailability, typically lasting a few seconds.
Online
Starting with Xpand 6.1, when a node is added to a cluster, Xpand attempts to perform an online group change. When nodes are added as part of an online group change, the rest of the cluster is online and available for the duration of the group change.
When an online group change occurs:
The new node(s) are marked with the "late" sub-state
The Rebalancer copies data to the new node(s)
Existing nodes continue processing transactions
The new node(s) are fully able to service transactions, queries
MaxScale can detect the new nodes and begin routing connections to the new nodes
The new node(s) do not participate in some internal operations, such as the sequence manager and lock manager. The
lockman_max_locksandlockman_max_transaction_lockssystem variables apply to non-late nodes only, and late nodes do not manage any locks.
Full
Full group changes are equivalent to the group changes from previous Xpand releases, but these types of group changes are known as full group changes going forward.
Full group changes cause the cluster to experience a brief period of unavailability during certain operations, such as the following:
A node is removed from the cluster, due to a scale-in operation or an unexpected node or zone failure.
If the number of nodes being added to the cluster is greater than or equal to the number of non-late nodes currently in the cluster.
ALTER CLUSTER ADD .. COORDINATEis executed.The cluster is restarted via
clx dbrestart
Scale-Out
As a part of this change in Xpand 6.1, the procedure to add nodes, which is known as the scale-out procedure, is overhauled to avoid a full group change when zones are not in use.
During scale-out, when zones are not in use, Xpand 6.1 adds the new nodes with the "late" sub-state. Administrators can join the system.nodeinfo and system.membership system tables or execute clx status to determine which nodes are "late".
For additional information about the scale-out procedure, see "Scale-Out with MariaDB Xpand 6.1".
For additional information about group changes, see "Group Changes with MariaDB Xpand 6.1".
Backup to Object Storage in the Cloud
Xpand 6.1 adds support for backing up to object storage in the cloud. (XPAND-20742)
Storing backups in cloud-based object storage can result in cost reductions and can simplify administration:
Economical: Cloud-based object storage is often very low cost.
Flexible: Cloud-based object storage is available for both cloud and on-premises deployments.
Limitless: Cloud-based object storage is often virtually limitless.
Resilient: Cloud-based object storage is often low maintenance and highly available, since many services use resilient cloud infrastructure.
Scalable: Cloud-based object storage is often highly optimized for read and write scaling.
Secure: Cloud-based object storage is often encrypted-at-rest.
Cloud backups have been tested with AWS S3 and GCP Cloud Storage. Many cloud-based object storage services are compatible with AWS S3. MariaDB cannot make guarantees about all S3-compatible object storage services, because different services provide different functionality. If you have any questions about using specific S3-compatible object storage with Xpand, contact MariaDB Support.
AWS S3
To use
BACKUPwith AWS S3:BACKUP *.* TO 's3://AWS_BUCKET_NAME/OBJECT_NAME?access_key_id=AWS_ACCESS_KEY_ID&secret_access_key=AWS_SECRET_ACCESS_KEY®ion=AWS_REGION&session_token=AWS_SESSION_TOKEN'"
To use
RESTOREwith AWS S3:RESTORE *.* FROM 's3://AWS_BUCKET_NAME/OBJECT_NAME?access_key_id=AWS_ACCESS_KEY_ID&secret_access_key=AWS_SECRET_ACCESS_KEY®ion=AWS_REGION&session_token=AWS_SESSION_TOKEN'"
GCP Cloud Storage
To use
BACKUPwith GCP Cloud Storage:BACKUP *.* TO 'gs://GCP_BUCKET_NAME/OBJECT_NAME?credentials=GCP_CREDENTIALS_BASE64'
To use
RESTOREwith GCP Cloud Storage:RESTORE *.* FROM 'gs://GCP_BUCKET_NAME/OBJECT_NAME?credentials=GCP_CREDENTIALS_BASE64'
For additional information about cloud-based backup and restore, see "Fast Backup and Restore with MariaDB Xpand".
Roles
Xpand 6.1 adds support for roles, which are named sets of privileges. (XPAND-34842)
Privileges can be granted to and revoked from roles.
In Xpand 6.1, a user can be granted multiple roles, and the user can activate multiple roles or even all available roles at the same time.
When a role is granted to a user, the user can use all privileges held by the role.
When a role is granted to another role, the role inherits all privileges held by the granted role, and users with the role can use all privileges held by both roles.
Create Roles
To create one or more roles, use the
CREATE ROLEstatement:CREATE ROLE account_managers, customer_support, contractors;
Grant Privileges and Roles
Activate Roles
To activate one or more roles for a user, use the
SET ROLEstatement:SET ROLE account_managers, customer_support;To activate all roles available for a user, use the
SET ROLE ALLstatement:SET ROLE ALL;
Default Roles
To specify the default roles for a user, use the
SET DEFAULT ROLEstatement:SET DEFAULT ROLE customer_support FOR alice;To specify that all roles available for the user should be activated by default, use the
SET DEFAULT ROLE ALLstatement:SET DEFAULT ROLE ALL FOR alice;
For additional information about roles, see "Roles for MariaDB Xpand".
Granular Administrative Privileges
In Xpand 6.1, administrative privileges can be configured at a more granular level, so that privileges to perform some administrative operations can be granted without granting the SUPER privilege. (XPAND-35290)
The following new privileges are supported:
In Xpand 6.1, the SUPER privilege is still a superset of the new privileges.
Before upgrading production environments to Xpand 6.1, MariaDB recommends testing the new version in a development environment to ensure that all requisite grants are in place, including for infrastructure users.
BINLOG ADMIN
The
BINLOG ADMINprivilege grants permissions for the following operations:SHOW BINLOG POSITIONSHOW BINLOG SEGMENTS
CLUSTER ADMIN
The
CLUSTER ADMINprivilege grants permissions for the following operations:ALTER SLICEALTER REPLICA
CONNECTION ADMIN
The
CONNECTION ADMINprivilege grants permissions for the following operations:
REPAIR ADMIN
The
REPAIR ADMINprivilege grants permissions for the following operations:
REPLICATION ADMIN
The
REPLICATION ADMINprivilege grants permissions for the following operations:
SET USER
The
SET USERprivilege grants permissions for the following operations:
SYSTEM VARIABLES ADMIN
The
SYSTEM VARIABLES ADMINprivilege grants permissions for the following operations:
Aggregation Performance Enhancements
Xpand 6.1 contains performance enhancements for aggregation queries, such as the following:
SELECT ACCT_ID, SUM(SALES_AMT)
FROM sales
GROUP BY ACCT_ID;
Streaming Aggregations
In Xpand 6.1, streaming aggregation operations are enabled by default. (XPAND-36040)
The following system variables are enabled by default:
enable_rule_scalar_stream_aggregate_implenable_rule_scalar_stream_aggregate_over_partialenable_rule_groupby_stream_aggregate_implenable_rule_dist_groupby_stream_aggregate_impl
In-Memory Skip-lists for Aggregations
By default, Xpand 6.1 uses in-memory skip-lists for temporary data structures during execution of aggregation queries. (XPAND-35186)
This change allows aggregation queries to be executed more efficiently.
The default value of the
sigma_skiplistsystem variable has changed fromOFFtoON.
Predictive Governor
Xpand 6.1 adds support for a predictive governor, which prevents execution of queries that are estimated to process an excessive number of rows as a result of a join. This may be the result of a join query that is poorly indexed, or that is written such that it does not use available indexes. (XPAND-35834)
Set Threshold
To set a threshold for the predictive governor, use the
sierra_predictive_governor_thresholdsystem variable:SET GLOBAL sierra_predictive_governor_threshold=<number_of_rows>;
Disable
To disable the predictive governor, use the
sierra_predictive_governorsystem variable:SET GLOBAL sierra_predictive_governor=OFF;
For additional information about the predictive governor, see "Configure the Predictive Governor with MariaDB Xpand".
Proxy Protocol
Xpand 6.1 adds support for the proxy protocol, which can simplify authentication when used with a load balancer, such as MariaDB MaxScale.. (XPAND-30980)
When the proxy protocol is used with MaxScale, MaxScale transmits the original client IP address to Xpand, so that Xpand can use the client IP address as the origin address for the purposes of authentication, rather than using MaxScale's IP address.
Xpand supports both the v1 and v2 versions of the proxy protocol, including a mix of both versions.
Enable in Xpand
To enable the proxy protocol in Xpand for a specific network, set the
proxy_protocol_networkssystem variable to a space-separated list of IPv4 networks:SET GLOBAL proxy_protocol_networks='192.0.2.0/24 198.51.100.0/24';Xpand does not support a mix of proxy and non-proxy traffic on the same network.
Enable in MaxScale
To enable the proxy protocol in MariaDB MaxScale, set the
proxy_protocolparameter.
Disable in Xpand
To disable the proxy protocol in Xpand, set the
proxy_protocol_networkssystem variable to the empty string:SET GLOBAL proxy_protocol_networks='';
For additional information about the proxy protocol, see "Proxy Protocol".
Tools and Utilities
In Xpand 6.1, the clx_import and clx utilities have some enhancements and new features.
clx_import
The
clx_importutility can detect and alert to non-retriable errors. (XPAND-35649)clx_importsupports concurrent imports with the--allow-multicommand-line option. (XPAND-34613)The
--allow-multicommand-line option implies--no-globals, so that the concurrent imports don't leave system variables set incorrectly.The first
clx_importprocess can be run as usual without the--allow-multicommand-line option, with the normal global system variable changes. The--allow-multicommand-line option is only required for subsequentclx_importprocesses.
clx
The
clxutility is converted to Python 3. (XPAND-34219)
Enhanced Compatibility
Character Sets and Collations
Xpand 6.1 adds support for the
cp850character set and thecp850_general_cicollation. (XPAND-25915)Xpand 6.1 adds support for using prepared statements with the
utf8mb4character set. (XPAND-30737)
Data Types
Xpand 6.1 adds support for the
CLOBdata type. (XPAND-36307, XPT-511)Xpand 6.1 adds support for the
NVARCHARdata type. (XPAND-36306)
Strict Mode
In Xpand 6.1, when strict mode is enabled using the
STRICT_TRANS_TABLESorSTRICT_ALL_TABLESSQL mode, data type and range checks are performed for more data types. (XPAND-894, XPAND-35266, XPAND-35362, XPAND-35491)Validation checks are added for the
ENUMdata type.Validation checks are added for the
SETdata type.Validation checks are added for the
UNSIGNED INTdata type.
DDL (Data Definition Language) Statements
Xpand 6.1 adds support for
IF EXISTSandIF NOT EXISTSto someALTER TABLEstatements:Xpand 6.1 adds support for a primary key that references the same column multiple times. (XPAND-32948)
Xpand 6.1 adds an option to make transaction processing wait for
ALTER TABLEoperations to complete before continuing. (XPAND-13104)To make transaction processing wait, set the global value of the
alter_hold_until_checkpointsystem variable to1This new setting is useful for
ALTER TABLEoperations that modify a column to beNOT NULLwhere inserts do not provide a value.
Xpand 6.1 adds an option to control the default implicit locking behavior for
ALTER TABLEoperations. (XPAND-36409)To control the implicit locking behavior, set the session or global value of the
alter_locksystem variable toNONE(the default),SHARED, orAUTOThe default value of
NONEcauses operations to fail when a lock is needed, which helps prevent accidental table locking.To override the system variable for a single statement, set the
LOCKclause:ALTER TABLE hq_sales.invoices DROP PRIMARY KEY, LOCK=SHARED;
The
REPAIR TABLEstatement can repair tables that have corrupt unique indexes. (XPAND-35095)
Show Statements
In Xpand 6.1, when the
SHOW CREATE PROCEDUREstatement is executed, theCreate Procedurecolumn is now a string instead of a blob. (XPAND-35696)
Information Schema
In Xpand 6.1, the
information_schema.COLUMNStable has been modified to be more similar to MySQL and MariaDB Enterprise Server. (XPAND-35574)In Xpand 6.1, the
information_schema.TABLEStable has been modified to avoid returning inconsistent numbers of table rows on different cluster nodes. (XPAND-26352)Starting with this release, the
TABLE_ROWScolumn always reports0
System Variables
Xpand 6.1 adds dummy support for some system variables that are queried by MariaDB Connectors:
session_track_schema(XPAND-35400)performance_schema(XPAND-35428)
Stored Functions
Xpand 6.1 throws an error when a stored function parameter is declared as an
UNSIGNED DOUBLEand a negative value is provided. (XPAND-35401)
Query Planning and Compilation
Xpand 6.1 has numerous improvements to the query optimizer in reducing compile time as well as statement costing to select more efficient plans.
Xpand 6.1 has multiple improvements to cardinality estimation:
When the
sierra_new_card_estimationsystem variable is enabled (XPAND-35855)For join conditions involving expressions, unions, and multiple columns (XPAND-36232)
Xpand 6.1 reduces the time spent compiling
IN(..)lists with hundreds of entries. (XPAND-35364)Xpand 6.1 automatically uses
STRAIGHT_JOINsemantics for queries that contain a lot of joins. (XPAND-35338)The
straight_join_thresholdsystem variable can be used to configure the threshold.
Xpand 6.1 can choose more optimal plans in multiple situations:
For queries that can use Columnar indexes (XPAND-35451)
For queries involving empty user tables. (XPAND-35393)
For queries that use an
IS NULLpredicate with a column that can't beNULL(XPAND-35947)For queries with a
LEFT JOINthat can be eliminated (XPAND-36368)When
rule_minmax_limitis enabled and a query selectsMIN()orMAX()of an index prefix column with an index hint (XPAND-35127)For queries that contain an aggregation with
DISTINCT(XPAND-35138)For queries that contain an aggregation on columns with no probability distributions (PDs) (XPAND-35231)
Xpand 6.1 is better at determining when a query plan in the query plan cache is sub-optimal and should be re-compiled. (XPAND-34851)
Monitoring
The changes listed below are related to monitoring.
Storage
The sizes of individual partitions can be monitored using the
system.partition_sizesview. (XPAND-33451)A histogram tracks I/O latency for each vdev in the
system.vdev_io_latency_histogramtable. (XPAND-34812)
statd
When
statdis used in Prometheus exporter mode, it removes cached stats for nodes that have been dropped. (XPAND-35943)When
statdis used in Prometheus exporter mode, it can translate nanoseconds to seconds. (XPAND-36396)The
total_busymetric is classified as a counter. (XPAND-36403)statdoverrides the value of thesession_log_slow_threshold_mssystem variable, so that its queries are not logged toquery.log. (XPAND-36418)The
Com_commitandCom_rollbackmetrics can be used to monitor commits and rollbacks. (XPAND-24585)
Logging
When the
-hostnameoption is used to manually specify a hostname, Xpand writes the specified hostname to log files instead of the system hostname. (XPAND-35853)
Installation and Upgrade Improvements
The changes listed below are improvements to installation and upgrade.
Installer
When the
--storage-allocateoption is specified to the installer, the wizard is skipped. (XPAND-35642)The installer decreases the TCP SYNACK retry count, so that the wait to detect a failed connection is reduced from 127 seconds to 15 seconds. (XPAND-35842)
When installing Xpand 6.1, the installer tries to detect existing installations of Xpand or ClustrixDB. (XPAND-35957)
The installer sets proper ownership of the
pam_limitsconfiguration file that it creates in the/etc/security/limits.ddirectory. (XPAND-35975)The installer is better at matching IP addresses to interfaces by parsing subnet masks. (XPAND-35967)
The installer sets the correct permissions on the
/etc/xpand/xpdnode.confconfiguration file. (XPAND-35152)
Upgrade Script
When the upgrade script fails, logs are left behind in the
/tmp/xpand_upgrade_XXXdirectory, so that they can be inspected to diagnose the failure. (XPAND-30597)The upgrade script checks the MD5 checksum of the upgrade package earlier in the upgrade process, so that a corrupt package can be detected before the script tries to use the package. (XPAND-35935)
Interface Changes
Character sets
cp850 character set added
Collations
cp850_
general_ collation addedci
Functions
CAST_NULL_ON_ERRfunction added
Information Schema
APPLICABLE_ROLESinformation schema table addedENABLED_ROLESinformation schema table added
Privileges
BINLOG ADMIN Privilege user privileges added
CLUSTER ADMIN Privilege user privileges added
CONNECTION ADMIN Privilege user privileges added
REPAIR ADMIN Privilege user privileges added
REPLICATION ADMIN Privilege user privileges added
SYSTEM VARIABLES ADMIN Privilege user privileges added
SET USER Privilege user privileges added
SQL Statements
CREATE ROLE SQL statement added
DROP ROLE SQL statement added
SET DEFAULT ROLE SQL statement added
SET ROLE SQL statement added
Status Variables
Com_commitstatus variable addedCom_create_rolestatus variable addedCom_drop_rolestatus variable addedCom_grant_rolestatus variable addedCom_revoke_rolestatus variable addedCom_rollbackstatus variable addedqpc_recompile_total_factorstatus variable removed
System Tables
columnar_containerssystem table addedgmpsystem table addedhttp_requestssystem table addedhttp_sockssystem table addedmysql_db_replication_policysystem table removedrolessystem table addedroles_mappingsystem table addedsession_aclsystem table addedsession_rolessystem table addedsession_routine_aclsystem table addedsession_variablessystem table addeduser_role_linkssystem table addedusers_and_rolessystem table addedvdev_io_latency_histogramsystem table added
System Variables
alter_hold_until_checkpointsystem variable addedalter_locksystem variable addedbarrier_row_costsystem variable addedbarrier_setup_costsystem variable addedblocked_fibers_to_dumpsystem variable addedcost_sigma_waitsystem variable addeddbstart_flip_empty_queuessystem variable addedenable_rule_filter_isnull_from_or_removalsystem variable addedhttp_idle_timeout_secssystem variable addedhttp_low_speed_limitsystem variable addedhttp_low_speed_timeout_secssystem variable addedjdbcCompliantTruncationsystem variable removedjoin_swap_thresholdsystem variable addedperformance_schemasystem variable addedproxy_protocol_networkssystem variable addedqpc_max_cost_factorsystem variable removedqpc_scale_tot_factorsystem variable removedrow_limit_multipliersystem variable addedsierra_or_num_inputs_thresholdsystem variable addedsierra_predictive_governorsystem variable addedsierra_predictive_governor_thresholdsystem variable addedsierra_remove_empty_filter_above_joinsystem variable addedsierra_skip_magic_formula_no_pdsystem variable addedsierra_table_def_cardsystem variable addedstraight_join_thresholdsystem variable addedtask_tcp_arp_interval_mssystem variable removedtx_sync_commitsystem variable removedunion_all_rule_thresholdsystem variable addedurl_redactsystem variable added
XpandGUI
XpandGUI is deprecated and will be removed in a future release.
As a replacement for XpandGUI, use the Remote Observability Service.
