Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-37525

Implement Binary-Optimized JSON Data Type ("JSON/B") in MariaDB

    XMLWordPrintable

Details

    • Q4/2025 Server Development

    Description

      Introduce a new binary-optimized JSON data type (JSON/B) in MariaDB to improve performance and compatibility. The goal is to move beyond the current LONGTEXT-based implementation by providing binary storage, efficient parsing, advanced indexing, and functional parity with MySQL JSON. Extended features will aim for PostgreSQL JSONB alignment where feasible.

      Scope:

      In-Scope (Core):

      • Binary storage format for JSON documents
      • Optimized parsing logic
      • Full support for JSON functions & operators (JSON_EXTRACT, ->, ->>, etc.)
      • Indexing support (generated columns, multi-valued indexes)
      • Compatibility with MySQL JSON (RFC 8259 + binary optimizations)

      In-Scope (Extended):

      • PostgreSQL JSONB-style features (decomposed storage, GIN indexing, advanced operators @>, ?, subscripting)

      Out of Scope:

      • NoSQL emulation
      • Support for non-relational use cases
      • Engines outside of InnoDB

      Acceptance Criteria:

      • New JSON/B column type created and supported in InnoDB
      • MySQL JSON binary format compatibility validated (replication, migration)
      • All existing MariaDB JSON functions ported to work with binary storage
      • Benchmarks demonstrate performance improvements over LONGTEXT JSON storage
      • Indexing support verified (generated columns + multi-valued indexes)
      • Gap analysis completed vs PostgreSQL JSONB, with operator/function coverage mapped
      • Documentation updated with migration guidance and feature matrix

      Design Considerations:

      • Base binary format on MySQL JSON for replication compatibility
      • Extend with PostgreSQL-style operators where feasible
      • Hybrid indexing strategies (generated columns + GIN-like options)
      • Ensure "last key wins" semantics for duplicate keys
      • Maintain backward compatibility with LONGTEXT JSON columns

      Dependencies:

      • InnoDB engine modifications
      • Parser and optimizer updates
      • Function/operator compatibility testing

      Testing / Validation:

      • Unit and integration tests for JSON functions & operators
      • Replication tests with MySQL JSON columns
      • Benchmark suite comparing LONGTEXT JSON vs JSON/B vs PostgreSQL JSONB
      • Indexing tests (performance, correctness, stability)

      Documentation Deliverables:

      • Developer documentation of binary storage format
      • User documentation of new JSON/B type, supported operators, and indexing methods
      • Migration guide from LONGTEXT JSON

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              adamluciano Adam Luciano
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.