mysql>
CREATE TABLE test (i INT NOT NULL, c CHAR(10) NOT NULL)
->
ENGINE = CSV;
Query OK, 0 rows affected (0.12 sec)
mysql>
INSERT INTO test VALUES(1,'record one'),(2,'record two');
Query OK, 2 rows affected (0.00 sec)
Records: 2
mysql>
SELECT * FROM test;
+------+------------+
| i
| c
+------+------------+
|
1 | record one |
|
2 | record two |
+------+------------+
2 rows in set (0.00 sec)
If you examine the
statements, its contents should look like this:
"1","record one"
"2","record two"
This format can be read, and even written, by spreadsheet applications such as Microsoft Excel or
StarOffice Calc.
The
storage engine does not support indexing.
CSV
14.10. The
BLACKHOLE
The
BLACKHOLE
not store it. Retrievals always return an empty result:
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
mysql>
SELECT * FROM test;
Empty set (0.00 sec)
The
BLACKHOLE
engine if you build MySQL from source, invoke
option.
engine
To examine the source for the
distribution.
When you create a
The file begins with the table name and has an
with the table.
The
BLACKHOLE
declarations in the table definition.
You can check whether the
mysql>
SHOW VARIABLES LIKE 'have_blackhole_engine';
Inserts into a
statements are logged (and replicated to slave servers). This can be useful as a repeater or filter
mechanism. Suppose that your application requires slave-side filtering rules, but transferring all
binary log data to the slave first results in too much traffic. In such a case, it is possible to set up on
The
BLACKHOLE
Duplicates: 0
Warnings: 0
|
file in the database directory created by executing the preceding
test.CSV
Storage Engine
storage engine acts as a "black hole" that accepts data but throws it away and does
Duplicates: 0
Warnings: 0
storage engine is included in MySQL binary distributions. To enable this storage
BLACKHOLE
table, the server creates a table format file in the database directory.
BLACKHOLE
storage engine supports all kinds of indexes. That is, you can include index
BLACKHOLE
table do not store any data, but if the binary log is enabled, the SQL
BLACKHOLE
Storage Engine
with the
configure
engine, look in the
sql
extension. There are no other files associated
.frm
storage engine is available with this statement:
1318
--with-blackhole-storage-
directory of a MySQL source
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers