EXAMPLE

The EXAMPLE storage engine is a stub engine that does nothing; it exists in the MySQL source code as an illustration of how to begin writing a new storage engine. See Storage Engines for how it compares to the others.

When an EXAMPLE table is created, the server creates a table format file in the database directory, named after the table with a format-file extension; no other files are created. No data can actually be stored into the table, and retrievals always return an empty result – it exists purely for developers studying or prototyping the storage engine API, not for application use.

FeatureEXAMPLE
Storage limitsN/A (no data is stored)
TransactionsNo
Locking granularityTable
MVCCNo
Geospatial data type supportNo
Geospatial indexing supportNo
B-tree indexesNo
T-tree indexesNo
Hash indexesNo
Full-text search indexesNo
Clustered indexesNo
Data cachesNo
Index cachesNo
Compressed dataNo
Encrypted dataNo
Cluster database supportNo
Replication supportNo
Foreign key supportNo
Backup / point-in-time recoveryNo
Query cache supportNo
Update statistics for data dictionaryNo

CREATE TABLE stub_demo (
    id INT PRIMARY KEY,
    note VARCHAR(50)
) ENGINE = EXAMPLE;

INSERT INTO stub_demo VALUES (1, 'hello'); -- accepted, but nothing is stored
SELECT * FROM stub_demo;                    -- always returns an empty result

Query OK, 1 row affected
idnote
Empty set (0 rows)