Database
MariaDB 13 Adds Oracle Compatibility Features, Improves Query Tools
MariaDB's latest release brings deeper support for Oracle PL/SQL patterns and expanded query optimization capabilities to ease enterprise migration.
InfoQ
MariaDB Community Server 13.0 has reached general availability, delivering a substantial set of enhancements across compatibility, developer tooling, and operational visibility.
Oracle PL/SQL Migration Made Easier#
The release brings native support for REF CURSOR types — both weak and strong variants — as well as RECORD types that can now function as parameters and return values in stored routines. These features align MariaDB's procedural SQL capabilities more closely with Oracle PL/SQL, reducing friction for teams migrating enterprise applications. REF CURSOR types can be opened, fetched, closed, and used as local variables, routine parameters, or package function return types. RECORD support extends similarly, though neither feature currently works with non-packaged global routines.
Simplified Data Modification Workflows#
The RETURNING clause, previously available only for INSERT and DELETE statements, now extends to UPDATE operations. Combined with the OLD_VALUE() function, developers can retrieve both pre-modification and post-modification values in a single database round trip without extra queries. This enhancement applies to single-table statements for now.
Query Optimization and Hints#
Building on the optimizer hint framework from MariaDB 12, the new release simplifies hint targeting for complex queries. Views, CTEs (common table expressions), and derived tables now receive automatic query block names, eliminating the need for explicit QB_NAME() declarations. The addition of QB_NAME locators helps target deeply nested query blocks when direct naming isn't feasible.
Administration and Observability Improvements#
On the operational side, the init_rpl_role setting—which designates a server's replication role—is now available as a system variable, making it queryable via or . Two information schema tables have gained new columns: and now expose , surfacing storage-engine-specific index and column metadata previously accessible only through . The table also gained a deprecation indicator column for better lifecycle tracking.

