The BLACKHOLE storage engine acts as a “black hole” that accepts data but throws it away and does not store it. Retrievals always return the empty set:
mysql> CREATE TABLE test(i INT, c CHAR(10)) ENGINE = BLACKHOLE;
Query OK, 0 rows affected (0.03 sec)
mysql> INSERT INTO test VALUES(1,'record one'),(2,'record two');
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM test;
Empty set (0.00 sec)
When you create a BLACKHOLE table, the server creates a table definition file in the database directory. The file begins with the table name and has an .frm extension. There are no other files associated with the table.
The BLACKHOLE storage engine supports all kinds of indexing.
This is not a joke.