List:General Discussion« Previous MessageNext Message »
From:David (SST - Adelaide) Logan Date:April 6 2005 7:15am
Subject:RE: CSV storage engine
View as plain text  
From the documentation referred to in the link

14.8. The CSV Storage Engine

The CSV storage engine was added in MySQL 4.1.4. This engine stores data
in text files using comma-separated-values format.

To enable this storage engine, use the --with-csv-storage-engine option
to configure when you build MySQL.

When you create a CSV table, the server creates a table definition file
in the database directory. The file begins with the table name and has
an .frm extension. The storage engine also creates a data file. Its name
begins with the table name and has a .CSV extension. The data file is a
plain text file. When you store data into the table, the storage engine
saves it into the data file in CSV format.

mysql> CREATE TABLE test(i INT, c CHAR(10)) 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  Duplicates: 0  Warnings: 0

mysql> SELECT * FROM test;
| i    | c          |
|    1 | record one |
|    2 | record two |
2 rows in set (0.00 sec)

If you examine the test.CSV file in the database directory after
executing the preceding statements, its contents look like this:

"1","record one"
"2","record two"

The CSV storage engine does not support indexing.  

David Logan
Database Administrator
HP Managed Services
148 Frome Street,
Adelaide 5000

+61 8 8408 4273 - Work
+61 417 268 665 - Mobile
+61 8 8408 4259 - Fax

-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@stripped] 
Sent: Wednesday, 6 April 2005 4:43 PM
To: mysql@stripped
Subject: CSV storage engine

> You could use the CSV table type:

Interesting. I just downloaded 4.1.11 - how does one enable
this engine?

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
Upscene Productions

MySQL General Mailing List
For list archives:
To unsubscribe:

CSV-to-SQL?Richard Miller6 Apr
Re: CSV-to-SQL?Renato Golin6 Apr
  • CSV storage engineMartijn Tonies6 Apr
  • Re: CSV-to-SQL?Richard Miller8 Apr
    • Re: CSV-to-SQL?Renato Golin8 Apr
RE: CSV-to-SQL?Bob)6 Apr
RE: CSV storage engineSST - Adelaide)6 Apr
  • Re: CSV storage engineMartijn Tonies6 Apr
RE: CSV storage engineSST - Adelaide)6 Apr
  • Re: CSV storage engineMartijn Tonies6 Apr
    • Re: CSV storage enginePhilippe Poelvoorde6 Apr
  • Re: CSV storage engineMartijn Tonies6 Apr
RE: CSV storage engineTom Crimmins6 Apr