MariaDB Community Server 13.1.2 GA adds negative grants with DENY, JSON arrow operators and formatted JSON_TABLE columns, auto-extending partitions and deeper package support for Oracle compatibility, broader observability through a new INFORMATION_SCHEMA table and config validation, and per-table control over the InnoDB adaptive hash index.
Key takeaways
- Stronger Security Controls: The new
DENYclause lets administrators block a privilege outright, no matter what else is granted, andparsec_iterationsmakes the PARSEC authentication plugin's key-derivation cost configurable. - Richer JSON Support: The
->and->>arrow operators bring MySQL-compatible JSON shorthand to MariaDB, andJSON_TABLEcan now return nested JSON structures as a single formatted column. - Deeper Oracle Compatibility: Auto-extending
RANGE COLUMNSpartitions, local-variable names inPREPARE/EXECUTE/OPEN ... FOR, and package-wideTYPEdeclarations round out MariaDB's Oracle PL/SQL migration story. - Sharper Observability & Manageability: A new
INFORMATION_SCHEMA.VECTOR_INDEXEStable,mariadbd --validate-config, adaptive hash index statistics inANALYZE FORMAT=JSON, and InnoDB tablespace size warnings all make it easier to see what the server is doing before something breaks. - Tuned InnoDB Performance: Locking full table scans now take a table-level lock instead of locking every row individually, and the adaptive hash index can be enabled or disabled per table.
We are excited to announce the General Availability of MariaDB Community Server 13.1. Building on the foundation laid by MariaDB Community Server 12.3 LTS, and continuing the work introduced in MariaDB Community Server 13.0, this release strengthens access control, extends JSON and Oracle compatibility, and gives administrators sharper visibility and performance control over InnoDB.
MariaDB Community Server 13.1 GA is part of our quarterly rolling release cycle, and will not receive further bug-fix releases. We encourage everyone to explore these new capabilities and share feedback as we continue toward the next Long-Term Support (LTS) release.
What’s New in MariaDB Community Server 13.1
Security Enhancements
MariaDB 13.1 gives administrators finer control over both access control and authentication.
- DENY Clause (“Negative Grants”):
DENYrecords a privilege that an account must never have, and a deny always wins over a grant, no matter how manyGRANTstatements say otherwise or at what level they were issued. This makes the common “grant broadly, then carve out exceptions” pattern easy to express:
GRANT SELECT ON *.* TO alice;
DENY SELECT ON secrets.payroll TO alice;
Now alice can read every table on the server except secrets.payroll. Denies are also hierarchical: a deny at a higher level cancels grants further down the hierarchy, even grants issued afterwards. A table-level deny beats a column-level grant on that same table, a database-level deny beats a table- or column-level grant in that database, and so on:
DENY SELECT ON hr.staff TO alice;
GRANT SELECT (id, name) ON hr.staff TO alice;
SELECT id, name FROM hr.staff;
-- ERROR 42000: SELECT command denied to user 'alice'@'localhost' for table `hr`.`staff`
Even though alice was explicitly granted SELECT on the id and name columns, the table-level deny still blocks her, because a deny propagates downward over anything granted beneath it. Denies can only be reversed with REVOKE DENY (a later GRANT does not cancel one)and are stored persistently in mysql.global_priv .
- parsec_iterations System Variable: The PARSEC authentication plugin derives its key from a password using PBKDF2, with a fixed iteration count that could not previously be changed. The new
parsec_iterationsvariable makes that count configurable (as a power of two, minimum 1024), so administrators can raise it to increase resistance to brute-force attacks at the cost of more work per authentication. The iteration count in effect when an account’s password is set is the one baked into its stored credentials; changing the variable afterwards does not affect existing accounts until their password is changed again.
JSON Enhancements
- JSON Arrow Operators -> and ->>: These operators are shorthand for extracting a value from a JSON document by path:
json_doc -> pathis equivalent toJSON_EXTRACT(json_doc, path), andjson_doc ->> pathadditionally unquotes the result, equivalent toJSON_UNQUOTE(JSON_EXTRACT(json_doc, path)). MySQL has accepted them since 5.7, so as of MariaDB 13.1, MySQL queries that use them port across unchanged.The function form worked in MariaDB before 13.1 and still works identically:
SELECT JSON_EXTRACT('{"id":"1", "name":"Name"}', '$.name');
-- "Name"
SELECT JSON_UNQUOTE(JSON_EXTRACT('{"id":"1", "name":"Name"}', '$.name'));
-- Name
As of MariaDB 13.1, the equivalent operator form also works and returns the same results:
SELECT '{"id":"1", "name":"Name"}'->'$.name';
-- "Name"
SELECT '{"id":"1", "name":"Name"}'->>'$.name';
-- Name
As with the function form, -> keeps the JSON quoting ("Name") while ->> returns the unquoted value (Name). The path must be a string literal (a column, user variable, or placeholder is not accepted), and applying one operator to the result of another requires parentheses.
- FORMAT JSON Columns in JSON_TABLE: A regular
JSON_TABLEpath column can only return scalar values; a path that matches an array or object is treated as an error. A column declared withFORMAT JSON PATHreturns the located JSON value as-is, serialized to text, including nested arrays and objects This is useful for pulling a nested structure into a single column without expanding it into extra rows withNESTED PATH:
SELECT * FROM JSON_TABLE('[
{"name":"Jeans", "sizes": [32, 34, 36]},
{"name":"T-Shirt", "sizes":["Medium", "Large"]}
]', '$[*]'
COLUMNS(
name VARCHAR(10) PATH '$.name',
sizes VARCHAR(100) FORMAT JSON PATH '$.sizes'
)
) AS jt;
-- +---------+---------------------+
-- | name | sizes |
-- +---------+---------------------+
-- | Jeans | [32, 34, 36] |
-- | T-Shirt | ["Medium", "Large"] |
-- +---------+---------------------+
Oracle Compatibility
- Auto-Adding Partitions for PARTITION BY RANGE: Adding an
INTERVALclause to aRANGE COLUMNSpartitioned table makes MariaDB extend its partitions automatically by a fixed time interval as data is written, removing the routine maintenance that time-ranged tables normally need:
CREATE TABLE t1 (c DATETIME)
ENGINE = InnoDB
PARTITION BY RANGE COLUMNS (c)
INTERVAL 1 DAY (
PARTITION p0 VALUES LESS THAN ('2026-04-20')
);
From that point, any write to the table ( not just one whose value needs a new partition ) makes MariaDB add as many daily partitions as it takes for the newest partition to cover the current server date and time, with no ALTER TABLE ... ADD PARTITION required. The new partitions track the server clock at the moment the statement runs, not the value being written. Oracle’s NUMTODSINTERVAL() and NUMTOYMINTERVAL() interval functions are also accepted as an alternative spelling.
- Local Routine Variables in PREPARE/EXECUTE/DEALLOCATE and
OPEN ... FOR: PREPARE LOCAL spvar FROM ...takes the prepared statement’s name from the value of a stored-procedure variable, rather than from a literal identifier, which is useful when the statement name needs to be computed at runtime:
CREATE PROCEDURE p1()
BEGIN
DECLARE spvar_with_ps_name VARCHAR(64) DEFAULT 'my_stmt';
PREPARE LOCAL spvar_with_ps_name FROM 'SELECT 1';
DEALLOCATE PREPARE my_stmt;
END;
LOCAL does not create a separate namespace, so a statement prepared with PREPARE LOCAL can still be executed or deallocated by its resolved name with a plain EXECUTE or DEALLOCATE PREPARE, and the reverse also works. PREPARE LOCAL is only valid inside a stored procedure.
- Package-Wide TYPE Declarations: A package specification can now declare data types with
TYPE, alongside its public routines. Such a type is public: routines outside the package can declare variables of it using the qualified namepackage_name.type_name, using theEXECUTEprivilege on the package.
Observability & Manageability
- INFORMATION_SCHEMA.VECTOR_INDEXES: This new table provides metadata about vector indexes defined on tables, giving administrators a queryable way to inspect vector search configuration alongside the rest of the schema.
- mariadbd –validate-config: This option checks the server’s configuration for validity without actually starting the server, making it possible to catch a bad configuration change before it causes a failed restart.
- Adaptive Hash Index Statistics in ANALYZE FORMAT=JSON: The per-table
r_engine_statsobject inANALYZE FORMAT=JSONoutput now includes four new adaptive hash index counters:adaptive_hash_search(the number of successful searches that used the adaptive hash index),adaptive_hash_search_btree(the number of searches that fell back to the B-tree, i.e. adaptive hash index misses),adaptive_hash_pages_added(the number of index pages the adaptive hash index was built on), andadaptive_hash_rows_added(the number of adaptive hash index rows added). Together, these give query tuning workflows direct visibility into how much a specific query relied on the AHI, right alongside the existingpages_accessedandpages_read_time_msexecution statistics. All four counters are also exposed server-wide viaSHOW GLOBAL STATUS, under different names than theirANALYZE FORMAT=JSONcounterparts:adaptive_hash_searchasInnodb_adaptive_hash_hash_searches,adaptive_hash_search_btreeasInnodb_adaptive_hash_non_hash_searches, andadaptive_hash_pages_addedandadaptive_hash_rows_addedkeeping their names asInnodb_adaptive_hash_pages_addedandInnodb_adaptive_hash_rows_added. This lets administrators track cumulative AHI usage across the whole server, not just for a single query’sANALYZEoutput. - innodb_tablespace_size_warning_threshold and innodb_tablespace_size_warning_pct: These variables let InnoDB warn in the error log as a tablespace approaches a configured size threshold, rather than administrators finding out only once a tablespace is 100% full and the service is disrupted. Warnings are written on each further one-percent increase once the configured percentage of the threshold is reached. The feature is disabled by default, since
innodb_tablespace_size_warning_thresholddefaults to 0;innodb_tablespace_size_warning_pctdefaults to 85 (the point at which warnings begin, once a threshold is set), and accepts a range of 0–100.
InnoDB Performance
- Table-Level Locking for Locking Full Table Scans: Previously, a locking statement that scanned an entire table (with no
WHEREcondition and noLIMIT) still acquired row locks one at a time. This applied toSELECT ... FOR UPDATE,UPDATE, andDELETE, as well as to reads underSERIALIZABLEisolation. The newinnodb_table_lock_on_full_scanoption (session and global, defaultOFF) changes this: when enabled, InnoDB takes a single table-level lock instead of per-row locks, shared (S) for reads and exclusive (X) for writes andFOR UPDATEreads. This substantially reduces both the memory footprint and the execution time of such scans. - ADAPTIVE_HASH_INDEX = { YES | NO | DEFAULT }: This new table option, and the matching per-index option, controls whether the InnoDB adaptive hash index (AHI) is used for a specific table or index.
NOdisables the AHI for that table or index even when it is enabled globally, which suits tables whose access pattern doesn’t benefit from it.YESenables it there when the globalinnodb_adaptive_hash_indexisON, or when it’s set to the newIF_SPECIFIEDvalue, which enables the AHI only for tables and indexes explicitly markedYES.DEFAULTfollows the global setting. Ifinnodb_adaptive_hash_indexisOFF, the AHI stays disabled no matter what the table or index options say, and an index-level setting overrides the table-level one.
Tools
- mariadb-dump No Longer Includes Generated Column Values: Previously,
mariadb-dumpwrote the computed values of generated columns into itsINSERTstatements, even though the server recalculates them automatically when the dump is reloaded. As of MariaDB 13.1, those values are omitted; with--complete-insert, generated columns are left out of both the column list and the values entirely, producing smaller, cleaner dumps.
Frequently asked questions
No. MariaDB Community Server 13.1 is a rolling release, not an LTS release, and it will not receive further bug-fix releases. Users who need a longer maintenance window have two options: an LTS release of MariaDB Community Server, which receives up to 3 years of maintenance, or MariaDB Enterprise Server, which offers a 5+3 year support plan (5 years of standard support plus 3 years of extended support).
Since 13.1 is a rolling release, it does not receive further bug-fix releases once the next release ships. Users should plan to upgrade to the next MariaDB Community Server release, or to an LTS release if they need a longer maintenance window.
DENY records a privilege that an account must never have; unlike REVOKE, which simply removes a granted privilege (and can be overridden by a broader grant at a higher level), a DENY always wins over any GRANT, no matter how it was issued, and can only be undone with REVOKE DENY. This makes it possible to grant broad access and then carve out specific exceptions.
Yes. The new parsec_iterations system variable, introduced in MariaDB 13.1, controls the number of PBKDF2 iterations used to derive a key from a password for the PARSEC authentication plugin. A higher value increases resistance to brute-force attacks at the cost of more work per authentication. It only affects accounts whose password is set after the variable is changed.
Yes, as of MariaDB 13.1. json_doc -> path is shorthand for JSON_EXTRACT(json_doc, path), and json_doc ->> path additionally unquotes the result. These operators were previously MySQL-only; queries written for MySQL 5.7 and later that use them now work unchanged in MariaDB.
Yes. Adding an INTERVAL clause to a RANGE COLUMNS partitioned table, new in MariaDB 13.1, makes the server automatically extend partitions by a fixed time interval as writes arrive, removing the need for a scheduled job or manual ALTER TABLE ... ADD PARTITION to keep up with incoming data.
Yes. MariaDB 13.1 adds the ADAPTIVE_HASH_INDEX = { YES | NO | DEFAULT } table and index options, letting administrators override the global innodb_adaptive_hash_index setting on a per-table or per-index basis.
No, not as of MariaDB 13.1. Since the server recalculates generated column values automatically when a dump is reloaded, mariadb-dump no longer writes those values into its INSERT statements, producing smaller and cleaner backups.
MariaDB follows its standard upgrade process for rolling releases; see the MariaDB upgrade documentation for version-specific steps and compatibility notes before upgrading a production system.
MariaDB Community Server 13.1 is available from the MariaDB Community Server downloads page.
MariaDB Community Server 13.1 GA is now available as part of our rolling release cycle. As a rolling release, 13.1 will not receive further bug-fix releases; users who need long-term support and maintenance updates should continue to track our LTS series. For the complete list of changes, see the MariaDB 13.1 Changes & Improvements page. We invite you to try out these new capabilities and share your feedback with the community.
