How mariadb/server works
MariaDB Server is a relational database server with client tools, SQL and table abstractions, pluggable storage engines, replication/clustering, backup utilities, and instrumentation. The central workflow is a client connecting over the MariaDB/MySQL protocol and working with SQL-managed tables through a storage engine. The README documents additional capabilities; their implementation details and most runtime calls were not sampled, so those links are dashed where the source evidence is incomplete.
Main entry points: table.h Table metadata · handler.h Engine handler API · mysqld.h MariaDB server · sql_class.h Session and statements
Components 23
Client access
- Client library
sql-common/client.c - Command-line tools
client/mysql.cc
SQL server
- MariaDB server
sql/mysqld.h - Session and statements
sql/sql_class.h - SQL field types
sql/field.h - Table metadata
sql/table.h - Engine handler API
sql/handler.h
Storage and backup
- InnoDB engine
storage/innobase - Aria engine
storage/maria - MyRocks engine
storage/rocksdb - Spider engine
storage/spider - DuckDB integration
storage/duckdb/runtime/cross_engine_scan.cc - Physical backup
extra/mariabackup/common_engine.cc - Backup data sinks
extra/mariabackup/datasink.h
Replication and clustering
- Replication
sql - WSREP storage service
sql/wsrep_storage_service.cc - InnoDB binlog reader
client/mysqlbinlog-engine.cc
Server capabilities
- Performance Schema
storage/perfschema/pfs_engine_table.cc - Authentication plugins
plugin - Vector search
sql - Advanced SQL
sql - Spatial and full-text
sql
Other components
- Client application
Connections 22
- Client application → Client library: connects through
- Client library → MariaDB server: uses compatible protocol
- Command-line tools → MariaDB server: connects through
- MariaDB server → Session and statements: manages sessions
- Session and statements → Table metadata: works with tables
- Table metadata → SQL field types: defines fields
sql/table.h - Table metadata → Engine handler API: uses engine API
sql/table.h - Engine handler API → InnoDB engine: dispatches to
- Engine handler API → Aria engine: dispatches to
- Engine handler API → MyRocks engine: dispatches to
- Engine handler API → Spider engine: dispatches to
- DuckDB integration → Session and statements: scans across engines
storage/duckdb/runtime/cross_engine_scan.cc - Physical backup → Backup data sinks: writes through
extra/mariabackup/common_engine.cc - Physical backup → InnoDB engine: backs up engine data
extra/mariabackup/common_engine.cc - Replication → MariaDB server: replicates database changes
sql/wsrep_storage_service.cc - WSREP storage service → Session and statements: starts and commits transactions
sql/wsrep_storage_service.cc - InnoDB binlog reader → Replication: reads binlog data
client/mysqlbinlog-engine.cc - Performance Schema → Table metadata: exposes instrumented tables
- Authentication plugins → MariaDB server: authenticates connections
- Vector search → Table metadata: adds vector type and indexes
sql/field.h - Advanced SQL → Session and statements: supports SQL features
sql/wsrep_storage_service.cc - Spatial and full-text → Table metadata: indexes spatial and text data
sql/field.h