MENU
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.
| Feature | EXAMPLE |
| Storage limits | N/A (no data is stored) |
| Transactions | No |
| Locking granularity | Table |
| MVCC | No |
| Geospatial data type support | No |
| Geospatial indexing support | No |
| B-tree indexes | No |
| T-tree indexes | No |
| Hash indexes | No |
| Full-text search indexes | No |
| Clustered indexes | No |
| Data caches | No |
| Index caches | No |
| Compressed data | No |
| Encrypted data | No |
| Cluster database support | No |
| Replication support | No |
| Foreign key support | No |
| Backup / point-in-time recovery | No |
| Query cache support | No |
| Update statistics for data dictionary | No |
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 resultQuery OK, 1 row affected
Empty set (0 rows)
| id | note |
|---|